summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorLars Henrik Mai <lars.mai@kontinui.de>2014-05-02 14:39:26 +0200
committerLars Henrik Mai <lars.mai@kontinui.de>2014-05-02 14:39:26 +0200
commit1182b56a2e98cc5fbbbbe2bc30a0248f087ffd49 (patch)
tree74433a6b8d4648a8802d4bc8b8f9d50740f8ea2a /source
parent4ca5748ffdb876d4aebdf6d97b7667b62dbde4c0 (diff)
fixes for mobile nav
Diffstat (limited to 'source')
-rw-r--r--source/_navigation.html.erb50
-rw-r--r--source/stylesheets/base.css.scss8
2 files changed, 39 insertions, 19 deletions
diff --git a/source/_navigation.html.erb b/source/_navigation.html.erb
index bf5b556..c0e3148 100644
--- a/source/_navigation.html.erb
+++ b/source/_navigation.html.erb
@@ -33,28 +33,40 @@
}
%>
-<ul>
- <li class="dropdown">
- <%= link_to "Home", "/" %>
- </li>
+<div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#nav-big">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+</div>
+
+<div class="collapse navbar-collapse" id="nav-big">
+ <ul>
- <% @navigation.each do |key, value| %>
<li class="dropdown">
- <a data-toggle="dropdown" class="dropdown-toggle" href=<%= key.last %>>
- <%= key.first %>
+ <%= link_to "Home", "/" %>
+ </li>
+
+ <% @navigation.each do |key, value| %>
+ <li class="dropdown">
+ <a data-toggle="dropdown" class="dropdown-toggle" href=<%= key.last %>>
+ <%= key.first %>
+ <% if value %>
+ <b class="caret"></b>
+ <% end %>
+ </a>
<% if value %>
- <b class="caret"></b>
+ <ul class="dropdown-menu">
+ <% value.each do |name, url| %>
+ <li><%= link_to(name, url) %></li>
+ <% end %>
+ </ul>
<% end %>
- </a>
- <% if value %>
- <ul class="dropdown-menu">
- <% value.each do |name, url| %>
- <li><%= link_to(name, url) %></li>
- <% end %>
- </ul>
- <% end %>
- </li>
- <% end %>
+ </li>
+ <% end %>
-</ul>
+ </ul>
+</div>
diff --git a/source/stylesheets/base.css.scss b/source/stylesheets/base.css.scss
index a38b784..99db24d 100644
--- a/source/stylesheets/base.css.scss
+++ b/source/stylesheets/base.css.scss
@@ -10,12 +10,18 @@ body {
nav {
@extend .row;
+ @extend .navbar;
+ @extend .navbar-static;
+ @extend .navbar-inverse;
}
nav ul {
@extend .nav;
@extend .navbar-nav;
@extend .navbar-justified;
+
+ //@extend .collapse;
+ //@extend .navbar-collapse;
}
@media (min-width: 768px){
@@ -27,7 +33,9 @@ nav ul {
}
}
+/*
ul.nav li.dropdown:hover ul.dropdown-menu{
display: block;
margin-top:0px
}
+*/