From 8f7298c4ab03a37aea550914652062105fdd7f83 Mon Sep 17 00:00:00 2001 From: Mike Neumegen Date: Mon, 5 Feb 2018 17:05:27 -0800 Subject: [PATCH] fix mobile view --- Gemfile | 4 ++-- Gemfile.lock | 30 ++++++++++++++++++++---------- _config.yml | 2 +- _layouts/default.html | 2 +- _sass/_main.scss | 14 +++++++++++++- js/main.js | 4 ++++ 6 files changed, 41 insertions(+), 15 deletions(-) diff --git a/Gemfile b/Gemfile index 0ab243d0..724febd0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ source 'https://rubygems.org' -gem 'jekyll', '3.6.2' +gem 'jekyll', '3.7.2' group :jekyll_plugins do gem 'jekyll-seo-tag', '2.4.0' - gem 'jekyll-sitemap', '1.1.1' + gem 'jekyll-sitemap', '1.2.0' end diff --git a/Gemfile.lock b/Gemfile.lock index 1bf93906..0498c707 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,26 +4,36 @@ GEM addressable (2.5.2) public_suffix (>= 2.0.2, < 4.0) colorator (1.1.0) + concurrent-ruby (1.0.5) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + eventmachine (1.2.5) ffi (1.9.18) forwardable-extended (2.6.0) - jekyll (3.6.2) + http_parser.rb (0.6.0) + i18n (0.9.3) + concurrent-ruby (~> 1.0) + jekyll (3.7.2) addressable (~> 2.4) colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 1.1) + jekyll-watch (~> 2.0) kramdown (~> 1.14) liquid (~> 4.0) mercenary (~> 0.3.3) pathutil (~> 0.9) - rouge (>= 1.7, < 3) + rouge (>= 1.7, < 4) safe_yaml (~> 1.0) - jekyll-sass-converter (1.5.1) + jekyll-sass-converter (1.5.2) sass (~> 3.4) jekyll-seo-tag (2.4.0) jekyll (~> 3.3) - jekyll-sitemap (1.1.1) + jekyll-sitemap (1.2.0) jekyll (~> 3.3) - jekyll-watch (1.5.1) + jekyll-watch (2.0.0) listen (~> 3.0) kramdown (1.16.2) liquid (4.0.0) @@ -38,7 +48,7 @@ GEM rb-fsevent (0.10.2) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) - rouge (2.2.1) + rouge (3.1.1) ruby_dep (1.5.0) safe_yaml (1.0.4) sass (3.5.5) @@ -51,9 +61,9 @@ PLATFORMS ruby DEPENDENCIES - jekyll (= 3.6.2) + jekyll (= 3.7.2) jekyll-seo-tag (= 2.4.0) - jekyll-sitemap (= 1.1.1) + jekyll-sitemap (= 1.2.0) BUNDLED WITH - 1.16.0.pre.3 + 1.16.0 diff --git a/_config.yml b/_config.yml index 1d5822e8..9bc81439 100644 --- a/_config.yml +++ b/_config.yml @@ -14,7 +14,7 @@ collections: api: title: APIs position: 2 -gems: +plugins: - jekyll-sitemap - jekyll-seo-tag diff --git a/_layouts/default.html b/_layouts/default.html index 276dbaba..69c10e5a 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -23,8 +23,8 @@

- {{ site.title }} logo + {{ site.title }} logo

diff --git a/_sass/_main.scss b/_sass/_main.scss index 9f3f384d..a61d5f62 100644 --- a/_sass/_main.scss +++ b/_sass/_main.scss @@ -15,6 +15,10 @@ html { height: 100vh; } +img { + max-width: 100%; +} + @media (max-width: $mobile-break) { .sidebar, header > form { display: none; @@ -467,12 +471,15 @@ header { } .open-nav { + width: 25px; + height: 25px; + margin: 0 0 0 18px; background-image: url($base-url + '/images/menu.svg'); background-color: transparent; background-repeat: no-repeat; background-size: 100%; border: 0; - position: absolute; + position: relative; border-radius: 2px; cursor: pointer; @@ -492,6 +499,10 @@ header { right: auto; bottom: auto; + .copyright { + display: block; + } + .open-nav { display: none; } @@ -554,4 +565,5 @@ header { text-align: center; font-size: .6em; margin: 30px 0 0 0; + display: none; } diff --git a/js/main.js b/js/main.js index 3f01edda..db6927e8 100644 --- a/js/main.js +++ b/js/main.js @@ -7,6 +7,10 @@ jQuery(function() { var $el; + $sidebar.find('a').click(function() { + $('body').removeClass('nav-open'); + }); + $("section > div.highlighter-rouge:first-of-type").each(function(i) { var $this = $(this).before("
    "),