-
Notifications
You must be signed in to change notification settings - Fork 1
/
menu2.html
59 lines (59 loc) · 2.6 KB
/
menu2.html
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
{{ printf "{{if eq $view `1`}}" | safeHTML}}
{{ printf "{{$shownav := (page1 `last` $table $category $subcategory $pagenumber)}}" | safeHTML}}
{{ printf "{{if ne $shownav 0}}" | safeHTML}}
{{ printf "{{$thispageno := page1 `current` $table $category $subcategory $pagenumber}}" | safeHTML}}
{{ printf "{{$lastpageno := page1 `last` $table $category $subcategory $pagenumber}}" | safeHTML}}
{{ printf "{{$nextpageno := page1 `next` $table $category $subcategory $pagenumber}}" | safeHTML}}
{{ printf "{{$nextpagelink := page `next` $table $category $subcategory $pagenumber}}" | safeHTML}}
<nav class="navbar navbar-inverse">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li>
{{ printf " " | safeHTML}}
</li>
<li>
{{ printf "{{if gt $pagenumber 0}}" | safeHTML }}
{{ printf "<a href='{{page `first` $table $category $subcategory $pagenumber}}'>" | safeHTML }}
{{ printf "<<{{page1 `first` $table $category $subcategory $pagenumber}}" | safeHTML }}
{{ printf "</a>" | safeHTML }}
{{ printf "{{else}}" | safeHTML }}
{{ printf "<div style='color:black;'><<<{{page1 `first` $table $category $subcategory $pagenumber}}...</div>" | safeHTML }}
{{ printf "{{end}}" | safeHTML }}
</li>
<li>
{{ printf "{{if gt $pagenumber 0}}" | safeHTML }}
{{ printf "<a href='{{page `prev` $table $category $subcategory $pagenumber}}'>" | safeHTML }}
{{ printf "<{{page1 `prev` $table $category $subcategory $pagenumber}}" | safeHTML }}
{{ printf "</a>" | safeHTML }}
{{ printf "{{else}}" | safeHTML }}
{{ printf "<div style='color:black;'><{{page1 `first` $table $category $subcategory $pagenumber}}.</div>" | safeHTML }}
{{ printf "{{end}}" | safeHTML }}
</li>
<li>
{{ printf "<div style='color:black;'>*{{$pagenumber}}*</div>" | safeHTML }}
</li>
<li>
{{ printf "{{if lt $thispageno $lastpageno}}" | safeHTML }}
{{ printf "<a href='{{$nextpagelink}}'>" | safeHTML }}
{{ printf "<span>{{$nextpageno}}></span>" | safeHTML }}
{{ printf "</a>" | safeHTML }}
{{ printf "{{else}}" | safeHTML }}
{{ printf "<div style='color:black;'><span>.{{$nextpageno}}></span></div>" | safeHTML }}
{{ printf "{{end}}" | safeHTML }}
</li>
<li>
{{ printf "{{if gt $lastpageno $thispageno}}" | safeHTML }}
{{ printf "<a href='{{page `last` $table $category $subcategory $pagenumber}}'>" | safeHTML }}
{{ printf "<span>{{$lastpageno}}>></span>" | safeHTML }}
{{ printf "</a>" | safeHTML }}
{{ printf "{{else}}" | safeHTML }}
{{ printf "<div style='color:black;'><span>..{{$lastpageno}}>></span></div>" | safeHTML }}
{{ printf "{{end}}" | safeHTML }}
</li>
</ul>
</div>
</div>
</nav>
{{printf "{{end}}" | safeHTML}}
{{printf "{{end}}" | safeHTML}}