diff options
Diffstat (limited to 'views/pages')
-rw-r--r-- | views/pages/create_list.html | 46 | ||||
-rw-r--r-- | views/pages/dashboard.html | 24 | ||||
-rw-r--r-- | views/pages/gril.html | 77 | ||||
-rw-r--r-- | views/pages/list.html | 55 | ||||
-rw-r--r-- | views/pages/login.html | 48 | ||||
-rw-r--r-- | views/pages/register.html | 52 | ||||
-rw-r--r-- | views/pages/tag.html | 34 | ||||
-rw-r--r-- | views/pages/user.html | 29 | ||||
-rw-r--r-- | views/pages/user_settings.html | 62 |
9 files changed, 427 insertions, 0 deletions
diff --git a/views/pages/create_list.html b/views/pages/create_list.html new file mode 100644 index 0000000..ead61dd --- /dev/null +++ b/views/pages/create_list.html | |||
@@ -0,0 +1,46 @@ | |||
1 | {{ define "create_list" }} | ||
2 | <html> | ||
3 | <head> | ||
4 | {{ template "materialize" }} | ||
5 | <title>grilist</title> | ||
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
7 | </head> | ||
8 | <body> | ||
9 | {{ template "navbar" . }} | ||
10 | <div class="container"> | ||
11 | <div class="row"> | ||
12 | <div class="col s12 m8 offset-m2 l6 offset-l3"> | ||
13 | {{ if .error }} | ||
14 | <div class="col s12 m8 offset-m2"> | ||
15 | <div class="card red lighten-2"> | ||
16 | <div class="card-content white-text"> | ||
17 | <span class="card-title">Fehler</span> | ||
18 | <p>Es gab einen Fehler: {{ .error }}</p> | ||
19 | </div> | ||
20 | </div> | ||
21 | </div> | ||
22 | {{ end }} | ||
23 | |||
24 | <form method="POST" name="create-list" action=""> | ||
25 | <div class="input-field col s12"> | ||
26 | <i class="material-icons prefix">list</i> | ||
27 | <input name="name" type="text" placeholder="Name" class="validate"/> | ||
28 | </div> | ||
29 | <div class="input-field col s12"> | ||
30 | <textarea id="description" name="description" class="materialize-textarea" style="padding-top: 32px"></textarea> | ||
31 | <label for="description">Beschreibung</label> | ||
32 | </div> | ||
33 | <div class="row col s12"> | ||
34 | <div class="right-align"> | ||
35 | <button class="btn waves-effect waves-light purple lighten-2" type="submit" name="action"> | ||
36 | Erstellen <i class="material-icons right">send</i> | ||
37 | </button> | ||
38 | </div> | ||
39 | </div> | ||
40 | </form> | ||
41 | </div> | ||
42 | </div> | ||
43 | </div> | ||
44 | </body> | ||
45 | </html> | ||
46 | {{ end }} | ||
diff --git a/views/pages/dashboard.html b/views/pages/dashboard.html new file mode 100644 index 0000000..045d4ab --- /dev/null +++ b/views/pages/dashboard.html | |||
@@ -0,0 +1,24 @@ | |||
1 | {{ define "dashboard" }} | ||
2 | <html> | ||
3 | <head> | ||
4 | {{ template "materialize" }} | ||
5 | <title>grilist</title> | ||
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
7 | </head> | ||
8 | <body> | ||
9 | {{ template "navbar" . }} | ||
10 | <div class="container"> | ||
11 | <div class="row"> | ||
12 | {{ range $category := .categories }} | ||
13 | <h2>{{ $category.Title }}</h2> | ||
14 | <div class="row"> | ||
15 | {{ range $category.Cards }} | ||
16 | {{ template "card" . }} | ||
17 | {{ end }} | ||
18 | </div> | ||
19 | {{ end }} | ||
20 | </div> | ||
21 | </div> | ||
22 | </body> | ||
23 | </html> | ||
24 | {{ end }} | ||
diff --git a/views/pages/gril.html b/views/pages/gril.html new file mode 100644 index 0000000..776f14f --- /dev/null +++ b/views/pages/gril.html | |||
@@ -0,0 +1,77 @@ | |||
1 | {{ define "gril" }} | ||
2 | {{ $gril := .gril }} | ||
3 | <html> | ||
4 | <head> | ||
5 | {{ template "materialize" }} | ||
6 | <title>grilist</title> | ||
7 | <link rel="stylesheet" href="/assets/css/gril.css" /> | ||
8 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
9 | </head> | ||
10 | <body> | ||
11 | {{ template "navbar" . }} | ||
12 | <div class="container"> | ||
13 | <h1 id="gril-title">{{ $gril.RomajiName }}<small>{{ $gril.KanjiName }}</small></h1> | ||
14 | {{ if $gril.OtherNames }} | ||
15 | <p id="gril-alias">Auch bekannt als: | ||
16 | {{ range $i, $alias := $gril.OtherNames }}{{ if $i }},{{ end }} | ||
17 | {{ $alias }}{{ end }} | ||
18 | </p> | ||
19 | {{ end }} | ||
20 | <div class="row center-align"> | ||
21 | <img src="/{{ $gril.ImagePath false }}" /> | ||
22 | </div> | ||
23 | {{ range $tag := $gril.Tags }} | ||
24 | <a href="/tag/{{ $tag }}" | ||
25 | alt="Mit "{{ $tag }}" getaggte Grils einsehen" | ||
26 | title="Mit "{{ $tag }}" getaggte Grils einsehen"> | ||
27 | <div class="chip gril-tag"> | ||
28 | {{ $tag }} | ||
29 | </div> | ||
30 | </a> | ||
31 | {{ end }} | ||
32 | <br /> | ||
33 | <br /> | ||
34 | <div class="row"> | ||
35 | {{ if $gril.Birthday.Valid }} | ||
36 | <div class="col s6 m2 l2"> | ||
37 | <div class="card"> | ||
38 | <div class="card-content purple-text text-lighten-2 center-align"> | ||
39 | <span class="card-title big">{{ $gril.Birthday.Value}}</span> | ||
40 | <p>Geburtstag</p> | ||
41 | </div> | ||
42 | </div> | ||
43 | </div> | ||
44 | {{ else if $gril.Age.Valid }} | ||
45 | <div class="col s6 m2 l2"> | ||
46 | <div class="card"> | ||
47 | <div class="card-content purple-text text-lighten-2 center-align"> | ||
48 | <span class="card-title big">{{ $gril.Age.Value }}</span> | ||
49 | <p>Jahre alt</p> | ||
50 | </div> | ||
51 | </div> | ||
52 | </div> | ||
53 | {{ end }} | ||
54 | {{ if $gril.Lists }} | ||
55 | <div class="col s6 m2 l2"> | ||
56 | <div class="card"> | ||
57 | <div class="card-content center-big purple-text text-lighten-2 center-align"> | ||
58 | <p>in</p> | ||
59 | <span class="card-title big">{{ len $gril.Lists}}</span> | ||
60 | <p>Liste{{ if ne (len $gril.Lists) 1 }}n{{ end }}</p> | ||
61 | </div> | ||
62 | </div> | ||
63 | </div> | ||
64 | {{ end }} | ||
65 | <div class="col s12 m4 l4"> | ||
66 | <div class="card"> | ||
67 | <div class="card-content purple-text text-lighten-2 center-align"> | ||
68 | <span class="card-title big">{{ $gril.UpdatedAt.Format "Jan 02, 2006" }}</span> | ||
69 | <p>aktualisiert</p> | ||
70 | </div> | ||
71 | </div> | ||
72 | </div> | ||
73 | </div> | ||
74 | </div> | ||
75 | </body> | ||
76 | </html> | ||
77 | {{ end }} | ||
diff --git a/views/pages/list.html b/views/pages/list.html new file mode 100644 index 0000000..c85e147 --- /dev/null +++ b/views/pages/list.html | |||
@@ -0,0 +1,55 @@ | |||
1 | {{ define "list" }} | ||
2 | {{ $list := .list }} | ||
3 | {{ $user := .user }} | ||
4 | <html> | ||
5 | <head> | ||
6 | {{ template "materialize" }} | ||
7 | <title>grilist</title> | ||
8 | <link rel="stylesheet" href="/assets/css/list.css" /> | ||
9 | <link rel="stylesheet" href="/assets/css/search.css" /> | ||
10 | <script src="/assets/js/search.js"></script> | ||
11 | <script src="/assets/js/list.js"></script> | ||
12 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
13 | </head> | ||
14 | <body> | ||
15 | {{ template "navbar" . }} | ||
16 | <div class="container"> | ||
17 | <h1>{{ $list.Name }}<small>von <a href="/user/{{ $list.Owner.ID }}/{{ $list.Owner.GetName}}">{{ $list.Owner.GetName }}</a></small></h1> | ||
18 | <blockquote>{{ $list.Description }}</blockquote><br /> | ||
19 | <div class="row"> | ||
20 | <div class="col s12 {{ if ($user) and eq $user.ID $list.Owner.ID }}l8{{ end }}"> | ||
21 | <ul id="gril-list" class="gril-list"> | ||
22 | {{ range $index, $lg := $list.Grils }} | ||
23 | {{ if $user }} | ||
24 | {{ template "list_gril" makeRangePair $index (makeObject "Gril" $lg "IsListOwner" (eq $user.ID $list.Owner.ID)) }} | ||
25 | {{ else }} | ||
26 | {{ template "list_gril" makeRangePair $index (makeObject "Gril" $lg "IsListOwner" false) }} | ||
27 | {{ end }} | ||
28 | {{ end }} | ||
29 | </ul> | ||
30 | </div> | ||
31 | {{ if $user}} | ||
32 | {{ if eq $user.ID $list.Owner.ID }} | ||
33 | <div class="col s12 l4"> | ||
34 | <div class="card-panel" style="margin-top: 14px"> | ||
35 | <span style="font-size: 130%">Gril hinzufügen</span><br /> | ||
36 | <form> | ||
37 | <div class="input-field"> | ||
38 | <input id="search" type="search" onKeyDown="instantSearch()" required> | ||
39 | <label for="search"><i class="material-icons">search</i></label> | ||
40 | <i class="material-icons">close</i> | ||
41 | </div> | ||
42 | </form> | ||
43 | </div> | ||
44 | <div class="col s10 offset-s1"> | ||
45 | <ul class="collection search-results" id="search-results"> | ||
46 | </ul> | ||
47 | </div> | ||
48 | </div> | ||
49 | {{ end }} | ||
50 | {{ end }} | ||
51 | </div> | ||
52 | </div> | ||
53 | </body> | ||
54 | </html> | ||
55 | {{ end }} | ||
diff --git a/views/pages/login.html b/views/pages/login.html new file mode 100644 index 0000000..65c4857 --- /dev/null +++ b/views/pages/login.html | |||
@@ -0,0 +1,48 @@ | |||
1 | {{ define "login" }} | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>Grilist - Login</title> | ||
5 | {{ template "materialize" }} | ||
6 | </head> | ||
7 | <body> | ||
8 | <div class="row"> | ||
9 | <div class="col s12 m6 offset-m3 l4 offset-l4"> | ||
10 | <div class="row"> | ||
11 | <h1 class="center-align">grilist</h1> | ||
12 | {{ if .error }} | ||
13 | <div class="col s12 m8 offset-m2"> | ||
14 | <div class="card red lighten-2"> | ||
15 | <div class="card-content white-text"> | ||
16 | <span class="card-title">Fehler</span> | ||
17 | <p>Es gab einen Fehler: {{ .error }}</p> | ||
18 | </div> | ||
19 | </div> | ||
20 | </div> | ||
21 | {{ end }} | ||
22 | |||
23 | <form method="POST" name="login" action="#"> | ||
24 | <div class="input-field col s12"> | ||
25 | <i class="material-icons prefix">perm_identity</i> | ||
26 | <input name="username" type="text" placeholder="Benutzername" class="validate" value="{{ .previous_user }}"/> | ||
27 | </div> | ||
28 | <div class="input-field col s12"> | ||
29 | <i class="material-icons prefix">lock_outline</i> | ||
30 | <input name="password" type="password" placeholder="Passwort" class="validate" /> | ||
31 | </div> | ||
32 | <div class="row col s12"> | ||
33 | <div class="col s4"> | ||
34 | <a class="waves-effect waves-teal btn-flat" href="/register">Registrieren</a> | ||
35 | </div> | ||
36 | <div class="right-align"> | ||
37 | <button class="btn waves-effect waves-light purple lighten-2" type="submit" name="action"> | ||
38 | Login <i class="material-icons right">send</i> | ||
39 | </button> | ||
40 | </div> | ||
41 | </div> | ||
42 | </form> | ||
43 | </div> | ||
44 | </div> | ||
45 | </div> | ||
46 | </body> | ||
47 | </html> | ||
48 | {{ end }} | ||
diff --git a/views/pages/register.html b/views/pages/register.html new file mode 100644 index 0000000..b946518 --- /dev/null +++ b/views/pages/register.html | |||
@@ -0,0 +1,52 @@ | |||
1 | {{ define "register" }} | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>Grilist - Registration</title> | ||
5 | {{ template "materialize" }} | ||
6 | </head> | ||
7 | <body> | ||
8 | <div class="row"> | ||
9 | <div class="col s12 m6 offset-m3 l4 offset-l4"> | ||
10 | <div class="row"> | ||
11 | <h1 class="center-align">grilist</h1> | ||
12 | {{ if .error }} | ||
13 | <div class="col s12 m8 offset-m2"> | ||
14 | <div class="card red lighten-2"> | ||
15 | <div class="card-content white-text"> | ||
16 | <span class="card-title">Fehler</span> | ||
17 | <p>Es gab einen Fehler: {{ .error }}</p> | ||
18 | </div> | ||
19 | </div> | ||
20 | </div> | ||
21 | {{ end }} | ||
22 | |||
23 | <form method="POST" name="registration" action="#"> | ||
24 | <div class="input-field col s12"> | ||
25 | <i class="material-icons prefix">perm_identity</i> | ||
26 | <input name="username" type="text" placeholder="Username" class="validate" value="{{ .previous_user }}"/> | ||
27 | </div> | ||
28 | <div class="input-field col s12"> | ||
29 | <i class="material-icons prefix">lock_outline</i> | ||
30 | <input name="password" type="password" placeholder="Password" class="validate" /> | ||
31 | </div> | ||
32 | <div class="input-field col s12"> | ||
33 | <i class="material-icons prefix">email</i> | ||
34 | <input name="email" type="email" placeholder="E-Mail" class="validate"> | ||
35 | </div> | ||
36 | <div class="row col s12"> | ||
37 | <div class="col s4"> | ||
38 | <a class="waves-effect waves-teal btn-flat" href="/">Cancel</a> | ||
39 | </div> | ||
40 | <div class="right-align"> | ||
41 | <button class="btn waves-effect waves-light purple lighten-2" type="submit" name="action"> | ||
42 | Register <i class="material-icons right">send</i> | ||
43 | </button> | ||
44 | </div> | ||
45 | </div> | ||
46 | </form> | ||
47 | </div> | ||
48 | </div> | ||
49 | </div> | ||
50 | </body> | ||
51 | </html> | ||
52 | {{ end }} \ No newline at end of file | ||
diff --git a/views/pages/tag.html b/views/pages/tag.html new file mode 100644 index 0000000..d0d4180 --- /dev/null +++ b/views/pages/tag.html | |||
@@ -0,0 +1,34 @@ | |||
1 | {{ define "tag" }} | ||
2 | {{ $tagBaseURI := printf "/tag/%s/" .tag }} | ||
3 | <html> | ||
4 | <head> | ||
5 | {{ template "materialize" }} | ||
6 | <title>grilist</title> | ||
7 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
8 | </head> | ||
9 | <body> | ||
10 | {{ template "navbar" . }} | ||
11 | <div class="container"> | ||
12 | <div class="row"> | ||
13 | <h2>Grils mit dem Tag "{{ .tag }}":</h2> | ||
14 | <div class="row"> | ||
15 | {{ range .cards }} | ||
16 | {{ template "card" . }} | ||
17 | {{ end }} | ||
18 | </div> | ||
19 | <ul class="pagination center-align"> | ||
20 | <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> | ||
21 | {{ range .pagination.Before }} | ||
22 | <li class="wave-effect"><a href="{{ $tagBaseURI }}{{ . }}">{{ . }}</a></li> | ||
23 | {{ end }} | ||
24 | <li class="active"><a href="#!">{{ .pagination.Current }}</a></li> | ||
25 | {{ range .pagination.After }} | ||
26 | <li class="wave-effect"><a href="{{ $tagBaseURI }}{{ . }}">{{ . }}</a></li> | ||
27 | {{ end }} | ||
28 | <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> | ||
29 | </ul> | ||
30 | </div> | ||
31 | </div> | ||
32 | </body> | ||
33 | </html> | ||
34 | {{ end }} | ||
diff --git a/views/pages/user.html b/views/pages/user.html new file mode 100644 index 0000000..2cf9c54 --- /dev/null +++ b/views/pages/user.html | |||
@@ -0,0 +1,29 @@ | |||
1 | {{ define "user" }} | ||
2 | <html> | ||
3 | <head> | ||
4 | {{ template "materialize" }} | ||
5 | <title>{{ .DisplayUser.Name }} - grilist</title> | ||
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
7 | </head> | ||
8 | <body> | ||
9 | {{ template "navbar" . }} | ||
10 | <div class="container"> | ||
11 | <div class="row" style="margin-top: 50px; line-height: 500%; "> | ||
12 | <span style="font-size: 4.2rem; margin: 2.1rem 1rem 1.68rem 0;">{{ .DisplayUser.GetName }}</span> | ||
13 | {{ if .user }} | ||
14 | {{ if eq .DisplayUser.ID .user.ID }} | ||
15 | <a class="btn waves-effect waves-light indigo lighten-5 black-text" style="margin-top: -1.68rem" href="/settings">Einstellungen</a> | ||
16 | {{ end }} | ||
17 | {{ end }} | ||
18 | </div> | ||
19 | <blockquote>zuletzt gesehen: {{ .DisplayUser.LastActivity.Format "Mon Jan _2 15:04:05 2006" }}</blockquote><br /> | ||
20 | <div class="row"> | ||
21 | <h3>Listen von {{ .DisplayUser.GetName }}</h3> | ||
22 | {{ range .Lists }} | ||
23 | {{ template "card" . }} | ||
24 | {{ end }} | ||
25 | </div> | ||
26 | </div> | ||
27 | </body> | ||
28 | </html> | ||
29 | {{ end }} | ||
diff --git a/views/pages/user_settings.html b/views/pages/user_settings.html new file mode 100644 index 0000000..cf350a5 --- /dev/null +++ b/views/pages/user_settings.html | |||
@@ -0,0 +1,62 @@ | |||
1 | {{ define "user_settings" }} | ||
2 | <html> | ||
3 | <head> | ||
4 | {{ template "materialize" }} | ||
5 | <title>{{ .user.Name }} - grilist</title> | ||
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
7 | </head> | ||
8 | <body> | ||
9 | {{ template "navbar" . }} | ||
10 | <div class="container"> | ||
11 | <h1>{{ .user.Name }}</h1> | ||
12 | <div class="row"> | ||
13 | <div class="col s12 m6 offset-m3 l4 offset-l4"> | ||
14 | {{ if .error }} | ||
15 | <div class="col s12 m8 offset-m2"> | ||
16 | <div class="card red lighten-2"> | ||
17 | <div class="card-content white-text"> | ||
18 | <span class="card-title">Fehler</span> | ||
19 | <p>Es gab einen Fehler: {{ .error }}</p> | ||
20 | </div> | ||
21 | </div> | ||
22 | </div> | ||
23 | {{ end }} | ||
24 | <form method="POST" name="login" action="#"> | ||
25 | <div class="input-field col s12"> | ||
26 | <blockquote>Standardmäßig wird dein Benutzername angezeigt. Das Ändern des Anzeigenamen erlaubt dir, dass dich andere Nutzer unter einem anderen Namen sehen.</blockquote> | ||
27 | <i class="material-icons prefix">perm_identity</i> | ||
28 | <input name="username" type="text" placeholder="Anzeigename" class="validate" value="{{ if .user.DisplayName.Valid }}{{ .user.DisplayName.Value }}{{ end }}"/> | ||
29 | </div> | ||
30 | <br /><br /> | ||
31 | <h3>Passwort ändern</h3> | ||
32 | <blockquote>Dein Passwort muss eine Länge von mindestens benis Zeichen haben.</blockquote> | ||
33 | <div class="input-field col s12"> | ||
34 | <i class="material-icons prefix">lock_outline</i> | ||
35 | <input name="password_current" type="password" placeholder="Aktuelles Passwort" class="validate" /> | ||
36 | </div> | ||
37 | <div class="input-field col s12"> | ||
38 | <i class="material-icons prefix">lock</i> | ||
39 | <input name="password_new" type="password" placeholder="Neues Passwort" class="validate" /> | ||
40 | </div> | ||
41 | <div class="input-field col s12"> | ||
42 | <i class="material-icons prefix">lock</i> | ||
43 | <input name="password_new2" type="password" placeholder="Neues Passwort (wiederholen)" class="validate" /> | ||
44 | </div> | ||
45 | <div class="row col s12 right-align"> | ||
46 | <button class="btn waves-effect waves-light purple lighten-2" type="submit" name="action"> | ||
47 | Speichern <i class="material-icons right">send</i> | ||
48 | </button> | ||
49 | <br /><br /> | ||
50 | <hr /> | ||
51 | <br /> | ||
52 | </div> | ||
53 | <div class="row col s12"> | ||
54 | <a class="waves-effect waves-light red lighten-1 btn-large valign-wrapper" style="width: 100%; height: 80px; padding-top: 12px" href="#">Löscht mich!</a> | ||
55 | </div> | ||
56 | </form> | ||
57 | </div> | ||
58 | </div> | ||
59 | </div> | ||
60 | </body> | ||
61 | </html> | ||
62 | {{ end }} | ||