working(ish) upload

This commit is contained in:
2026-03-26 15:59:54 +01:00
parent 2d19e3b5d7
commit cd030a6c44
21 changed files with 651 additions and 126 deletions

View File

@ -1,7 +1,7 @@
use dioxus::prelude::*;
use views::{Blog, Home, Navbar};
use views::{Blog, Home, Navbar, Upload};
use tracing::Level;
mod components;
mod views;
@ -9,6 +9,8 @@ mod views;
#[derive(Debug, Clone, Routable, PartialEq)]
#[rustfmt::skip]
enum Route {
#[route("/upload")]
Upload {},
#[layout(Navbar)]
#[route("/")]
Home {},
@ -17,10 +19,11 @@ enum Route {
}
const FAVICON: Asset = asset!("/assets/favicon.ico");
const MAIN_CSS: Asset = asset!("/assets/styling/main.css");
//const MAIN_CSS: Asset = asset!("/assets/styling/main.css");
const TAILWIND_CSS: Asset = asset!("/assets/tailwind.css");
fn main() {
dioxus::logger::init(Level::INFO).expect("failed to init logger");
dioxus::launch(App);
}
@ -28,7 +31,7 @@ fn main() {
fn App() -> Element {
rsx! {
document::Link { rel: "icon", href: FAVICON }
document::Link { rel: "stylesheet", href: MAIN_CSS }
// document::Link { rel: "stylesheet", href: MAIN_CSS }
document::Link { rel: "stylesheet", href: TAILWIND_CSS }
Router::<Route> {}