Add static file server, CSS styles for home

Also fix the livereloading.
This commit is contained in:
2023-06-09 01:02:50 -04:00
parent 758e644173
commit 97c4ae73f0
8 changed files with 95 additions and 21 deletions

View File

@@ -10,7 +10,7 @@ use crate::partials::layout::Layout;
pub async fn get(State(pool): State<PgPool>, layout: Layout) -> Result<Response> {
let entries = get_entries(&pool, GetEntriesOptions::default()).await?;
Ok(layout.render(html! {
ul {
ul class="entries" {
@for entry in entries {
@let title = entry.title.unwrap_or_else(|| "Untitled".to_string());
@let url = format!("/entry/{}", entry.id);