Extract page layout
This commit is contained in:
@@ -1,67 +1,19 @@
|
||||
{{define "index"}}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Share Stats</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
background: #111;
|
||||
color: #eee;
|
||||
text-align: center;
|
||||
padding: 2em;
|
||||
}
|
||||
table {
|
||||
margin: auto;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th,
|
||||
td {
|
||||
padding: 0.5em 1em;
|
||||
border: 1px solid #444;
|
||||
}
|
||||
th {
|
||||
background-color: #222;
|
||||
}
|
||||
tr:nth-child(even) {
|
||||
background-color: #1a1a1a;
|
||||
}
|
||||
a {
|
||||
color: #0af;
|
||||
text-decoration: none;
|
||||
}
|
||||
li {
|
||||
display: inline;
|
||||
margin: 0 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>🌟 Pool Share Stats</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Range</th>
|
||||
<th>Highest Share Diff</th>
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
{{ range .Stats }}
|
||||
<tr>
|
||||
<td>{{ .TimeWindowName }}</td>
|
||||
<td>
|
||||
{{ if ne .SDiff 0.0 }} {{ humanDiff .SDiff }} {{ else }} - {{ end }}
|
||||
</td>
|
||||
<td>{{ formatCreateDate .Time }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/shares">View Shares</a></li>
|
||||
<li><a href="/top-shares">Top Shares</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
{{ define "title" }}Share Stats{{ end }} {{ define "header" }}🌟 Pool Share
|
||||
Stats{{ end }} {{ define "content" }}
|
||||
<table>
|
||||
<tr>
|
||||
<th>Range</th>
|
||||
<th>Highest Share Diff</th>
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
{{ range .Stats }}
|
||||
<tr>
|
||||
<td>{{ .TimeWindowName }}</td>
|
||||
<td>
|
||||
{{ if ne .SDiff 0.0 }} {{ humanDiff .SDiff }} {{ else }} - {{ end }}
|
||||
</td>
|
||||
<td>{{ formatCreateDate .Time }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
{{ end }} {{ template "layout" . }}
|
||||
|
||||
Reference in New Issue
Block a user