Switch over to WebAssembly, Rust and Yew #35

Merged
BlakeRain merged 87 commits from yew-static into main 2023-08-30 18:01:40 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 6bae5bf193 - Show all commits

View File

@ -98,14 +98,14 @@ pub fn post_card(props: &PostCardProps) -> Html {
html! {
<>
{post_card_image(&props.post.doc_info.slug, &props.post.cover_image)}
<div class="col-span-2">
<div class="xl:col-span-2 md:mt-4 lg:mt-0">
{post_card_description(&props.post, &tags)}
</div>
</>
}
} else {
html! {
<div class="flex flex-col gap-4">
<div class="flex flex-col gap-4 md:mt-20 lg:mt-0">
{post_card_image(&props.post.doc_info.slug, &props.post.cover_image)}
{post_card_description(&props.post, &tags)}
</div>

View File

@ -1,4 +1,4 @@
use yew::{function_component, html, use_context, Html, Properties};
use yew::{function_component, html, use_context, Html};
use crate::{components::blog::post_card::PostCard, model::source::PostsContext};
@ -7,7 +7,7 @@ pub fn post_card_list() -> Html {
let posts = use_context::<PostsContext>().expect("PostsContext to be provided");
html! {
<div class="grid grid-cols-3 gap-x-10 gap-y-20 my-10">
<div class="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-x-10 lg:gap-y-20 my-10">
{for posts.iter().enumerate().map(|(index, post)| {
html! {
<PostCard post={post.clone()} first={index == 0} />