You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.4 KiB
76 lines
2.4 KiB
use crate::components::header::{Header, HeaderLink};
|
|
use cached::proc_macro::cached;
|
|
use maud::{html, Markup, PreEscaped, DOCTYPE};
|
|
|
|
#[cached]
|
|
pub async fn render() -> Markup {
|
|
html! {
|
|
(DOCTYPE)
|
|
title {"Home | Voltpad"};
|
|
meta name="viewport" content="width=device-width, initial-scale=1.0";
|
|
style {(PreEscaped(
|
|
grass::include!("./css/index.scss")
|
|
))}
|
|
script {(PreEscaped(
|
|
include_str!("../../scripts/Index.js")
|
|
))}
|
|
(
|
|
Header(vec![
|
|
HeaderLink {
|
|
name: "Home".to_string(),
|
|
path: "/".to_string(),
|
|
prefix: None,
|
|
postfix: None
|
|
},
|
|
HeaderLink {
|
|
name: "Search".to_string(),
|
|
path: "/search".to_string(),
|
|
prefix: None,
|
|
postfix: None
|
|
},
|
|
HeaderLink {
|
|
name: "History".to_string(),
|
|
path: "/history".to_string(),
|
|
prefix: None,
|
|
postfix: None
|
|
},
|
|
HeaderLink {
|
|
name: "About".to_string(),
|
|
path: "/about".to_string(),
|
|
prefix: None,
|
|
postfix: None
|
|
},
|
|
], "/".to_string())
|
|
)
|
|
div .index-content {
|
|
h1 { "Voltpad" }
|
|
div { "A blazingly fast (but for real this time) Wattpad frontend" }
|
|
noscript {
|
|
p {
|
|
b { "Warning: " }
|
|
"Some features will not work without JS enabled, including:"
|
|
ul {
|
|
li {
|
|
"Saving/favoriting stories & searches"
|
|
}
|
|
li {
|
|
"Story history"
|
|
}
|
|
li {
|
|
"'Go back to previous page' on story pages"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
div .favorites-container {
|
|
div .favorite-searches #favorite-searches {
|
|
h2 { "Saved Searches" }
|
|
};
|
|
div .favorite-stories #favorite-stories {
|
|
h2 { "Saved Stories" }
|
|
};
|
|
}
|
|
}
|
|
}
|
|
}
|