aboutsummaryrefslogtreecommitdiff
path: root/views/pages/gril.html
blob: eb6653721f1d997136bcf786c3de686cf6596ff7 (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
69
70
71
72
73
74
75
76
77
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
{{ define "gril" }}
{{ $gril := .gril }}
<html>
        <head>
				{{ template "materialize" }}
                <title>grilist</title>
				<link rel="stylesheet" href="/assets/css/gril.css" />
                <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
        </head>
        <body>
			{{ template "navbar" . }}
			<div class="container">
				<h1 id="gril-title">{{ $gril.RomajiName }}<small>{{ $gril.KanjiName }}</small></h1>
				{{ if $gril.OtherNames }}
				<p id="gril-alias">Auch bekannt als:
					{{ range $i, $alias := $gril.OtherNames }}{{ if $i }},{{ end }}
						{{ $alias }}{{ end }}
				</p>
				{{ end }}
				<div class="row center-align">
					<img src="/{{ $gril.ImagePath false }}" />
                    {{ if .user }}
                    <br /><br /><a class="waves-effect waves-light btn-large modal-trigger purple lighten-2" href="#modal_add_gril">Zu Liste hinzufügen</a>
                    {{ end }}
          
				</div>
				{{ range $tag := $gril.Tags }}
				<a href="/tag/{{ $tag }}"
				   alt="Mit &quot;{{ $tag }}&quot; getaggte Grils einsehen"
					 title="Mit &quot;{{ $tag }}&quot; getaggte Grils einsehen">
					<div class="chip gril-tag">
						{{ $tag }}
					</div>
				</a>
				{{ end }}
				<br />
				<br />
				<div class="row">
                    {{ if $gril.Birthday.Valid }}
                    <div class="col s6 m2 l2">
                        <div class="card">
                            <div class="card-content purple-text text-lighten-2 center-align">
                                <span class="card-title big">{{ $gril.Birthday.Value}}</span>
                                    <p>Geburtstag</p>
                            </div>
                        </div>
                    </div>
                    {{ else if $gril.Age.Valid }}
                    <div class="col s6 m2 l2">
                        <div class="card">
                            <div class="card-content purple-text text-lighten-2 center-align">
                                <span class="card-title big">{{ $gril.Age.Value }}</span>
                                    <p>Jahre alt</p>
                            </div>
                        </div>
                    </div>
                    {{ end }}
                    {{ if $gril.Lists }}
                    <div class="col s6 m2 l2">
                        <div class="card">
                            <div class="card-content center-big purple-text text-lighten-2 center-align">
                                <p>in</p>
                                <span class="card-title big">{{ len $gril.Lists}}</span>
                                <p>Liste{{ if ne (len $gril.Lists) 1 }}n{{ end }}</p>
                            </div>
                        </div>
                    </div>
                    {{ end }}
                    <div class="col s12 m4 l4">
                        <div class="card">
                            <div class="card-content purple-text text-lighten-2 center-align">
                                <span class="card-title big">{{ $gril.UpdatedAt.Format "Jan 02, 2006" }}</span>
                                    <p>aktualisiert</p>
                            </div>
                        </div>
                    </div>
				</div>
                
                {{ if .SimilarGrils }}
                <h1>Ähnliche Grils</h1>
                <div class="row">
                    {{ range .SimilarGrils }}
                    <div class="col s3">
                        {{ template "card_gril" . }}
                    </div>
                    {{ end }}
                </div>
                {{ end }}
			</div>
            
            
            {{ if .user }}
            <!-- Modal Structure -->
            <div id="modal_add_gril" class="modal bottom-sheet">
                <div class="modal-content">
                <h4>Zu Liste hinzufügen</h4>
                <div class="collection" id="modal-add-gril-content"></div>
                </div>
            </div>
            
            {{ template "materialize_js" }}
		    <script src="/assets/js/gril.js"></script>
            {{ end }}
        </body>
</html>
{{ end }}