summaryrefslogtreecommitdiff
path: root/skins/copland/header.txt
blob: 2aeef099aff598db581334623d59c7479b7f8c17 (plain) (blame)
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
<header class="site-header">
  <div class="container site-header-row">
    <a class="site-brand" href="$home$index_page">Copland</a>
    <div class="resource-title">
      <a href="$home$index_page">$<project_name></a>
      <span class="resource-separator" aria-hidden="true">/</span>
      <span class="resource-page">$<title></span>
    </div>
    <div class="account-nav">
      <th1>
        if {[info exists login]} {
          html "<a href='$home/login'>$login</a>"
        } else {
          html "<a href='$home/login'>Log in</a>"
        }
      </th1>
    </div>
  </div>
    <div class="resource-nav">
    <nav class="container mainmenu" aria-label="Repository">
      <th1>
        foreach {name url expr class} $mainmenu {
          if {![capexpr $expr]} continue
          if {[string match /chat* $url] || [string match chat* $url]
              || [string match /taglist* $url] || [string match taglist* $url]
              || [string match /forum* $url] || [string match forum* $url]
              || [string match /reportlist* $url] || [string match reportlist* $url]
              || [string match /ticket* $url] || [string match ticket* $url]
              || [string match /tkt* $url] || [string match tkt* $url]} continue
          if {[string match /* $url]} {
            if {[string match $url\[/?#\]* /$current_page/]} {
              set class "active $class"
            }
            set url $home$url
          }
          html "<a href='$url' class='$class'>$name</a>\n"
        }
      </th1>
    </nav>
  </div>
</header>
<h1 class="container page-title">$<title></h1>