Browse Source

Add a footer

main
Charlotte Som 7 months ago
parent
commit
9a57e6405a
  1. 3
      build_src/main.rs
  2. 40
      src/assets/styles.css
  3. 9
      templates/_footer.html.j2
  4. 2
      templates/main_page.html.j2

3
build_src/main.rs

@ -55,9 +55,6 @@ fn main() {
let mut watcher = watcher(tx, Duration::from_millis(100)).unwrap();
watcher.watch("./src", RecursiveMode::Recursive).unwrap();
println!();
log_info("Watching…\n");
loop {
match rx.recv() {
Ok(_) => build(),

40
src/assets/styles.css

@ -17,9 +17,27 @@ a {
border-bottom: 1px solid var(--accent);
}
html, body {
margin: 0;
padding: 0;
}
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
header, main, footer {
width: 100%;
max-width: 90ch;
margin: 0 auto;
padding: 1em;
}
main {
flex: 1;
margin-bottom: 2em;
}
header {
@ -44,3 +62,25 @@ header img {
li {
line-height: 1.6em;
}
footer nav ul {
list-style: none;
display: flex;
flex-direction: row;
margin: 0;
padding: 0;
}
footer nav ul > li {
display: inline;
line-height: 1rem;
padding-bottom: 0.15em;
}
footer nav ul > li + li {
border-inline-start: 1px solid var(--fg);
padding-inline-start: 1ch;
margin-inline-start: 1ch;
}

9
templates/_footer.html.j2

@ -0,0 +1,9 @@
<footer>
<nav>
<ul>
<li><strong class="brand">lavender software ltd</strong></li>
<li><a href="https://git.lavender.software/lavender/lavender.software">source code</a></li>
<!-- <li><a href="/about/">about us</a></li> -->
</ul>
</nav>
</footer>

2
templates/main_page.html.j2

@ -53,6 +53,8 @@
</section>
</main>
{% include "_footer.html.j2" %}
<script async src="/assets/main_page/confetti.js"></script>
</body>
</html>

Loading…
Cancel
Save