Links from page header

main
Pantonshire 4 years ago
parent 79a248d641
commit 9e86897dcd

@ -43,7 +43,7 @@ pub async fn handle(Extension(posts): Extension<ConcurrentPostsStore>) -> HtmlRe
ul { ul {
@for post in posts.read().await.iter_by_created().rev() { @for post in posts.read().await.iter_by_created().rev() {
li { li {
a href={"/posts/" (post.id_str())} { (post.title()) } a href={"/articles/" (post.id_str())} { (post.title()) }
} }
} }
} }

@ -17,7 +17,7 @@ pub async fn handle(
.with_crawler_permissive() .with_crawler_permissive()
.with_title_owned(post.title().to_owned()) .with_title_owned(post.title().to_owned())
.with_head(html! { .with_head(html! {
link href="/static/style/code.css" rel="stylesheet"; link href="/static/styles/code.css" rel="stylesheet";
}) })
.with_body(html! { .with_body(html! {
h1 { (post.title()) } h1 { (post.title()) }

@ -27,7 +27,7 @@ pub fn service(
{ {
Router::new() Router::new()
.route("/", get(index::handle)) .route("/", get(index::handle))
.route("/posts/:post_id", get(posts::handle)) .route("/articles/:post_id", get(posts::handle))
.nest("/static", static_content::service(static_dir)) .nest("/static", static_content::service(static_dir))
.fallback(handle_fallback.into_service()) .fallback(handle_fallback.into_service())
.layer(ConcurrencyLimitLayer::new(concurrency_limit)) .layer(ConcurrencyLimitLayer::new(concurrency_limit))

@ -9,11 +9,11 @@ pub fn main_page(content: Markup) -> Markup {
} }
#right_nav_box { #right_nav_box {
ul { ul {
li { a href="/" { "Articles" } } li { a href="/articles" { "Articles" } }
li { a href="/" { "Atom" } } li { a href="/atom.xml" { "Atom" } }
li { a href="/" { "RSS" } } li { a href="/rss.xml" { "RSS" } }
li { a href="/" { "GitHub" } } li { a href="https://github.com/pantonshire" { "GitHub" } }
li { a href="/" { "Contact" } } li { a href="/contact" { "Contact" } }
} }
} }
} }

Loading…
Cancel
Save