diff options
author | rtz12 <koenig@fagott.pw> | 2016-11-13 02:47:19 (UTC) |
---|---|---|
committer | rtz12 <koenig@fagott.pw> | 2016-11-13 02:47:19 (UTC) |
commit | c6df1d768240d14e8129b51d6916931f1c4f35db (patch) | |
tree | 4aba83338c8a732e0d40887f9cabe3aeaa1f6d26 /views | |
parent | c5517076f492e878a21123ae4bcb927f25bbc0a2 (diff) |
Anilist-API in Grilist implementiert
Diffstat (limited to 'views')
-rw-r--r-- | views/includes/materialize.html | 3 | ||||
-rw-r--r-- | views/pages/api_couple.html | 28 | ||||
-rw-r--r-- | views/pages/user.html | 30 |
3 files changed, 56 insertions, 5 deletions
diff --git a/views/includes/materialize.html b/views/includes/materialize.html index ab95286..100b4be 100644 --- a/views/includes/materialize.html +++ b/views/includes/materialize.html | |||
@@ -1,5 +1,6 @@ | |||
1 | {{define "materialize"}} | 1 | {{define "materialize"}} |
2 | <link rel="stylesheet" href="/assets/css/materialize.css"> | 2 | <link rel="stylesheet" href="/assets/css/materialize.css"> |
3 | <link rel="stylesheet" href="/assets/css/material_icons.css"> | 3 | <link rel="stylesheet" href="/assets/css/material_icons.css"> |
4 | <link rel="stylesheet" href="/assets/css/materialize_extend.css"> | ||
4 | <meta name="viewport" content="width=device_width, initial-scale=1.0" /> | 5 | <meta name="viewport" content="width=device_width, initial-scale=1.0" /> |
5 | {{end}} \ No newline at end of file | 6 | {{end}} |
diff --git a/views/pages/api_couple.html b/views/pages/api_couple.html new file mode 100644 index 0000000..b21d349 --- /dev/null +++ b/views/pages/api_couple.html | |||
@@ -0,0 +1,28 @@ | |||
1 | {{ define "api_couple" }} | ||
2 | <html> | ||
3 | <head> | ||
4 | {{ template "materialize" }} | ||
5 | <title>{{ .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 | {{ if .error }} | ||
12 | <div class="card-panel red darken-4"> | ||
13 | <span class="white-text">{{ .error }}</span> | ||
14 | </div> | ||
15 | {{ end }} | ||
16 | <form method="POST" action="couple"> | ||
17 | <blockquote> | ||
18 | {{ .name }} wurde in einem neuen Tab/Fenster geöffnet. Bitte bestätige dort Grilist und kopiere den Code in das unten stehende Feld. | ||
19 | </blockquote> | ||
20 | <input name="code" placeholder="Code" type="text" class="validate"> | ||
21 | <button class="btn waves-effect waves-light purple lighten-2" type="submit"> | ||
22 | {{ .name }} verbinden <i class="material-icons right">send</i> | ||
23 | </button> | ||
24 | </form> | ||
25 | </div> | ||
26 | </body> | ||
27 | </html> | ||
28 | {{ end }} | ||
diff --git a/views/pages/user.html b/views/pages/user.html index 2cf9c54..e654d96 100644 --- a/views/pages/user.html +++ b/views/pages/user.html | |||
@@ -1,4 +1,5 @@ | |||
1 | {{ define "user" }} | 1 | {{ define "user" }} |
2 | {{ $isCurrentUser := (and .user (eq .DisplayUser.ID .user.ID)) }} | ||
2 | <html> | 3 | <html> |
3 | <head> | 4 | <head> |
4 | {{ template "materialize" }} | 5 | {{ template "materialize" }} |
@@ -10,13 +11,33 @@ | |||
10 | <div class="container"> | 11 | <div class="container"> |
11 | <div class="row" style="margin-top: 50px; line-height: 500%; "> | 12 | <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 | <span style="font-size: 4.2rem; margin: 2.1rem 1rem 1.68rem 0;">{{ .DisplayUser.GetName }}</span> |
13 | {{ if .user }} | 14 | {{ if $isCurrentUser }} |
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> |
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 }} | 16 | {{ end }} |
18 | </div> | 17 | </div> |
19 | <blockquote>zuletzt gesehen: {{ .DisplayUser.LastActivity.Format "Mon Jan _2 15:04:05 2006" }}</blockquote><br /> | 18 | <blockquote>zuletzt gesehen: {{ .DisplayUser.LastActivity.Format "Mon Jan _2 15:04:05 2006" }}</blockquote><br /> |
19 | {{ if (and (or $isCurrentUser .DisplayUser.HasExternalServices) .DisplayUser.ExternalServices) }} | ||
20 | <div class="row"> | ||
21 | <h3>Externe Dienste</h3> | ||
22 | <div class="collection" id="external-service-list"> | ||
23 | {{ $model := . }} | ||
24 | {{ range .DisplayUser.ExternalServices }} | ||
25 | {{ if (or .IsEnabled $isCurrentUser) }} | ||
26 | <a href="#" {{ if not .IsEnabled }} data-auth-type="{{ .AuthType }}" data-auth-url="{{ .AuthorizeURL }}" data-couple-url="{{ .CoupleURL }}" {{ end }} class="collection-item {{ if not .IsEnabled }} authorizable {{ end }}"> | ||
27 | <span class="badge {{ if not .IsEnabled }} new no-caption {{ end }}"> | ||
28 | {{ if not .IsEnabled }} | ||
29 | Hinzufügen! | ||
30 | {{ else }} | ||
31 | {{ .UserName }} | ||
32 | {{ end }} | ||
33 | </span> | ||
34 | {{ .Name }} | ||
35 | </a> | ||
36 | {{ end }} | ||
37 | {{ end }} | ||
38 | </div> | ||
39 | </div> | ||
40 | {{ end }} | ||
20 | <div class="row"> | 41 | <div class="row"> |
21 | <h3>Listen von {{ .DisplayUser.GetName }}</h3> | 42 | <h3>Listen von {{ .DisplayUser.GetName }}</h3> |
22 | {{ range .Lists }} | 43 | {{ range .Lists }} |
@@ -24,6 +45,7 @@ | |||
24 | {{ end }} | 45 | {{ end }} |
25 | </div> | 46 | </div> |
26 | </div> | 47 | </div> |
48 | <script src="/assets/js/user.js"></script> | ||
27 | </body> | 49 | </body> |
28 | </html> | 50 | </html> |
29 | {{ end }} | 51 | {{ end }} |