aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjan <jan@ruken.pw>2016-11-13 19:09:59 (UTC)
committerjan <jan@ruken.pw>2016-11-13 19:09:59 (UTC)
commitcaf03b52c0554b403138537cdfda5e5e3fad27c6 (patch)
treea0ebda312043e10e2b2c55efeeb811980ccb32ab
parenta7343c6a47276ef48eb6df93fba637c85e8f0f59 (diff)
10/10 anilist button
-rw-r--r--Makefile7
-rw-r--r--assets_src/img/Anilist.pngbin0 -> 2444 bytes
-rw-r--r--views/pages/user.html19
3 files changed, 15 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 754b1e4..873886a 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ IMPORTER_FILES = $(shell find tools/importer/ -type f -name '*.go')
7CSS_FILES = $(patsubst assets_src/%, assets/%, $(shell find assets_src/css/ -type f -name '*.css')) 7CSS_FILES = $(patsubst assets_src/%, assets/%, $(shell find assets_src/css/ -type f -name '*.css'))
8LESS_FILES = $(patsubst assets_src/%.less, assets/%.css, $(shell find assets_src/css/ -type f -name '*.less')) 8LESS_FILES = $(patsubst assets_src/%.less, assets/%.css, $(shell find assets_src/css/ -type f -name '*.less'))
9JS_FILES = $(patsubst assets_src/%, assets/%, $(shell find assets_src/js/ -maxdepth 1 -type f -name '*.js')) 9JS_FILES = $(patsubst assets_src/%, assets/%, $(shell find assets_src/js/ -maxdepth 1 -type f -name '*.js'))
10IMG_FILES = $(patsubst assets_src/%, assets/%, $(shell find assets_src/img/ -maxdepth 1 -type f))
10DEPFILES = $(patsubst assets/%, assets_src/%, $(JS_FILES:.js=.d)) 11DEPFILES = $(patsubst assets/%, assets_src/%, $(JS_FILES:.js=.d))
11 12
12BROWSERIFY := ./node_modules/browserify/bin/cmd.js 13BROWSERIFY := ./node_modules/browserify/bin/cmd.js
@@ -36,7 +37,11 @@ package.json: package.json.tpl config.mk
36 export VERSION=$(VERSION) &&\ 37 export VERSION=$(VERSION) &&\
37 $(BINARY_PATH)/template.awk < $< | sh > $@ 38 $(BINARY_PATH)/template.awk < $< | sh > $@
38 39
39assets: $(CSS_FILES) $(LESS_FILES) $(JS_FILES) 40assets: $(CSS_FILES) $(LESS_FILES) $(JS_FILES) $(IMG_FILES)
41
42assets/img/%: assets_src/img/%
43 @mkdir -p $(@D)
44 cp $< $@
40 45
41assets/css/%.css: assets_src/css/%.css 46assets/css/%.css: assets_src/css/%.css
42 @mkdir -p $(@D) 47 @mkdir -p $(@D)
diff --git a/assets_src/img/Anilist.png b/assets_src/img/Anilist.png
new file mode 100644
index 0000000..6529ad6
--- /dev/null
+++ b/assets_src/img/Anilist.png
Binary files differ
diff --git a/views/pages/user.html b/views/pages/user.html
index 5048502..c81b295 100644
--- a/views/pages/user.html
+++ b/views/pages/user.html
@@ -5,6 +5,7 @@
5 {{ template "materialize" }} 5 {{ template "materialize" }}
6 <title>{{ .DisplayUser.Name }} - grilist</title> 6 <title>{{ .DisplayUser.Name }} - grilist</title>
7 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
8 <link rel="stylesheet" href="/assets/css/user.css" />
8 </head> 9 </head>
9 <body> 10 <body>
10 {{ template "navbar" . }} 11 {{ template "navbar" . }}
@@ -19,19 +20,17 @@
19 {{ if (and (or $isCurrentUser .DisplayUser.HasExternalServices) .DisplayUser.ExternalServices) }} 20 {{ if (and (or $isCurrentUser .DisplayUser.HasExternalServices) .DisplayUser.ExternalServices) }}
20 <div class="row"> 21 <div class="row">
21 <h3>Externe Dienste</h3> 22 <h3>Externe Dienste</h3>
22 <div class="collection" id="external-service-list"> 23 <div class="col s12 m4 l3" id="external-service-list">
23 {{ $model := . }} 24 {{ $model := . }}
24 {{ range .DisplayUser.ExternalServices }} 25 {{ range .DisplayUser.ExternalServices }}
25 {{ if (or .IsEnabled $isCurrentUser) }} 26 {{ if (or .IsEnabled $isCurrentUser) }}
26 <a href="{{ if and .IsEnabled .ProfileLink }}{{ .ProfileLink }}{{ else }}#{{ end }}" {{ if not .IsEnabled }} data-auth-type="{{ .AuthType }}" data-auth-url="{{ .AuthorizeURL }}" data-couple-url="{{ .CoupleURL }}" {{ end }} class="collection-item purple-text text-lighten-2 {{ if not .IsEnabled }} authorizable {{ end }}"> 27 <a href="{{ if and .IsEnabled .ProfileLink }}{{ .ProfileLink }}{{ else }}#{{ end }}" {{ if not .IsEnabled }} data-auth-type="{{ .AuthType }}" data-auth-url="{{ .AuthorizeURL }}" data-couple-url="{{ .CoupleURL }}" {{ end }} class="service-btn btn blue-grey darken-4 {{ if not .IsEnabled }} authorizable {{ end }}">
27 <span class="badge {{ if not .IsEnabled }} purple lighten-2 new no-caption {{ end }}"> 28 <img src="/assets/img/{{ .Name }}.png" class="service-img" />
28 {{ if not .IsEnabled }} 29 {{ if not .IsEnabled }}
29 Hinzufügen! 30 <span class="service-txt black-text blue-grey darken-3 white-text" style="border-radius: 4px; padding: 4px;">Hinzufügen!</span>
30 {{ else }} 31 {{ else }}
31 {{ .UserName }} 32 <span class="service-txt">{{ .UserName }}</service>
32 {{ end }} 33 {{ end }}
33 </span>
34 {{ .Name }}
35 </a> 34 </a>
36 {{ end }} 35 {{ end }}
37 {{ end }} 36 {{ end }}