GithubHelp home page GithubHelp logo

mldaq / adapt-hotspot-menu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cgkineo/adapt-hotspotmenu

0.0 2.0 0.0 68 KB

Hotspot menu

License: GNU General Public License v3.0

JavaScript 93.46% CSS 4.12% HTML 2.42%

adapt-hotspot-menu's Introduction

adapt-hotspot-menu

The hotspot menu consists of menu items contained within hotspots which are positioned on a image. When hotspots are selected menu item details are openened within a popup.

For mobile view by default this menu displays as the core box menu.

####Example JSON Configuration options are explained below.​ The "_hotspotMenuGraphic" ​​should be set on the parent menu content object.

{
    "_id":"co-30",
    "_parentId":"co-10",
    "_type":"menu",
    "_classes":"",
    "title":"Hotspot Menu",
    "displayTitle":"Hotspot Menu",
    "body":"Page description text.",
    "_graphic": {
        "alt": "alt text",
        "src": "course/en/images/hotgraphic.png"
    },
    "linkText":"View",
    "duration":"2 mins",
    "_hotspotMenuGraphic": {
        "alt": "alt text",
        "src": "course/en/images/hotgraphic.png"
    }
}

The "_hotspotMenuItem" should be set on the child​ content objects.

{
    "_id":"co-60",
    "_parentId":"co-30",
    "_type":"page",
    "_classes":"",
    "title":"Welcome to Adapt Learning",
    "displayTitle":"Welcome to Adapt Learning",
    "body":"Page description text.",
    "_lock" : [
        "co-05",
        "co-15",
        "co-20"
    ],
    "_graphic": {
        "alt": "alt text",
        "src": "course/en/images/origami-menu-one.jpg"
    },
    "linkText":"View",
    "duration":"2 mins",
    "_hotspotMenuItem": {
        "position": {
            "_top":50,
            "_left":50
        }
    }
}

####Config options

Background Graphic This provides the image src for the menu background image in which the hotspots are positioned to sit ontop of.

"_hotspotMenuGraphic": {
    "alt": "alt text",
    "src": "course/en/images/hotgraphic.png"
}

Hotspot Menu Item Position This sets the top and left position of the menu item relative to its container. Positons are set as percentages.

"_hotspotMenuItem": {
    "position": {
        "_top":50,
        "_left":50
    }
}

adapt-hotspot-menu's People

Contributors

chris-steele avatar guywillis avatar oliverfoster avatar tomgreenfield avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.