Skip to content
This repository was archived by the owner on Jun 24, 2020. It is now read-only.

Latest commit

 

History

History
26 lines (24 loc) · 1.65 KB

THEMING.md

File metadata and controls

26 lines (24 loc) · 1.65 KB

Update/rebuild custom theme

The only thing we're adding right now is the menu bar, nothing else. This small tutorial shows how to quickly rebuild a theme.

  1. Rename current 'theme' folder to 'theme_backup'
  2. Copy/paste latest theme from Gitbook repo
  3. Copy the custom.css and images from 'theme_backup' to 'theme'
  4. Add custom.css AFTER style.css to the proper page to load it (search for style.css in 'theme' folder)
  5. Add <link href='http://fonts.googleapis.com/css?family=Roboto:400,300,300italic,700,400italic' rel='stylesheet' type='text/css'> before style.css
  6. Add <link rel="stylesheet" href="http://www.nooku.org/css/header.css"> after custom.css
  7. Add the following right after app.js:
   <script>
       responsivemenu.init({
           wrapper: document.querySelector('.header'),
           toggleclass: 'button--hamburger',
           togglecontent: 'menu <span class="lines"></span>'
       });
   </script>
  1. Add markup to the right file (currently page.html). Add it just before <div class="book"></div>
  2. Add class="no-js" to <body>
  3. Add following right below <body class="no-js">: <script data-inline type="text/javascript">function hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}var el=document.body;var cl="no-js";if(hasClass(el,cl)){var reg=new RegExp("(\\s|^)"+cl+"(\\s|$)");el.className=el.className.replace(reg," js-enabled")}</script>
  4. Run gitbook serve and test if menu is working (mobile first)
  5. On success remove theme_backup