Use modern logo and colours.
This commit is contained in:
parent
13c4f4faea
commit
600cd7bf9b
@ -32,6 +32,7 @@ var (
|
||||
defaultWebServerDebug = false
|
||||
defaultBackupInterval = time.Minute * 3
|
||||
defaultVspClosed = false
|
||||
defaultDesignation = "Voting Service Provider"
|
||||
)
|
||||
|
||||
// config defines the configuration options for the VSP.
|
||||
@ -53,6 +54,7 @@ type config struct {
|
||||
BackupInterval time.Duration `long:"backupinterval" ini-name:"backupinterval" description:"Time period between automatic database backups. Valid time units are {s,m,h}. Minimum 30 seconds."`
|
||||
VspClosed bool `long:"vspclosed" ini-name:"vspclosed" description:"Closed prevents the VSP from accepting new tickets."`
|
||||
AdminPass string `long:"adminpass" ini-name:"adminpass" description:"Password for accessing admin page."`
|
||||
Designation string `long:"designation" ini-name:"designation" description:"Short name for the VSP. Customizes the logo in the top toolbar."`
|
||||
|
||||
// The following flags should be set on CLI only, not via config file.
|
||||
FeeXPub string `long:"feexpub" no-ini:"true" description:"Cold wallet xpub used for collecting fees. Should be provided once to initialize a vspd database."`
|
||||
@ -164,6 +166,7 @@ func loadConfig() (*config, error) {
|
||||
WebServerDebug: defaultWebServerDebug,
|
||||
BackupInterval: defaultBackupInterval,
|
||||
VspClosed: defaultVspClosed,
|
||||
Designation: defaultDesignation,
|
||||
}
|
||||
|
||||
// Pre-parse the command line options to see if an alternative config
|
||||
|
||||
@ -126,6 +126,7 @@ supportemail = example@test.com
|
||||
backupinterval = 3m0s
|
||||
vspclosed = false
|
||||
adminpass=12345
|
||||
designation = harness
|
||||
EOF
|
||||
|
||||
tmux new-window -t $TMUX_SESSION -n "vspd"
|
||||
|
||||
1
main.go
1
main.go
@ -75,6 +75,7 @@ func run(ctx context.Context) error {
|
||||
VspClosed: cfg.VspClosed,
|
||||
AdminPass: cfg.AdminPass,
|
||||
Debug: cfg.WebServerDebug,
|
||||
Designation: cfg.Designation,
|
||||
}
|
||||
err = webapi.Start(ctx, shutdownRequestChannel, &shutdownWg, cfg.Listen, db,
|
||||
dcrd, wallets, apiCfg)
|
||||
|
||||
@ -20,6 +20,7 @@ type vspStats struct {
|
||||
SupportEmail string
|
||||
VspClosed bool
|
||||
Debug bool
|
||||
Designation string
|
||||
}
|
||||
|
||||
var statsMtx sync.RWMutex
|
||||
@ -51,6 +52,7 @@ func updateVSPStats(db *database.VspDatabase, cfg Config) error {
|
||||
SupportEmail: cfg.SupportEmail,
|
||||
VspClosed: cfg.VspClosed,
|
||||
Debug: cfg.Debug,
|
||||
Designation: cfg.Designation,
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@ -57,7 +57,7 @@ html, body {
|
||||
font-family: "vspd", "Verdana", "sans-serif" !important;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
pre, code, .code {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: "vspd-code", "Courier New", "monospace" !important;
|
||||
}
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
body {
|
||||
background-color: #091440;
|
||||
color: white;
|
||||
background-color: #F3F5F6;
|
||||
color: #3D5873;
|
||||
}
|
||||
|
||||
.navbar-brand img {
|
||||
height: 70px;
|
||||
.logo--logo {
|
||||
padding-right: 5px;
|
||||
border-right: 0.3px solid #091440;
|
||||
}
|
||||
.logo--text {
|
||||
padding: 0 5px;
|
||||
font-size: 15px;
|
||||
line-height: 1;
|
||||
color: #091440;
|
||||
}
|
||||
|
||||
th {
|
||||
@ -15,7 +22,3 @@ td {
|
||||
font-family: "vspd-code";
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.code {
|
||||
font-family: "vspd-code";
|
||||
}
|
||||
|
||||
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1719 522"><defs><style>.a{fill:#fff;}.b{fill:url(#a);}.c{fill:url(#b);}</style><linearGradient id="a" x1="368.44" y1="296.18" x2="512.25" y2="213.16" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#36bdba"/><stop offset="0.93" stop-color="#39d8aa"/></linearGradient><linearGradient id="b" x1="241.1" y1="330.17" x2="359.1" y2="212.18" gradientUnits="userSpaceOnUse"><stop offset="0.2" stop-color="#2576f4"/><stop offset="1" stop-color="#3298da"/></linearGradient></defs><title>transparent background - primary - negative - gardient</title><path class="a" d="M995.21,347.55c-20.6,0-36.14-17.29-36.14-40.22v-.41c0-22.7,15.54-39.82,36.14-39.82,12.46,0,22.27,4.95,31.58,16l26.76-20.71c-14-18.47-32.94-27.46-57.94-27.46-41.85,0-73.41,31.13-73.41,72.4v.4c0,19.93,7.44,38.26,21,51.6,13.34,13.15,31.38,20.39,50.82,20.39,26.23,0,45-9.22,60.54-29.84l-26.67-19C1019.26,340.94,1010.21,347.55,995.21,347.55Z"/><path class="a" d="M1168.88,326.77c13-5.52,28.43-17.35,28.43-42.42v-.41c0-13.64-4-24.15-12.16-32.12-9.81-10-25.12-15.08-45.53-15.08h-66.14v140.1h35.93V333.2H1130l29,43.64h41.25l-33.62-49.11Zm-7.71-39.95c0,11.77-9,19.08-23.41,19.08h-28.35V267.33h28.15c15,0,23.61,6.95,23.61,19.08Z"/><polygon class="a" points="1255.58 320.05 1324.74 320.05 1324.74 292.55 1255.58 292.55 1255.58 266.74 1331.95 266.74 1331.95 236.77 1220.05 236.77 1220.05 376.86 1332.98 376.86 1332.98 346.89 1255.58 346.89 1255.58 320.05"/><path class="a" d="M1470.08,256.27c-14.06-12.76-34.33-19.5-58.61-19.5h-53.58V376.86h52.75c24.4,0,44.86-6.95,59.17-20.11,13.72-12.61,21-30,21-50.35V306C1490.78,285.75,1483.62,268.56,1470.08,256.27ZM1453.81,307c0,23.71-16,38.44-41.72,38.44h-18.27V268.17h18.27c25.74,0,41.72,14.73,41.72,38.44Z"/><path class="a" d="M835.15,235.08c-38.43,0-67.4,31.12-67.4,72.38,0,41.78,29.85,72.1,71,72.1,22.33,0,40.11-7.59,54.28-23.19l-14.19-12.59c-12.35,11.23-24.27,16-39.54,16-24.15,0-41.66-15.39-45.69-40.16l-.72-4.4h108c.14-1.74.25-3.51.25-5.32,0-20.76-5.92-39.5-16.68-52.77C872.79,242.72,855.73,235.08,835.15,235.08Zm-42.42,65.68.58-4.29c3.39-25.3,19.71-41.65,41.57-41.65,22.49,0,38.11,16,40.75,41.77l.43,4.17Z"/><path class="a" d="M665.29,234.79c-31.84,0-64.07,24.86-64.07,72.39,0,36,22,72.38,64.07,72.38,19.15,0,34.44-8.45,46.76-25.83L719,344v32.83h25.92V165.91H719V267.85l-6.8-8.76C699.47,242.74,684.14,234.79,665.29,234.79Zm54.22,72.39c0,29-19.86,50.89-46.19,50.89-26.6,0-45.9-21.4-45.9-50.89,0-30,18.87-50.9,45.9-50.9C699.65,256.28,719.51,278.16,719.51,307.18Z"/><path class="b" d="M453.89,320l57,57H454.83l-94-94H419a47,47,0,1,0,0-94H400.07l-47-47h63.81a94,94,0,0,1,94,94C510.88,274.12,494.07,304,453.89,320Z"/><path class="c" d="M289.86,199l-57-57h56.05l94,94H324.76a47,47,0,1,0,0,94h18.91l47,47h-63.8a94,94,0,0,1-94-94C232.87,244.88,249.67,215,289.86,199Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 2.8 KiB |
@ -2,10 +2,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<title>vspd</title>
|
||||
<title>Decred VSP - {{ .VspStats.Designation }}</title>
|
||||
|
||||
<link rel="stylesheet" href="/public/css/vendor/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="/public/css/fonts.css" />
|
||||
@ -42,9 +42,25 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav>
|
||||
<nav class="py-sm-3 px-sm-5 navbar">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/"><img src="/public/images/decred-logo.svg" /></a>
|
||||
<div class="">
|
||||
<a class="py-1 border-0 d-flex justify-content-start align-items-center" href="/">
|
||||
<div class="logo--logo">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="38" height="32" fill="none" viewBox="0 0 23 20">
|
||||
<path fill="#000" fill-opacity="0" d="M0 0h23v19.167H0z" />
|
||||
<path fill="#091440"
|
||||
d="M4.792 4.792L0 0h5.175l7.667 7.667H7.667a3.834 3.834 0 1 0 0 7.666h1.917l3.833 3.834h-5.75A7.667 7.667 0 0 1 0 11.5c0-3.11 1.533-5.615 4.792-6.708z" />
|
||||
<path fill="#091440"
|
||||
d="M18.208 14.375L23 19.167h-5.175L10.158 11.5h5.175a3.834 3.834 0 0 0 0-7.667h-1.917L9.583 0h5.75A7.667 7.667 0 0 1 23 7.667c0 3.109-1.533 5.615-4.792 6.708z" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="logo--text">
|
||||
VSP<br>
|
||||
<b>{{ .VspStats.Designation }}</b>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@ -56,8 +72,10 @@
|
||||
{{ end }}
|
||||
|
||||
{{ if .VspStats.VspClosed }}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
This VSP is closed and not accepting new tickets.
|
||||
<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}}
|
||||
|
||||
@ -26,6 +26,7 @@ type Config struct {
|
||||
VspClosed bool
|
||||
AdminPass string
|
||||
Debug bool
|
||||
Designation string
|
||||
}
|
||||
|
||||
const (
|
||||
@ -135,7 +136,7 @@ func Start(ctx context.Context, requestShutdownChan chan struct{}, shutdownWg *s
|
||||
if cfg.Debug {
|
||||
refresh = 1 * time.Second
|
||||
} else {
|
||||
refresh = 5 * time.Minute
|
||||
refresh = 1 * time.Minute
|
||||
}
|
||||
shutdownWg.Add(1)
|
||||
go func() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user