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
Showing only changes of commit ff7b431e91 - Show all commits

View File

@ -14,7 +14,10 @@ pub fn footer(_: &FooterProps) -> Html {
html! {
<div class="bg-primary text-neutral-400 text-sm mt-4">
<div class="container mx-auto flex flex-col gap-4 md:gap-0 md:flex-row md:justify-between px-4 sm:px-0 py-6">
<div>{format!("Blake Rain © {year}")}</div>
<div>
{format!("Blake Rain © {year}")}
<SizeIndicator />
</div>
<div class="flex flex-col md:flex-row gap-4 md:gap-3">
<Link<Route> classes="hover:text-neutral-50" to={Route::Blog}>
{"Latest Posts"}
@ -44,3 +47,20 @@ pub fn footer(_: &FooterProps) -> Html {
</div>
}
}
#[function_component(SizeIndicator)]
fn size_indicator() -> Html {
#[cfg(debug_assertions)]
html! {
<div class="flex flex-row gap-2">
<div class="opacity-50 sm:opacity-100">{"sm"}</div>
<div class="opacity-50 md:opacity-100">{"md"}</div>
<div class="opacity-50 lg:opacity-100">{"lg"}</div>
<div class="opacity-50 xl:opacity-100">{"xl"}</div>
<div class="opacity-50 2xl:opacity-100">{"2xl"}</div>
</div>
}
#[cfg(not(debug_assertions))]
html! {}
}