update style
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/* reset from awsm */
|
||||
form input[type], form select, form textarea {
|
||||
form input[type],
|
||||
form select,
|
||||
form textarea {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* reset from awsm */
|
||||
form {
|
||||
max-width: 400px;
|
||||
margin-left: auto;
|
||||
@@ -13,7 +13,15 @@ form {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
/* reset from awsm */
|
||||
form input[type=password],
|
||||
form input[type=text] {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
form input[type=submit] {
|
||||
width: 8rem;
|
||||
}
|
||||
|
||||
div {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@@ -28,22 +36,40 @@ body {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
color: #0064c1;
|
||||
a,
|
||||
a:visited {
|
||||
color: #0064c1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
form input[type=password], form input[type=text] {
|
||||
margin-bottom: 0.25rem;
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
form input[type=submit] {
|
||||
width: 8rem;
|
||||
}
|
||||
|
||||
#content > * {
|
||||
#content>* {
|
||||
margin: 2rem 0;
|
||||
}
|
||||
|
||||
#header {
|
||||
border-bottom: 1px solid grey;
|
||||
padding-top: 3rem;
|
||||
}
|
||||
|
||||
#header img {
|
||||
max-width: 580px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#flashes {
|
||||
background-color: #fd1b1b1c;
|
||||
}
|
||||
|
||||
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
@@ -78,24 +104,6 @@ form input[type=submit] {
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
#header {
|
||||
border-bottom: 1px solid grey;
|
||||
padding-top: 3rem;
|
||||
}
|
||||
|
||||
#header img {
|
||||
max-width: 580px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#flashes {
|
||||
background-color: #fd1b1b1c;
|
||||
}
|
||||
|
||||
.angry {
|
||||
background-color: #f4433669;
|
||||
}
|
||||
@@ -103,3 +111,7 @@ form input[type=submit] {
|
||||
.happy {
|
||||
background-color: #4caf5069;
|
||||
}
|
||||
|
||||
i.mdi {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ template "title" }}</title>
|
||||
<link rel="stylesheet" href="https://cdn.materialdesignicons.com/3.6.95/css/materialdesignicons.min.css">
|
||||
<link rel="stylesheet" href="/admin/static/stylesheets/awsm.css">
|
||||
<link rel="stylesheet" href="/admin/static/stylesheets/main.css">
|
||||
<link rel="shortcut icon" href="/admin/static/images/favicon.ico" type="image/x-icon">
|
||||
@@ -24,8 +25,12 @@
|
||||
{{ template "content" . }}
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer" class="padded">
|
||||
<p>senan kelly, 2019 | <a href="https://github.com/sentriz/gonic">github</a></p>
|
||||
<div id="footer" class="padded mono">
|
||||
<p>
|
||||
senan kelly, 2019
|
||||
<span class="light">|</span>
|
||||
<a href="https://github.com/sentriz/gonic">github</a>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{{ define "user" }}
|
||||
<div class="padded box mono">
|
||||
<div class="box-title">
|
||||
<u>changing account password</u>
|
||||
<i class="mdi mdi-account-key"></i> changing account password
|
||||
</div>
|
||||
<form action="/admin/change_own_password_do" method="post">
|
||||
<input type="password" id="password_one" name="password_one" placeholder="new password">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{{ define "user" }}
|
||||
<div class="padded box mono">
|
||||
<div class="box-title">
|
||||
<u>changing {{ .SelectedUser.Name }}'s password</u>
|
||||
<i class="mdi mdi-account-key"></i> changing {{ .SelectedUser.Name }}'s password
|
||||
</div>
|
||||
<form action="/admin/change_password_do?user={{ .SelectedUser.Name }}" method="post">
|
||||
<input type="password" id="password_one" name="password_one" placeholder="new password">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{{ define "user" }}
|
||||
<div class="padded box mono">
|
||||
<div class="box-title">
|
||||
<u>create new user</u>
|
||||
<i class="mdi mdi-account-plus"></i> creating new user
|
||||
</div>
|
||||
<form action="/admin/create_user_do" method="post">
|
||||
<input type="text" id="username" name="username" placeholder="username">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{{ define "user" }}
|
||||
<div class="padded box mono">
|
||||
<div class="box-title">
|
||||
<u>stats</u>
|
||||
<i class="mdi mdi-chart-arc"></i> stats
|
||||
</div>
|
||||
<div class="right">
|
||||
<span class="pre">artists: {{ printf "%7v" .ArtistCount }}</span><br/>
|
||||
@@ -13,39 +13,46 @@
|
||||
</div>
|
||||
<div class="padded box mono">
|
||||
<div class="box-title">
|
||||
<u>last.fm</u>
|
||||
<i class="mdi mdi-lastfm"></i> last.fm
|
||||
</div>
|
||||
<div class="right">
|
||||
{{ if .User.IsAdmin }}
|
||||
{{ if .User.IsAdmin }}
|
||||
<a href="/admin/update_lastfm_api_key">update api key</a><br/>
|
||||
{{ end }}
|
||||
{{ if .CurrentLastFMAPIKey }}
|
||||
{{ if .User.LastFMSession }}
|
||||
<span class="light">current status</span> <span class="happy">linked</span> <a href="/admin/unlink_lastfm_do">unlink</a><br/>
|
||||
{{ else }}
|
||||
<span class="light">current status</span> <span class="angry">unlinked</span> <a href="https://www.last.fm/api/auth/?api_key={{ .CurrentLastFMAPIKey }}&cb={{ .RequestRoot }}/admin/link_lastfm_do">link</a><br/>
|
||||
{{ end }}
|
||||
{{ else if not .User.IsAdmin }}
|
||||
<span class="light">api key not set. please ask your admin to set it</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .CurrentLastFMAPIKey }}
|
||||
{{ if .User.LastFMSession }}
|
||||
<span class="light">current status</span>
|
||||
<span class="happy">linked</span>
|
||||
<a href="/admin/unlink_lastfm_do">unlink</a><br/>
|
||||
{{ else }}
|
||||
<span class="light">current status</span>
|
||||
<span class="angry">unlinked</span>
|
||||
<a href="https://www.last.fm/api/auth/?api_key={{ .CurrentLastFMAPIKey }}&cb={{ .RequestRoot }}/admin/link_lastfm_do">link</a><br/>
|
||||
{{ end }}
|
||||
{{ else if not .User.IsAdmin }}
|
||||
<span class="light">api key not set. please ask your admin to set it</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="padded box mono">
|
||||
{{ if .User.IsAdmin }}
|
||||
{{/* admin panel to manage all users */}}
|
||||
<div class="box-title">
|
||||
<u>users</u>
|
||||
<i class="mdi mdi-account-multiple"></i> users
|
||||
</div>
|
||||
<div class="right">
|
||||
{{ range $user := .AllUsers }}
|
||||
<i>{{ $user.Name }}</i> <span class="light">created</span> {{ $user.CreatedAt.Format "Jan 02, 2006" }} <a href="/admin/change_password?user={{ $user.Name }}">change password</a><br/>
|
||||
<i>{{ $user.Name }}</i>
|
||||
<span class="light">created</span>
|
||||
{{ $user.CreatedAt.Format "jan 02, 2006" }}
|
||||
<a href="/admin/change_password?user={{ $user.Name }}">change password</a><br/>
|
||||
{{ end }}
|
||||
<a href="/admin/create_user" class="button">create new</a>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{/* user panel to manage themselves */}}
|
||||
<div class="box-title">
|
||||
<u>your account</u>
|
||||
<i class="mdi mdi-account"></i> your account
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="/admin/change_own_password" class="button">change password</a>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{{ define "content" }}
|
||||
<div class="padded box mono">
|
||||
<div class="box-title">
|
||||
<u>please login</u>
|
||||
<i class="mdi mdi-login-variant"></i> login
|
||||
</div>
|
||||
<form action="/admin/login_do" method="post">
|
||||
<input type="text" id="username" name="username" placeholder="username">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{{ define "user" }}
|
||||
<div class="padded box mono">
|
||||
<div class="box-title">
|
||||
<u>updating last.fm api key</u>
|
||||
<i class="mdi mdi-key-change"></i> updating last.fm keys
|
||||
</div>
|
||||
<div class="right">
|
||||
<span class="light">current key</span> <i>{{ if .CurrentLastFMAPIKey }}{{ .CurrentLastFMAPIKey }}{{ else }}not set{{ end }}</i><br/>
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
{{ define "title" }}home{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<div class="side-padded light right">
|
||||
welcome <u>{{ .User.Name }}</u> | <a href="/admin/home">home</a> | <a href="/admin/logout">logout</a>
|
||||
<div class="side-padded light right mono">
|
||||
welcome {{ .User.Name }}
|
||||
|
|
||||
<a href="/admin/home">home</a>
|
||||
|
|
||||
<a href="/admin/logout">logout <i class="mdi mdi-logout-variant"></i></a>
|
||||
</div>
|
||||
{{ template "user" . }}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user