Added a footer, added the main title to the home page, minor improvements

This commit is contained in:
ChaoticByte 2024-08-29 13:10:23 +02:00
parent 1aa58ac243
commit b86b1688ea
No known key found for this signature in database
6 changed files with 40 additions and 4 deletions

View file

@ -19,6 +19,7 @@
</div>
{{- else -}}
<div class="home-main">
<h1>{{ .Title }}</h1>
<input type="text" id="search-box" placeholder="search">
<div id="search-results" class="hidden"></div>
<div class="toc" id="toc">
@ -29,5 +30,6 @@
</div>
<script src="/static/search.js"></script>
{{- end}}
<footer>{{ range .Footer }}<div>{{ . }}</div>{{ end }}</footer>
</body>
</html>

View file

@ -6,6 +6,7 @@ body {
flex-direction: column;
align-items: center;
width: 100vw;
min-height: 100vh;
font-family: sans-serif;
}
a:hover, a:focus { text-decoration: underline; }
@ -14,6 +15,22 @@ a {
text-decoration: none;
outline: none;
}
footer {
margin-top: auto;
padding: 1rem;
box-sizing: border-box;
display: flex;
justify-content: center;
flex-wrap: wrap;
}
footer > div {
margin: 0 .5rem;
}
footer, footer * {
color: #00000080 !important;
font-size: .9rem;
text-align: center;
}
.homebtn {
position: absolute;
@ -33,7 +50,8 @@ a {
}
.main > h1 {
font-size: 1.4rem;
margin-bottom: 0;
margin-top: 1.5rem;
margin-bottom: .5rem;
text-align: center;
}
.content { white-space: pre-line; }
@ -44,6 +62,9 @@ a {
box-sizing: border-box;
gap: 1rem;
}
.home-main > h1 {
font-size: 1.6rem;
}
.home-main, .toc, #search-results {
display: flex;
flex-direction: column;
@ -66,6 +87,9 @@ a {
@media only screen and (max-width: 750px) {
.main { margin-top: 4rem; }
.main > h1 {
margin-top: unset;
}
.main > h1, .content {
width: 90vw;
max-width: unset;