Polish index and articles pages, link styling, fixes for footer

This commit is contained in:
Pantonshire committed 2022-05-27 11:08:24 +01:00
1 parent 37a07d8e78
commit 76ae05a6d8
5 files changed
+177 -48

No files matched your search

+20 -8
View File
@@ -16,9 +16,9 @@ pub async fn handle(Extension(posts): Extension<ConcurrentPostsStore>) -> Html {
})
.with_body(template::main_page(html! {
section .content_section {
h2 { "About me" }
p {
"Hi! I'm Tom, a computer science student and hobbyist programmer."
"Hi! I'm Tom, a computer science student and hobbyist programmer, and \
definitely not an egg-shaped robot."
}
figure {
img src="/static/images/tombot_450.png"
@@ -34,21 +34,33 @@ pub async fn handle(Extension(posts): Extension<ConcurrentPostsStore>) -> Html {
}
section .content_section {
h2 { "Things I've made" }
p { "Todo" }
h2 { "Some things I've made" }
ul {
li { a href="https://github.com/pantonshire/goldcrest" { "Goldcrest" } ", a proxy for the Twitter v1 API using gRPC. I made it to address the problem of centralised rate-limit tracking to avoid exceeding to Twitter's quotas." }
li { a href="https://github.com/pantonshire/smolbotbot" { "Smolbotbot" } ", an art archival project for the drawings of " a href="https://twitter.com/smolrobots" { "@smolrobots" } "! A Twitter bot continuously checks for new small robots, and the data it collects is made available at " a href="https://smolbotbot.com" { "smolbotbot.com" } "." }
li { a href="https://github.com/pantonshire/enumscribe" { "Enumscribe" } ", a Rust procedural macro library for generating conversion methods between enum types and strings, with support for " a href="https://serde.rs" { "Serde" } "." }
li { a href="https://github.com/pantonshire/tasque" { "Tasque" } ", a very in-progress cron-like job scheduler that I'm having a lot of fun working on." }
}
}
section .content_section {
h2 { "Articles" }
ul {
@for post in posts.read().await.iter_by_created().rev().take(5) {
p { "Some recent ones:" }
ul .articles_list {
@for post in posts.read().await.iter_by_created().rev().take(3) {
li {
a href={"/articles/" (post.id())} { (post.title()) }
h3 { a href={"/articles/" (post.id())} { (post.title()) } }
@if let Some(subtitle) = post.subtitle() {
p .article_list_subtitle { (subtitle) }
}
p .article_list_published_date {
"Published " (post.created().format("%Y/%m/%d"))
}
}
}
}
p {
a href="/articles" { "See all" }
a href="/articles" { "See the rest" }
}
}
}))
+7 -4
View File
@@ -20,12 +20,15 @@ pub async fn handle(Extension(posts): Extension<ConcurrentPostsStore>) -> Html {
p {
"A collection of words I have written, against my better judgement."
}
ul {
ul .articles_list {
@for post in posts.read().await.iter_by_created().rev() {
li {
a href={"/articles/" (post.id())} { (post.title()) }
span class="quiet" {
" — " (post.created().format("%Y/%m/%d"))
h3 { a href={"/articles/" (post.id())} { (post.title()) } }
@if let Some(subtitle) = post.subtitle() {
p .article_list_subtitle { (subtitle) }
}
p .article_list_published_date {
"Published " (post.created().format("%Y/%m/%d"))
}
}
}
+1 -1
View File
@@ -29,7 +29,7 @@ pub fn main_page(content: Markup) -> Markup {
#page_footer_content {
ul {
li {
"\"What is a footer? A miserable little pile of secrets\""
"\"What is a footer? A miserable little pile of secrets.\""
}
li {
a href="https://github.com/pantonshire/blog_server" {