Doing some overall warning cleanup.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "blog_test"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
authors = ["Myrddin Dundragon <myrddin@cybermages.tech>"]
|
||||
edition = "2021"
|
||||
|
||||
|
||||
45
blog_test/assets/blog.css
Normal file
45
blog_test/assets/blog.css
Normal file
@ -0,0 +1,45 @@
|
||||
:root
|
||||
{
|
||||
--text-color: #000000;
|
||||
--bg-color: #FFFFFF;
|
||||
|
||||
--primary-color: #ffffff;
|
||||
--secondary-color: #000000;
|
||||
--accent-color: #7dfdfe; /* Tron grid or try 00a8ff 00eaff 26b4ca 59b4c7 5584AC*/
|
||||
--mobile-color: #363636;
|
||||
|
||||
--desktop-size: 1230px;
|
||||
}
|
||||
|
||||
.toggle_button {
|
||||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
margin-right: 5px;
|
||||
padding: 0px 6px;
|
||||
border: 2px solid var(--text-color);
|
||||
border-radius: 5px;
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: 0.1s ease-in;
|
||||
}
|
||||
|
||||
.toggle_button:hover {
|
||||
color: var(--accent-color);
|
||||
border-color: var(--accent-color);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.toggle_button input[type="checkbox"] {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Checked state using :has() — modern browsers only */
|
||||
.toggle_button:has(input:checked) {
|
||||
color: var(--accent-color);
|
||||
border-color: var(--accent-color);
|
||||
}
|
||||
32
blog_test/blog.css
Normal file
32
blog_test/blog.css
Normal file
@ -0,0 +1,32 @@
|
||||
.toggle_button {
|
||||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
margin-right: 5px;
|
||||
padding: 0px 6px;
|
||||
border: 2px solid var(--text-color);
|
||||
border-radius: 5px;
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: 0.1s ease-in;
|
||||
}
|
||||
|
||||
.toggle_button:hover {
|
||||
color: var(--accent-color);
|
||||
border-color: var(--accent-color);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.toggle_button input[type="checkbox"] {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Checked state using :has() — modern browsers only */
|
||||
.toggle_button:has(input:checked) {
|
||||
color: var(--accent-color);
|
||||
border-color: var(--accent-color);
|
||||
}
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user