navigation.jsp 6 KB
Newer Older
1
2
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

Ubbo Veentjer's avatar
Ubbo Veentjer committed
3
4
5
6
7
8
9
10
<nav class="tg nav -has-search" role="navigation">
  <h2 class="sr-only">${i18n['navigation']}</h2>
  <ul aria-label="${i18n['site-pages']}" role="menubar">

      <li class="tg nav_item -search">
        <form class="tg search -header" action="/search">
          <fieldset class="tg search_fake-input">
            <div class="tg search_filter">
11
              <c:if test="${filter.size() > 0}">
Ubbo Veentjer's avatar
Ubbo Veentjer committed
12
                <input class="tg search_checkbox" id="search-filters-active" type="checkbox" checked>
13
14
                <label for="search-filters-active">${i18n['filters-active']}</label>
              </c:if>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
15
16
17
18
19
            </div>

            <div class="tg search_search">
              <label class="sr-only" for="search-query-2">${i18n['search-term']}:</label>
                <input value="${query}" class="tg search_input -header" id="search-query-2" name="query" placeholder="${i18n['search-term']}" type="search">
Ubbo Veentjer's avatar
Ubbo Veentjer committed
20
21
                <input type="hidden" name="order" value="${order}" />
                <input type="hidden" name="limit" value="${limit}" />
Ubbo Veentjer's avatar
Ubbo Veentjer committed
22
23
24
25
26
27
28
29
              <button class="tg search_submit" type="submit"><span class="sr-only">${i18n['do-search']}</span></button>
            </div>
          </fieldset>
          <a class="tg search_advanced-search-link" href="/advanced-search">${i18n['advanced-search']}</a>
        </form>
      </li>
      
      <li class="tg nav_item -has-dropdown" id="nav-explore" role="presentation">
30
        <a aria-labelledby="nav-explore" class="tg dropdown_toggle -nav" aria-haspopup="true" role="menuitem">
31
          ${i18n['content']}
Ubbo Veentjer's avatar
Ubbo Veentjer committed
32
33
34
35
36
37
        </a>
        <ul class="tg dropdown_menu -nav" role="menu">
          <li class="" id="layout_18" role="presentation">
            <a aria-labelledby="layout_18" href="/browse/root" role="menuitem" tabindex="">Repository</a>
          </li>
          <li class="" id="layout_18" role="presentation">
Ubbo Veentjer's avatar
Ubbo Veentjer committed
38
            <a aria-labelledby="layout_18" href="/facet/edition.agent.value?order=term:asc" role="menuitem" tabindex="">${i18n['by-author']}</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
39
40
          </li>
          <li class="" id="layout_18" role="presentation">
Ubbo Veentjer's avatar
Ubbo Veentjer committed
41
            <a aria-labelledby="layout_18" href="/facet/work.genre" role="menuitem" tabindex="">${i18n['by-genre']}</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
42
43
          </li>
          <li class="" id="layout_18" role="presentation">
Ubbo Veentjer's avatar
Ubbo Veentjer committed
44
            <a aria-labelledby="layout_18" href="/facet/format" role="menuitem" tabindex="">${i18n['by-filetype']}</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
45
46
          </li>
          <li class="" id="layout_18" role="presentation">
Ubbo Veentjer's avatar
Ubbo Veentjer committed
47
            <a aria-labelledby="layout_18" href="/facet/project.value" role="menuitem" tabindex="">${i18n['by-project']}</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
48
49
50
51
52
          </li>    
        </ul>
      </li>
      
      <li class="tg nav_item -has-dropdown" id="nav-explore" role="presentation">
53
        <a aria-labelledby="nav-explore" class="tg dropdown_toggle -nav" aria-haspopup="true" role="menuitem">
54
          ${i18n['documentation']}
Ubbo Veentjer's avatar
Ubbo Veentjer committed
55
56
        </a>
        <ul class="tg dropdown_menu -nav" role="menu">
57
58
59
          <li class="" id="layout_18" role="presentation">
            <a aria-labelledby="layout_18" href="/docs/mission-statement" role="menuitem" tabindex="">Mission Statement</a>
          </li>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
60
          <li class="" id="layout_18" role="presentation">
61
62
63
            <a aria-labelledby="layout_18" href="/docs/syntax" role="menuitem" tabindex="">${i18n['search']}</a>
          </li>
          <li class="" id="layout_18" role="presentation">
64
            <a aria-labelledby="layout_18" href="/docs/shelf" role="menuitem" tabindex="">${i18n['shelf']}</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
65
          </li>
66
          <li class="" id="layout_18" role="presentation">
Ubbo Veentjer's avatar
typo    
Ubbo Veentjer committed
67
            <a aria-labelledby="layout_18" href="/docs/download" role="menuitem" tabindex="">Download</a>
68
69
70
          </li>
          <li class="" id="layout_18" role="presentation">
            <a aria-labelledby="layout_18" href="/docs/voyant" role="menuitem" tabindex="">Voyant</a>
71
          </li>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
72
73
74
          <li class="" id="layout_18" role="presentation">
            <a aria-labelledby="layout_18" href="/docs/switchboard" role="menuitem" tabindex="">Switchboard</a>
          </li>
75
76
77
          <li class="" id="layout_18" role="presentation">
            <a aria-labelledby="layout_18" href="/docs/errata" role="menuitem" tabindex="">Errata</a>
          </li>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
        </ul>
      </li>
<!-- 
    #foreach ($nav_item in $nav_items)
      #set ($has_popup_class = '')
      #set ($toggle_popup_attr = '')
      #set ($toggle_popup_class = '')
      #set ($selected_attr = '')
      #set ($selected_class = '')

      #if ($nav_item.isSelected())
        #set ($selected_attr = 'aria-selected="true"')
        #set ($selected_class = '-current')
      #end

      #if ($nav_item.hasChildren())
        #set ($has_popup_class = '-has-dropdown')
        #set ($toggle_popup_attr = 'aria-haspopup="true"')
        #set ($toggle_popup_class = 'tg dropdown_toggle -nav')
      #end

      <li class="tg nav_item $selected_class $has_popup_class" id="layout_$nav_item.getLayoutId()" role="presentation">
        <a aria-labelledby="layout_$nav_item.getLayoutId()" href="$nav_item.getURL()" class="$toggle_popup_class" $toggle_popup_attr $nav_item.getTarget() role="menuitem">
          $nav_item.icon()
          $nav_item.getName()
        </a>

        #if ($nav_item.hasChildren())
          <ul class="tg dropdown_menu -nav" role="menu">
            #foreach ($nav_child in $nav_item.getChildren())
              #set ($child_selected_attr = '')
              #set ($child_selected_class = '')

              #if ($nav_child.isSelected())
                #set ($child_selected_attr = 'aria-selected="true"')
                #set ($child_selected_class = '-current')
              #end

              <li class="$child_selected_class" id="layout_$nav_child.getLayoutId()" $child_selected_attr role="presentation">
                <a aria-labelledby="layout_$nav_child.getLayoutId()" href="$nav_child.getURL()" $nav_child.getTarget() role="menuitem">$nav_child.getName()</a>
              </li>
            #end
          </ul>
        #end
      </li>
    #end
-->
  </ul>
126
</nav>