Skip to content

Commit

Permalink
fix mobile view
Browse files Browse the repository at this point in the history
  • Loading branch information
mneumegen committed Feb 6, 2018
1 parent fe9dcfd commit 8f7298c
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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
30 changes: 20 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ collections:
api:
title: APIs
position: 2
gems:
plugins:
- jekyll-sitemap
- jekyll-seo-tag

Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<body>
<header>
<h1>
<a href="{{ site.baseurl }}/"><img src="{{ site.baseurl }}/images/logo.svg" height="40" alt="{{ site.title }} logo"></a>
<button type="button" class="open-nav" id="open-nav"></button>
<a href="{{ site.baseurl }}/"><img src="{{ site.baseurl }}/images/logo.svg" height="40" alt="{{ site.title }} logo"></a>
</h1>

<form action="{{ site.baseurl }}/search/" method="get">
Expand Down
14 changes: 13 additions & 1 deletion _sass/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ html {
height: 100vh;
}

img {
max-width: 100%;
}

@media (max-width: $mobile-break) {
.sidebar, header > form {
display: none;
Expand Down Expand Up @@ -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;

Expand All @@ -492,6 +499,10 @@ header {
right: auto;
bottom: auto;

.copyright {
display: block;
}

.open-nav {
display: none;
}
Expand Down Expand Up @@ -554,4 +565,5 @@ header {
text-align: center;
font-size: .6em;
margin: 30px 0 0 0;
display: none;
}
4 changes: 4 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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("<ul class=\"languages\"></ul>"),
Expand Down

0 comments on commit 8f7298c

Please sign in to comment.