Skip to content

Commit f562094

Browse files
committed
add footer
1 parent d923075 commit f562094

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

client/html/index.tmpl

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,20 @@
2121
<link rel="shortcut icon" href="{[{ .favicon }]}" />
2222
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
2323
<link rel="stylesheet" href="/resources/site.css"/>
24-
{[{ if .brand }]}
2524
<style type="text/css">
2625
.watermark-brand {
2726
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='100px' width='300px' opacity='0.05'><text transform='translate(20, 100) rotate(-25)' fill='rgb(245,45,45)' font-size='46'>{[{ .brand }]}</text></svg>");
2827
}
28+
.brandLink {
29+
text-decoration: none;
30+
color: inherit;
31+
opacity: .3;
32+
}
2933
</style>
30-
{[{ end }]}
3134
</head>
3235
<body class="watermark-brand">
33-
<div id="main" class="container">
34-
<h3 class="mt-3">{[{ .description }]}</h3>
36+
<div id="main" class="container my-3">
37+
<h3>{[{ .description }]}</h3>
3538
{[{ if .logo }]}
3639
<div class="m-3">
3740
<img class="mini-chain-logo" src="{[{ .logo }]}" alt="logo" />
@@ -187,6 +190,13 @@ s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/{[{ .gener
187190
</div>
188191
</div>
189192
</div>
193+
<footer class="container mb-3 d-flex align-items-center justify-content-center">
194+
{[{ if eq .brand "Valoper.io" }]}
195+
<div><a class="brandLink" href="{[{ .brandLink }]}">Operating by {[{ .brand }]} with 🛡 and 💛️</a></div>
196+
{[{ else }]}
197+
<div><a class="brandLink" href="{[{ .brandLink }]}">Powered by {[{ .brand }]}</a></div>
198+
{[{ end }]}
199+
</footer>
190200
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
191201
</body>
192202
</html>

services/web_server/handle_web_page.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func HandleWebIndex(c *gin.Context) {
5353
c.HTML(http.StatusOK, "index.tmpl", gin.H{
5454
"host": c.Request.Host,
5555
"brand": cfg.Brand,
56+
"brandLink": fmt.Sprintf("https://%s", strings.TrimPrefix(strings.TrimPrefix(strings.TrimPrefix(cfg.Brand, "://"), "http://"), "https://")),
5657
"title": fmt.Sprintf("%s snapshot by %s", cfg.ChainName, cfg.Brand),
5758
"description": fmt.Sprintf("Snapshot data, live-peers, addrbook for %s by %s", cfg.ChainName, cfg.Brand),
5859
"chainName": cfg.ChainName,

0 commit comments

Comments
 (0)