PatternSkinCssCookbook Recipe: Left Sidebar Toggle

(currently this Topic is in the Web Sandbox.StefanKrüger)

Idea/Target: currently the Sidebar is hidden for screens with width < 870px this mod shoud allow to toggle the sidebar at small screens..

This line loads the extra style definition:
   * Set USERSTYLEURL = %PUBURLPATH{topic="Sandbox.StefanKrüger.PatternSkinCssCookbookSidebarToggle" "SidebarToggle.css"}%
You can write these lines in DefaultPreferences, in SitePreferences, in WebPreferences, in your user topic, or on a single page.

To Add the Button to the Sidebar do the following: Add a Macro
   * Set SIDEBARTOGGLEBUTTON = <button class="sidebartoggle-button" onclick="$('body').toggleClass('showsidebar');">toggle</button>
then you can use this in a topic or in the WebLeftBarWebsList to add it globaly.
the formating/positioning is done in the css. if the button is part of the sidbar it will be positioned absolute so it

test button:
this button only works if the sidebar is hidden (screen-width < 870px)

(this is based on System.PatternSkinCssCookbookNoLeftBar)
Topic revision: r1 - 16 Nov 2016, StefanKrüger
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy