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]]
+
=== Screenshot & Demo Link ===
 
+
[[File:menu.png|thumb|640px|none|https://msx.benzac.de/?start=menu:https://msx.benzac.de/info/data/example_menu_1.json]]
 +
=== Code===
 
<syntaxhighlight lang="json">
 
<syntaxhighlight lang="json">
 
{
 
{
Line 44: Line 45:
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
 
Demo: https://msx.benzac.de/?start=menu:https://msx.benzac.de/info/data/example_menu_1.json
 

Revision as of 11:59, 8 January 2021

Example 1[edit]

Screenshot & Demo Link[edit]

Code[edit]

{
    "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."
                            }]
                    }]
            }
        }]
}