aboutsummaryrefslogtreecommitdiff
path: root/views/tag.html
blob: bc21fc39f2776c55f8dfcd28a5799f2bc907c6fd (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
{{ define "tag" }}
{{ $tagBaseURI := printf "/tag/%s/" .tag }}
<html>
	<head>
		{{ template "materialize" }}
		<title>grilist</title>
		<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	</head>
	<body>
		{{ template "navbar" . }}
		<div class="container">
			<div class="row">
			<h2>Grils mit dem Tag &quot;{{ .tag }}&quot;:</h2>
			<div class="row">
				{{ range .cards }}
					{{ template "card" . }}
				{{ end }}
			</div>
			<ul class="pagination center-align">
				<li class="{{ if eq .pagination.Current 1 }}disabled{{ else }}waves-effect{{ end }}"><a href="{{ $tagBaseURI }}{{ sub .pagination.Current 1 }}"><i class="material-icons">chevron_left</i></a></li>
				{{ range .pagination.Before }}
				<li class="wave-effect"><a href="{{ $tagBaseURI }}{{ . }}">{{ . }}</a></li>
				{{ end }}
				<li class="active"><a href="#!">{{ .pagination.Current }}</a></li>
				{{ range .pagination.After }}
				<li class="wave-effect"><a href="{{ $tagBaseURI }}{{ . }}">{{ . }}</a></li>
				{{ end }}
				<li class="{{ if eq .pagination.Current .pagination.MaxPage }}disabled{{ else }}waves-effect{{ end }}"><a href="{{ $tagBaseURI }}{{ add .pagination.Current 1 }}"><i class="material-icons">chevron_right</i></a></li>
				</ul>
			</div>
		</div>
	</body>
</html>
{{ end }}