finish blog

 add first blog entry
🎨 rework ui+ux
 add freemono
This commit is contained in:
lia
2025-08-24 03:46:08 +00:00
parent f1c471839f
commit 2e397c5be3
19 changed files with 788 additions and 322 deletions

View File

@@ -1,31 +1,31 @@
use yew::prelude::*;
use crate::pages::blog::authorcard::AuthorCard;
use crate::pages::blog::content::{Author, BlogEntry};
/*pub enum Msg {
NextAuthors,
}*/
pub struct Authors {
ids: Vec<u8>,
}
pub struct Authors;
impl Component for Authors {
type Message = (); //Msg;
type Message = ();
type Properties = ();
fn create(_ctx: &Context<Self>) -> Self {
Self { ids: vec![0], }
Self
}
/*fn update(&mut self, _ctx: &Context<Self>, msg: Self::Message) -> bool {
match msg { Msg::NextAuthors => { self.ids = vec![0]; true } }
}*/
fn view(&self, _: &Context<Self>) -> Html {
html! {
{ for self.ids.iter().map(|&id| { html! {
<AuthorCard {id} />
} }) }
<div style="
display: flex !important;
width: 100% !important;
flex-direction: row !important;
flex-wrap: wrap !important;
justify-content: center !important;
margin-top: 2rem !important;
margin-bottom: 2rem !important;
">{ for Author::AUTHORS.map(|author| {
let id = author.id;
html! { <AuthorCard {id} /> }
}) }</div>
}
}
}