Visual improvements.
This commit is contained in:
parent
007f775f8b
commit
d0e6ad2c8e
3 changed files with 60 additions and 17 deletions
|
@ -1,11 +1,17 @@
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Turret+Road:wght@200;300;400;500;700;800&display=swap');
|
||||||
|
|
||||||
html, body {
|
html {
|
||||||
height: 100%;
|
|
||||||
background: #0F2027;
|
background: #0F2027;
|
||||||
background: -webkit-linear-gradient(to bottom left, #2C5364, #203A43, #0F2027);
|
background: -webkit-linear-gradient(to bottom left, #2C5364, #203A43, #0F2027);
|
||||||
background: linear-gradient(to bottom left, #2C5364, #203A43, #0F2027);
|
background: linear-gradient(to bottom left, #2C5364, #203A43, #0F2027);
|
||||||
|
|
||||||
|
min-height: 100vh;
|
||||||
|
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
|
||||||
color: white;
|
color: white;
|
||||||
|
|
||||||
font-family: 'Monsterrat', sans-serif;
|
font-family: 'Monsterrat', sans-serif;
|
||||||
|
@ -13,14 +19,49 @@ html, body {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make anchor tags look like buttons */
|
img, video {
|
||||||
a {
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
background: rgba(0,0,0,0.5);
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
& > a,span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
background: #185c7a;
|
background: #5421a6;
|
||||||
color: white;
|
color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: 2px solid white;
|
border: 2px solid white;
|
||||||
|
}
|
||||||
|
& > a {
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
|
background: #0f3a4a;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #0d5d7a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& > .logo {
|
||||||
|
position: absolute;
|
||||||
|
left: 9px;
|
||||||
|
bottom: 9px;
|
||||||
|
|
||||||
|
font-size: 2.5rem;
|
||||||
|
|
||||||
|
font-family: 'Turret Road', serif;
|
||||||
|
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -2,16 +2,17 @@
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Viewing {{filename}}</title>
|
<title>{{siteName}} - {{filename}}</title>
|
||||||
{{ogTags}}
|
{{ogTags}}
|
||||||
|
|
||||||
<link rel="stylesheet" href="/styles.css">
|
<link rel="stylesheet" href="/styles.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>Viewing {{filename}}</h1>
|
<div class="info">
|
||||||
<a download="{{filename}}" href="/f/{{joinedPath}}">Download File</a>
|
<div class="logo">{{siteName}}</div>
|
||||||
<hr />
|
<span>{{filename}}</span> <a download="{{filename}}" href="/f/{{joinedPath}}">Download File</a>
|
||||||
|
</div>
|
||||||
{{fileContent}}
|
{{fileContent}}
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
1
index.js
1
index.js
|
@ -167,6 +167,7 @@ fastify.get('/s/:date/:filename', async (request, reply) => {
|
||||||
.replaceAll('{{ogTags}}', ogTags)
|
.replaceAll('{{ogTags}}', ogTags)
|
||||||
.replaceAll('{{filename}}', filename)
|
.replaceAll('{{filename}}', filename)
|
||||||
.replaceAll('{{joinedPath}}', joinedPath)
|
.replaceAll('{{joinedPath}}', joinedPath)
|
||||||
|
.replaceAll('{{siteName}}', process.env.SITE_NAME || 'CamDN')
|
||||||
|
|
||||||
reply.code(200).header('Content-Type', 'text/html').send(html)
|
reply.code(200).header('Content-Type', 'text/html').send(html)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue