From: Marius Gavrilescu Date: Wed, 8 Apr 2015 17:20:45 +0000 (+0300) Subject: Collapse nav on mobile devices X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;ds=sidebyside;h=f3f57928b0b8ff5e342f9417323a1592bc2ca945;p=gruntmaster-page.git Collapse nav on mobile devices --- diff --git a/MANIFEST b/MANIFEST index 8c47140..45609ff 100644 --- a/MANIFEST +++ b/MANIFEST @@ -18,6 +18,7 @@ js/20-sprintf.js js/80-sidebar.js js/90-divine-format.js js/90-form.js +js/90-mobilenav.js js/90-nav.js js/90-reqjs.js js/90-themes.js diff --git a/js/90-mobilenav.js b/js/90-mobilenav.js new file mode 100644 index 0000000..d12e0fa --- /dev/null +++ b/js/90-mobilenav.js @@ -0,0 +1,13 @@ +(function(){ + 'use strict'; + + $( document ).ready(function(){ + if(document.body.clientWidth >= 768) + return; + $('#title').before('
Tap title to toggle menu
'); + $('nav').addClass('hidden'); + $('#title').css('margin', '6px').on('click', function () { + $('nav').toggleClass('hidden'); + }); + }); +})(); diff --git a/tmpl/skel.en b/tmpl/skel.en index 22411f9..82e6a13 100644 --- a/tmpl/skel.en +++ b/tmpl/skel.en @@ -9,8 +9,8 @@ - -
-

TITLE

This is a static version of Gruntmaster 6000.