summaryrefslogtreecommitdiff
path: root/src/layout.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout.rs')
-rw-r--r--src/layout.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/layout.rs b/src/layout.rs
index b5ad682..c553990 100644
--- a/src/layout.rs
+++ b/src/layout.rs
@@ -4,8 +4,8 @@
Copyright (C) 2023 metamuffin <metamuffin.org>
*/
use crate::pages::*;
+use crate::source::*;
use crate::uri;
-use crate::animation::*;
use markup::Render;
use rocket::{
http::ContentType,
@@ -15,14 +15,14 @@ use rocket::{
use std::io::Cursor;
markup::define! {
- Layout<Main: Render>(title: String, main: Main) {
+ Layout<Main: Render>(title: String, main: Main, noimg: bool) {
@markup::doctype()
html {
head {
title { @title " - " "metamuffin's website" }
}
body {
- img[src="https://s.metamuffin.org/avatar/default-512.webp", align="left", height=80, hspace=10];
+ @if !noimg { img[src="https://s.metamuffin.org/avatar/default-512.webp", align="left", height=80, hspace=10]; }
h1 { "metamuffin's personal website" }
nav {
a[href=uri!(r_about())] { "About" } " "
@@ -30,7 +30,7 @@ markup::define! {
a[href=uri!(r_contact())] { "Contact" } " "
a[href="https://codeberg.org/metamuffin"] { "Codeberg" } " "
a[href=uri!(r_pgp_key())] { "PGP-Key" } " "
- a[href=uri!(r_wubbel())] { i {"wubbel"} } " "
+ a[href=uri!(r_source())] { "Sources" } " "
}
hr;
section { @main }
@@ -58,6 +58,7 @@ impl<'r, Main: Render> Responder<'r, 'static> for LayoutPage<Main> {
let mut out = String::new();
Layout {
main: self.content,
+ noimg: self.title == "Source",
title: self.title,
}
.render(&mut out)