summaryrefslogtreecommitdiff
path: root/source/_navigation.html.erb
blob: 61a72eabc98b4a6933e7ae70905032676e1cf4f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<%

    @navigation = {

  ["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"]
  ]

}

%>

<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 %>
          <% 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>
    <% end %>

  </ul>
</div>