Skip to content

Commit

Permalink
Better navigation on mobile.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Aug 4, 2015
1 parent 63ac655 commit 6321ec8
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 23 deletions.
4 changes: 3 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
title: Ruby Grape | An opinionated micro-framework for creating REST-like APIs in Ruby.
title:
long: Ruby Grape | An opinionated micro-framework for creating REST-like APIs in Ruby.
short: Ruby Grape | API Framework
locale: en_US
url: # https://ruby-grape.github.io
markdown: kramdown
Expand Down
1 change: 1 addition & 0 deletions _data/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# keep
2 changes: 0 additions & 2 deletions _data/navigation.yml

This file was deleted.

2 changes: 1 addition & 1 deletion _includes/_head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<meta charset="utf-8">
<title>{% if page.title %}{{ page.title }} &#8211; {% endif %}{{ site.title }}</title>
<title>{% if page.title %}{{ page.title }} &#8211; {% endif %}{{ site.title.long }}</title>
{% if page.excerpt %}<meta name="description" content="{{ page.excerpt | strip_html }}">{% endif %}
<meta name="keywords" content="{{ page.tags | join: ', ' }}">
{% if page.author %}
Expand Down
16 changes: 1 addition & 15 deletions _includes/_navigation.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
<div class="navigation-wrapper">
<div class="site-name">
<!--<a href="{{ site.url }}/">{{ site.title }}</a>-->
<a href="{{ site.url }}/">{{ site.title.short }}</a>
</div><!-- /.site-name -->
<div class="top-navigation">
<nav role="navigation" id="site-nav" class="nav sliding-menu-content">
<ul>
{% for link in site.data.navigation %}
{% if link.url contains 'http' %}
{% assign domain = '' %}
{% else %}
{% assign domain = site.url %}
{% endif %}
<li><a href="{{ domain }}{{ link.url }}" {% if link.url contains 'http' %}target="_blank"{% endif %}>{{ link.title }}</a></li>
{% endfor %}
</ul>
</nav>
</div><!-- /.top-navigation -->
</div><!-- /.navigation-wrapper -->
6 changes: 3 additions & 3 deletions _includes/_open-graph.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Twitter Cards -->
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title.long }}{% endif %}">
{% if page.excerpt %}<meta name="twitter:description" content="{{ page.excerpt | strip_html }}">{% endif %}
{% if site.owner.twitter %}<meta name="twitter:site" content="@{{ site.owner.twitter }}">{% endif %}
{% if author.twitter %}<meta name="twitter:creator" content="@{{ author.twitter }}">{% endif %}
Expand All @@ -13,7 +13,7 @@
<!-- Open Graph -->
<meta property="og:locale" content="{{ site.locale }}">
<meta property="og:type" content="article">
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title.long }}{% endif %}">
{% if page.excerpt %}<meta property="og:description" content="{{ page.excerpt | strip_html }}">{% endif %}
<meta property="og:url" content="{{ page.url | replace:'index.html','' | prepend: site.url }}">
<meta property="og:site_name" content="{{ site.title }}">
<meta property="og:site_name" content="{{ site.title.long }}">
2 changes: 1 addition & 1 deletion _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{% include _search.html %}
</div>
<article class="page">
<h1>{{ page.title }}</h1>
<h2><a href='/'>&lt; Home</a> | {{ page.title }}</h2>
<div class="article-wrap">
{{ content }}
</div><!-- /.article-wrap -->
Expand Down
12 changes: 12 additions & 0 deletions _sass/page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ body {
font-weight: 700;
text-transform: uppercase;
@include clearfix;
@media #{$micro} {
display: block;
}
@media #{$small} {
display: none;
}
@media #{$large} {
display: none;
}
@media #{$x-large} {
display: none;
}
}
.site-name {
@include grid(12,10);
Expand Down

0 comments on commit 6321ec8

Please sign in to comment.