commit d9d183e62b2bd4c16e1eee0fe1b9a04cdcc819ae
parent 78fa77dbf5373befb71277584141c5c9f1f691b4
Author: alex wennerberg <alex@alexwennerberg.com>
Date: Thu, 16 Dec 2021 19:14:08 -0800
re-add about
Diffstat:
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/config.rs b/src/config.rs
@@ -10,7 +10,7 @@ pub struct Config {
pub list_name: String,
pub list_email: String,
pub url: String,
- pub homepage: Option<String>,
+ pub homepage: String,
}
pub static INSTANCE: OnceCell<Config> = OnceCell::new();
@@ -25,7 +25,7 @@ impl Config {
let mut list_name = "Crabmail Mailing List".to_string();
let mut list_email = "setme@foo.local".to_string();
let mut url = "flounder.online".to_string();
- let mut homepage = None;
+ let mut homepage = String::new();
for l in io::BufReader::new(file).lines() {
let line = l?;
@@ -39,7 +39,7 @@ impl Config {
"list_name" => list_name = value.to_string(),
"list_email" => list_email = value.to_string(),
"url" => url = value.to_string(),
- "homepage" => homepage = Some(value.to_string()),
+ "homepage" => homepage = value.to_string(),
_ => {}
}
} else {
diff --git a/src/main.rs b/src/main.rs
@@ -96,6 +96,12 @@ impl<'a> ThreadList<'a> {
a(href=format!("mailto:{}", &Config::global().list_email)) {
: &Config::global().list_email
}
+ span { // Hack
+ : " | "
+ }
+ a(href=&Config::global().homepage) {
+ : "about"
+ }
hr;
@ for thread in &self.threads {
div(class="message-sum") {