✨ finish blog
✨ add first blog entry 🎨 rework ui+ux ✨ add freemono
This commit is contained in:
@@ -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>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user