aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base.tmpl15
-rw-r--r--templates/index.tmpl15
2 files changed, 17 insertions, 13 deletions
diff --git a/templates/base.tmpl b/templates/base.tmpl
index 2ee087a..07331e2 100644
--- a/templates/base.tmpl
+++ b/templates/base.tmpl
@@ -1,4 +1,4 @@
-{{define "header"}}
+{{define "header" -}}
<!DOCTYPE html>
<html lang="en">
<head>
@@ -6,17 +6,18 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ListenDiary</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="static/style.css">
</head>
<body>
<header>
- <div id="center">
- <h1><a href="/">ListenDiary</a></h1>
- <a href="/settings" class="user">{{ .Session.UserName }}</a>
- </div>
+ <div id="center">
+ <h1><a href="/">ListenDiary</a></h1>
+ <a href="/settings" class="user">{{ .Session.UserName }}</a>
+ </div>
</header>
-<div id="main">
-{{end}}
+ <div id="main">
+{{- end}}
{{define "footer"}}
</div>
diff --git a/templates/index.tmpl b/templates/index.tmpl
index 7ee1801..8468b31 100644
--- a/templates/index.tmpl
+++ b/templates/index.tmpl
@@ -1,15 +1,18 @@
{{template "header" . }}
<h2>Recent Listens</h2>
<ul class="scrobbles">
-{{range .Scrobbles}}
+{{- range .Scrobbles}}
<li>
- <img src="{{or .Image "https://lastfm-img2.akamaized.net/i/u/64s/4128a6eb29f94943c9d206c08e625904.png"}}"
- height="40"/>
+ <img src="{{or .Image "https://lastfm-img2.akamaized.net/i/u/64s/4128a6eb29f94943c9d206c08e625904.png"}}"/>
<div>
- {{.Artist}} — {{.TrackName}}<br/>
- <span class="album">in {{.Album}}</span>
+ {{.Artist}} — {{.TrackName}}<br/>
+ <span class="album">in {{.Album}}</span>
+ </div>
+ <div class="like">
+ <span class="album">{{ago .Time}}</span><br/>
+ <i class="material-icons">favorite_border</i>
</div>
</li>
-{{end}}
+{{- end}}
</ul>
{{template "footer" }}