Adding and moving a lot of components.
This is the main thrust of the library. I know it is a lot of changes, but I was running out of time and had to hammer them all in.
This commit is contained in:
@ -1,13 +1,35 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
use crate::pages::{Blog, Post};
|
||||
use crate::pages::{Blog, Post, Root};
|
||||
|
||||
|
||||
|
||||
const BLOG_CSS: Asset = asset!("/assets/css/blog.css");
|
||||
|
||||
|
||||
|
||||
#[component]
|
||||
fn BlogLayout() -> Element
|
||||
{
|
||||
rsx!
|
||||
{
|
||||
document::Stylesheet { href: BLOG_CSS }
|
||||
|
||||
Outlet::<Page> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//#[derive(Debug, Clone, Routable, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Debug, Clone, Routable, PartialEq)]
|
||||
#[rustfmt::skip]
|
||||
pub enum Page
|
||||
{
|
||||
#[layout(BlogLayout)]
|
||||
#[route("/")]
|
||||
Root { },
|
||||
|
||||
#[route("/:tag")]
|
||||
Blog { tag: String },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user