Skip to content

Menu Widget ES6-script | Separate settings for links, centering and theme

Notifications You must be signed in to change notification settings

omreps/menu-widget-es6

Repository files navigation

Menu Widget JS-script with Links

Menu Widget ES6-script | Сan be added on any website with jQuery | Separate settings for links, centering and theme

demo: http://vh152449.eurodir.ru/web-widget-es6

Screenshot

Instruction

  • use any your website or host the demo site (index.html & app.min.css)
  • insert widget code in the demo

Widget code

Insert this <script> code in the end of the section on your web site:

<script type="module">
   import {MyWidget} from './widget.js';
   new MyWidget('dark', 'true',
                '[["linkL1|http://l1.html"],["linkL1|http://l1.html"],["Dropdown1", "linkL2|http://l2.html","linkL3|http://l3.html"], ["linkL4|http://l1.html"], ["LinkSet", "linkL2|http://l2.html","linkL3|http://l3.html"]]',
                '[["linkR1|http://r1.html"],["linkR2|http://r2.html"],["Dropdown2", "linkL2|http://l2.html","linkL3|http://l3.html"]]'
               );
</script>

you can use settings params, where

  • theme can be "dark" or "light", for dark or light appearance
  • center can be "true" or "false", true - will center left and right urls bars
  • left and rigth links - put the link names and urls, also make dropdowns with links

Widget es6-script & demo page

Widget uses ES6 without polyfill

About

Menu Widget ES6-script | Separate settings for links, centering and theme

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published