blob: b9198717ce6615d0fea96659661574958fe19118 (
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
|
{{ define "user" }}
{{ $isCurrentUser := isSameUser .DisplayUser .user }}
<html>
<head>
{{ template "materialize" }}
<title>{{ .DisplayUser.Name }} - grilist</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="/assets/css/user.css" />
</head>
<body>
{{ template "navbar" . }}
<div class="container">
<div class="row" style="margin-top: 50px; line-height: 500%; ">
<span style="font-size: 4.2rem; margin: 2.1rem 1rem 1.68rem 0;">{{ .DisplayUser.GetName }}</span>
{{ if $isCurrentUser }}
<a class="btn waves-effect waves-light indigo lighten-5 black-text" style="margin-top: -1.68rem" href="/settings">Einstellungen</a>
{{ end }}
</div>
<blockquote>zuletzt gesehen: {{ .DisplayUser.LastActivity.Format "Mon Jan _2 15:04:05 2006" }}</blockquote><br />
{{ if (and (or $isCurrentUser .DisplayUser.HasExternalServices) .DisplayUser.ExternalServices) }}
<div class="row">
<h3>Externe Dienste</h3>
<div class="col s12 m4 l3" id="external-service-list">
{{ $model := . }}
{{ range .DisplayUser.ExternalServices }}
{{ if (or .IsEnabled $isCurrentUser) }}
<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 }}">
<img alt="{{ .Name }}" src="/assets/img/{{ .Name }}.png" class="service-img" />
{{ if not .IsEnabled }}
<span class="service-txt black-text blue-grey darken-3 white-text" style="border-radius: 4px; padding: 4px;">Hinzufügen!</span>
{{ else }}
<span class="service-txt">{{ .UserName }}</service>
{{ end }}
</a>
{{ end }}
{{ end }}
</div>
</div>
{{ end }}
<div class="row">
<h3>Listen von {{ .DisplayUser.GetName }}</h3>
{{ range .Lists }}
{{ template "card" . }}
{{ end }}
</div>
</div>
<script src="/assets/js/user.js"></script>
</body>
</html>
{{ end }}
|