Modernize homepage
This commit is contained in:
parent
600cd7bf9b
commit
03a5ef4fd1
@ -1,6 +1,15 @@
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
background-color: #F3F5F6;
|
||||
background-color: #F9FAFA;
|
||||
color: #3D5873;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.page-content {
|
||||
flex: 1 0 auto;
|
||||
}
|
||||
|
||||
.logo--logo {
|
||||
@ -14,11 +23,47 @@ body {
|
||||
color: #091440;
|
||||
}
|
||||
|
||||
th {
|
||||
white-space: nowrap;
|
||||
.vsp-overview {
|
||||
color: #8997A5;
|
||||
background-color: #ffffff;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
td {
|
||||
font-family: "vspd-code";
|
||||
.vsp-overview h1 {
|
||||
color: #3D5873;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.vsp-stats .stat-title {
|
||||
font-size: 14px;
|
||||
color: #596D81;
|
||||
}
|
||||
|
||||
.vsp-stats .stat-value {
|
||||
font-size: 24px;
|
||||
color: #091440;
|
||||
}
|
||||
|
||||
footer {
|
||||
flex-shrink: 0;
|
||||
font-size: 0.8rem;
|
||||
background-color: #091440;
|
||||
color: #8997a5;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
footer .code {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.footer__credit {
|
||||
background-color: rgba(237,239,241,.1);
|
||||
text-align: right;
|
||||
color: #8997a5;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.footer__credit {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,27 @@
|
||||
{{ define "footer" }}
|
||||
</div>
|
||||
|
||||
</div> <!-- page-content -->
|
||||
|
||||
<footer class="row m-0">
|
||||
<div class="col-md-8 col-12 d-flex justify-content-center align-items-center">
|
||||
<p class="py-4 m-0">
|
||||
<strong>Stats updated:</strong> {{ .VspStats.UpdateTime }}
|
||||
<br />
|
||||
<strong>Support:</strong> <a href="mailto:{{ .VspStats.SupportEmail }}" rel="noopener noreferrer">{{ .VspStats.SupportEmail }}</a>
|
||||
<br />
|
||||
<strong>VSP public key:</strong> <span class="code">{{ printf "%x" .VspStats.PubKey }}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-12 footer__credit d-flex justify-content-center align-items-center">
|
||||
<p class="py-4 m-0">
|
||||
Decred Developers | 2020
|
||||
<br />
|
||||
The source code is available on <a href="https://github.com/decred/vspd" target="_blank" rel="noopener noreferrer">GitHub</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
@ -42,6 +42,8 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="page-content">
|
||||
|
||||
<nav class="py-sm-3 px-sm-5 navbar">
|
||||
<div class="container">
|
||||
<div class="">
|
||||
@ -64,18 +66,12 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
{{ if .VspStats.Debug }}
|
||||
<div class="container">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
Web server is running in debug mode - don't do this in production!
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .VspStats.VspClosed }}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<h4 class="alert-heading">This Voting Service Provider is closed</h4>
|
||||
A closed VSP will still vote on tickets with already paid fees, but will not accept new any tickets.
|
||||
Visit <a href="https://decred.org/vsp/" class="alert-link">decred.org</a> to find a new VSP.
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{end}}
|
||||
|
||||
@ -1,5 +1,28 @@
|
||||
{{ template "header" . }}
|
||||
|
||||
{{ template "vsp-stats" .VspStats }}
|
||||
<div class="vsp-overview pt-4 pb-3 mb-3">
|
||||
<div class="container">
|
||||
|
||||
{{ if .VspStats.VspClosed }}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<h4 class="alert-heading">This Voting Service Provider is closed</h4>
|
||||
A closed VSP will still vote on tickets with already paid fees, but will not accept new any tickets.
|
||||
Visit <a href="https://decred.org/vsp/" class="alert-link" target="_blank" rel="noopener noreferrer">decred.org</a> to find a new VSP.
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<h1>VSP Overview</h1>
|
||||
|
||||
<p class="pt-1 pb-2">A Voting Service Provider (VSP) maintains a pool of always-online voting wallets,
|
||||
and allows Decred ticket holders to use these wallets to vote their tickets in exchange for a small fee.
|
||||
VSPs are completely non-custodial - they never hold, manage, or have access to any user funds.
|
||||
Visit <a href="https://docs.decred.org/proof-of-stake/overview/" target="_blank" rel="noopener noreferrer">docs.decred.org</a>
|
||||
to find out more about VSPs, tickets, and voting.
|
||||
</p>
|
||||
|
||||
{{ template "vsp-stats" .VspStats }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "footer" . }}
|
||||
|
||||
@ -1,36 +1,27 @@
|
||||
{{ define "vsp-stats" }}
|
||||
|
||||
<section>
|
||||
<h3>VSP Stats</h3>
|
||||
<div class="row vsp-stats">
|
||||
|
||||
<p><em>Last updated: {{ .UpdateTime }}</em></p>
|
||||
<div class="col-6 col-sm-4 col-lg-2 py-3">
|
||||
<div class="stat-title">Total tickets</div>
|
||||
<div class="stat-value" id="vsp-hash-rate">{{ .TotalTickets }}</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-dark">
|
||||
<tr>
|
||||
<th>Total tickets</th>
|
||||
<td>{{ .TotalTickets }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Fee confirmed tickets</th>
|
||||
<td>{{ .FeeConfirmedTickets }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>VSP Fee</th>
|
||||
<td>{{ .VSPFee }}% of vote reward</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Network</th>
|
||||
<td>{{ .Network }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Support</th>
|
||||
<td>{{ .SupportEmail }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pubkey</th>
|
||||
<td class="code">{{ printf "%x" .PubKey }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
<div class="col-6 col-sm-4 col-lg-2 py-3">
|
||||
<div class="stat-title">Fee confirmed tickets</div>
|
||||
<div class="stat-value" id="last-work-height">{{ .FeeConfirmedTickets }}</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-sm-4 col-lg-2 py-3">
|
||||
<div class="stat-title">VSP Fee</div>
|
||||
<div class="stat-value">{{ .VSPFee }}%</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-sm-4 col-lg-2 py-3">
|
||||
<div class="stat-title">Network</div>
|
||||
<div class="stat-value">{{ .Network }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user