Difference between revisions of "Menu Examples"

From MSX - Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
== Example 1 ==
 
== Example 1 ==
 
[[File:menu.png|thumb|640px|none]]
 
[[File:menu.png|thumb|640px|none]]
 +
 +
<syntaxhighlight lang="json">
 +
{
 +
    "headline": "Test Menu",
 +
    "menu": [{
 +
            "label": "Default Menu Item"
 +
        }, {
 +
            "type": "separator"
 +
        }, {
 +
            "icon": "home",
 +
            "label": "Menu Item With Icon"
 +
        }, {
 +
            "icon": "person",
 +
            "label": "Menu Item With Icon & Extension Label",
 +
            "extensionLabel": "123"
 +
        }, {
 +
            "icon": "star",
 +
            "label": "Menu Item With Icon & Extension Icon",
 +
            "extensionIcon": "music-note"
 +
        }, {
 +
            "type": "separator",
 +
            "label": "Separator With Label"
 +
        }, {           
 +
            "label": "Menu Item With Background",
 +
            "background": "http://msx.benzac.de/img/bg1.jpg"
 +
        }, {           
 +
            "label": "Menu Item With Data Link",
 +
            "data": "http://msx.benzac.de/info/data/content_placeholder.json"
 +
        }, {           
 +
            "label": "Menu Item With Data Object",
 +
            "data": {             
 +
                "pages": [{ 
 +
                        "items": [{
 +
                                "layout": "0,0,12,6",
 +
                                "color": "msx-glass",
 +
                                "headline": "Content Placeholder",
 +
                                "text": "This is just a placeholder."
 +
                            }]
 +
                    }]
 +
            }
 +
        }]
 +
}
 +
</syntaxhighlight>
 +
 +
Demo: https://msx.benzac.de/?start=menu:https://msx.benzac.de/info/data/example_menu_1.json

Revision as of 12:57, 8 January 2021

Example 1[edit]

Menu.png
{
    "headline": "Test Menu",
    "menu": [{
            "label": "Default Menu Item"
        }, {
            "type": "separator"
        }, {
            "icon": "home",
            "label": "Menu Item With Icon"
        }, {
            "icon": "person",
            "label": "Menu Item With Icon & Extension Label",
            "extensionLabel": "123"
        }, {
            "icon": "star",
            "label": "Menu Item With Icon & Extension Icon",
            "extensionIcon": "music-note"
        }, {
            "type": "separator",
            "label": "Separator With Label"
        }, {            
            "label": "Menu Item With Background",
            "background": "http://msx.benzac.de/img/bg1.jpg"
        }, {            
            "label": "Menu Item With Data Link",
            "data": "http://msx.benzac.de/info/data/content_placeholder.json"
        }, {            
            "label": "Menu Item With Data Object",
            "data": {               
                "pages": [{  
                        "items": [{
                                "layout": "0,0,12,6",
                                "color": "msx-glass",
                                "headline": "Content Placeholder",
                                "text": "This is just a placeholder."
                            }]
                    }]
            }
        }]
}

Demo: https://msx.benzac.de/?start=menu:https://msx.benzac.de/info/data/example_menu_1.json