32 lines
758 B
Rust
32 lines
758 B
Rust
use yew::prelude::*;
|
|
|
|
use crate::pages::blog::authorcard::AuthorCard;
|
|
use crate::pages::blog::content::{Author, BlogEntry};
|
|
|
|
pub struct Authors;
|
|
impl Component for Authors {
|
|
type Message = ();
|
|
type Properties = ();
|
|
|
|
fn create(_ctx: &Context<Self>) -> Self {
|
|
Self
|
|
}
|
|
|
|
fn view(&self, _: &Context<Self>) -> Html {
|
|
html! {
|
|
<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>
|
|
}
|
|
}
|
|
}
|