summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorLars Henrik Mai <lars.mai@kontinui.de>2014-04-28 13:59:49 +0200
committerLars Henrik Mai <lars.mai@kontinui.de>2014-05-02 13:31:07 +0200
commitd791a8546103a4ee0fac20f054e0ab51bae45169 (patch)
treeb1fed59c85a9696777693a48b17f4ca035602bf3 /source
parent9832d63b0d73c76bd167f281a9ceb6b71af4106d (diff)
implement new 2-level navigation
Diffstat (limited to 'source')
-rw-r--r--source/_navigation.html.erb78
1 files changed, 57 insertions, 21 deletions
diff --git a/source/_navigation.html.erb b/source/_navigation.html.erb
index e3b1687..65ba820 100644
--- a/source/_navigation.html.erb
+++ b/source/_navigation.html.erb
@@ -1,22 +1,58 @@
-<div id="nav">
- <ul class="nav nav-pills">
- <li class="active">
- <%= link_to "Home", "/" %>
+<%
+
+ @navigation = {
+
+ ["Home", "/"] => nil,
+
+ ["Aktuelles", "/aktuelles/index.html"] => [
+ ["Blog", "/aktuelles/blog.html"],
+ ["Kalender", "/aktuelles/kalender.html"]
+ ],
+
+ ["Entdecken", "/entdecken/index.html"] => [
+ ["Die Räume", "/entdecken/raeume.html"],
+ ["Der Verein", "/entdecken/verein.html"],
+ ["Das Wiki", "/entdecken/wiki.html"],
+ ["Mailinglisten", "/entdecken/mailinglisten.html"]
+ ],
+
+ ["Mitmachen!", "/mitmachen/index.html"] => [
+ ["Projekte", "/mitmachen/projekte.html"],
+ ["Regelmässige Treffen", "/mitmachen/termine.html"]
+ ],
+
+ ["Unterstützen", "/unterstuetzen/index.html"] => [
+ ["Mitglied werden", "/unterstuetzen/mitglied_werden.html"],
+ ["Förderer", "/unterstuetzen/foerderer.html"],
+ ["Sponsoren", "/unterstuetzen/sponsoren.html"]
+ ],
+
+ ["Kontakt", "/kontakt/index.html"] => [
+ ["Wegbeschreibung", "/kontakt/lage.html"],
+ ["Kontaktmöglichkeiten", "/kontakt/kontakt.html"]
+ ]
+
+}
+
+%>
+<ul>
+
+ <% @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 %>
+ <ul class="dropdown-menu">
+ <% value.each do |name, url| %>
+ <li><%= link_to(name, url) %></li>
+ <% end %>
+ </ul>
+ <% end %>
</li>
- <li>
- <%= link_to "Aktuelles", "/aktuelles/index.html" %>
- </li>
- <li>
- <%= link_to "Entdecken", "/entdecken/index.html" %>
- </li>
- <li>
- <%= link_to "Mitmachen!", "/mitmachen/index.html" %>
- </li>
- <li>
- <%= link_to "Unterstützen!", "/unterstuetzen/index.html" %>
- </li>
- <li>
- <%= link_to "Kontakt", "/kontakt/index.html" %>
- </li>
- </ul>
-</div>
+ <% end %>
+
+</ul>