Implement top shares page
This commit is contained in:
84
templates/top_shares.html
Normal file
84
templates/top_shares.html
Normal file
@@ -0,0 +1,84 @@
|
||||
{{ define "top_shares" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>ckpool Top Shares</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
background: #111;
|
||||
color: #eee;
|
||||
padding: 20px;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
th,
|
||||
td {
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #444;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
th {
|
||||
background-color: #222;
|
||||
}
|
||||
a.page-link {
|
||||
margin: 0 5px;
|
||||
text-decoration: none;
|
||||
color: #0af;
|
||||
}
|
||||
a.page-link.current {
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
a {
|
||||
color: #0af;
|
||||
text-decoration: none;
|
||||
}
|
||||
li {
|
||||
display: inline;
|
||||
margin: 0 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>☀️ Pool Top Shares</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Worker</th>
|
||||
<th>Address</th>
|
||||
<th>SDiff</th>
|
||||
<th>Hash</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .Shares }}
|
||||
<tr>
|
||||
<td>{{ formatCreateDate .CreateDate }}</td>
|
||||
<td>{{ .WorkerName }}</td>
|
||||
<td>{{ .Address }}</td>
|
||||
<td>{{ humanDiff .SDiff }}</td>
|
||||
<td><code style="font-size: small">{{ .Hash }}</code></td>
|
||||
</tr>
|
||||
{{ else }}
|
||||
<tr>
|
||||
<td colspan="6">No shares found.</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</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 }}
|
||||
Reference in New Issue
Block a user