Skip to content

Commit 4df3d54

Browse files
authored
Merge pull request #25 from bcdevtools/chores/update-watermark
chores: update watermark and add fade in/out logo
2 parents f1ad896 + bd262a8 commit 4df3d54

File tree

5 files changed

+93
-4
lines changed

5 files changed

+93
-4
lines changed

client/html/index.tmpl

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,42 @@
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"/>
2424
<style type="text/css">
25-
.watermark-brand {
26-
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>");
25+
#watermark-valoper {
26+
position: fixed;
27+
top: 0;
28+
left: 0;
29+
width: 100%;
30+
height: 100%;
31+
z-index: -1;
32+
pointer-events: none;
33+
background-image: url("resources/images/logo-1.svg");
34+
background-repeat: repeat;
35+
background-size: 50px 50px;
36+
opacity: .04;
2737
}
38+
39+
#landing-logo {
40+
position: fixed;
41+
top: 0;
42+
left: 0;
43+
width: 100%;
44+
height: 100%;
45+
pointer-events: none;
46+
background: url("resources/images/logo-1.svg") no-repeat center;
47+
z-index: 9;
48+
opacity: .01;
49+
}
50+
2851
.brandLink {
2952
text-decoration: none;
3053
color: inherit;
3154
opacity: .3;
3255
}
3356
</style>
3457
</head>
35-
<body class="watermark-brand">
58+
<body>
59+
<div id="watermark-valoper"></div>
60+
<div id="landing-logo" class="d-none"></div>
3661
<div id="main" class="container my-3">
3762
<h3>{[{ .description }]}</h3>
3863
{[{ if .logo }]}
@@ -201,5 +226,32 @@ s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/{[{ .gener
201226
{[{ end }]}
202227
</footer>
203228
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
229+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
230+
<script type="text/javascript">
231+
let opacity = 1;
232+
let inc = true;
233+
$(document).ready(function() {
234+
const landingLogo = $('#landing-logo');
235+
if (landingLogo) {
236+
landingLogo.removeClass('d-none');
237+
const intervalLogo = setInterval(() => {
238+
if (inc) {
239+
opacity += 1;
240+
if (opacity >= 100) {
241+
inc = false;
242+
}
243+
} else {
244+
opacity -= 2;
245+
if (opacity < 4) {
246+
landingLogo.remove();
247+
clearInterval(intervalLogo);
248+
return
249+
}
250+
}
251+
landingLogo.css('opacity', opacity/100);
252+
}, 10);
253+
}
254+
})
255+
</script>
204256
</body>
205257
</html>
-1.31 KB
Loading
Lines changed: 37 additions & 0 deletions
Loading
-47.9 KB
Binary file not shown.

client/statik/statik.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)