Doing some overall warning cleanup.

This commit is contained in:
2025-09-28 20:25:19 -04:00
parent 468b9449b2
commit cba2e95290
15 changed files with 134 additions and 66 deletions

View File

@ -1,27 +1,11 @@
use std::net::SocketAddr;
use dioxus::prelude::*;
#[cfg(feature = "server")]
use axum::Router;
#[cfg(feature = "server")]
use axum::ServiceExt;
#[cfg(feature = "server")]
use axum::extract::{Extension, Host};
#[cfg(feature = "server")]
use axum::http::uri::{Parts, Uri};
#[cfg(feature = "server")]
use axum::http::StatusCode;
#[cfg(feature = "server")]
use axum::response::{IntoResponse, Redirect};
#[cfg(feature = "server")]
use axum::routing::get;
use bard::*;
const FAVICON: Asset = asset!("/assets/favicon.ico");
const BLOG: Asset = asset!("/assets/blog.css");
@ -29,7 +13,7 @@ fn main()
{
#[cfg(feature = "server")]
{
tokio::runtime::Runtime::new()
let _ = tokio::runtime::Runtime::new()
.unwrap()
.block_on(async move { bard::init_database("/home/myrddin/cybermages/website/tavern.db").await });
}
@ -41,6 +25,13 @@ fn main()
#[component]
fn App() -> Element
{
let custom_settings = BardSettings
{
blog_name: Some(String::from("Blog Test")),
stylesheet: StylesheetBehavior::Extend(BLOG),
};
provide_context(custom_settings);
rsx!
{
document::Link { rel: "icon", href: FAVICON }
@ -52,8 +43,7 @@ fn App() -> Element
#[component]
fn Home() -> Element
{
rsx!
{
rsx! {
h1 { "Blog Test" }
}
}
@ -62,8 +52,7 @@ fn Home() -> Element
#[component]
pub fn PageNotFound(route: Vec<String>) -> Element
{
rsx!
{
rsx! {
h1 { "Page not found" }
p { "We are terribly sorry, but the page you requested doesn't exist." }
pre { color: "red", "log:\nattemped to navigate to: {route:?}" }
@ -94,7 +83,6 @@ fn Navbar() -> Element
#[derive(Debug, Clone, Routable, PartialEq)]
#[rustfmt::skip]
pub enum Page