✨♻️💄 app, frontend, README: Update content, theme handling, and styles
- Added `Codeberg` link to contact page in `contact.rs` - Removed `Auto` theme option and set `Dark` as default in `theme_switcher` - Updated biography text and link formatting in `HomePage` component - Simplified theme CSS structure and adjusted color variables in `styles.css` - Removed outdated SHA256 warning and added `Cargo.toml` note in `README.md`
This commit is contained in:
parent
bab8fe827a
commit
09243a8351
5 changed files with 48 additions and 43 deletions
|
@ -17,6 +17,10 @@ pub fn Contact() -> impl IntoView {
|
|||
<span>"GitHub: "</span>
|
||||
<a href="https://github.com/mascully">"mascully"</a>
|
||||
</section>
|
||||
<section>
|
||||
<span>"Codeberg: "</span>
|
||||
<a href="https://codeberg.org/mascully">"mascully"</a>
|
||||
</section>
|
||||
<section>
|
||||
<span>"Matrix: "</span>
|
||||
<a href="matrix:u/blue_flycatcher:matrix.org">"@blue_flycatcher:matrix.org"</a>
|
||||
|
|
|
@ -124,6 +124,7 @@ pub fn App() -> impl IntoView {
|
|||
#[component]
|
||||
fn Root(children: Children) -> impl IntoView {
|
||||
view! { <div id="root">{children()}</div> }
|
||||
// view! { {children()} }
|
||||
}
|
||||
|
||||
#[component]
|
||||
|
@ -134,9 +135,11 @@ fn NotFound() -> impl IntoView {
|
|||
#[component]
|
||||
fn HomePage() -> impl IntoView {
|
||||
view! {
|
||||
<p>"Hi. I'm Markus. I mostly do full stack development with Rust and Nix."</p>
|
||||
<p>"Hi. I'm Markus. I'm a software engineer currently doing mostly full stack development with Rust and Nix."</p>
|
||||
<p>
|
||||
"You can check out some of my projects "<A href="/projects">"here"</A>" or on my "<A href="https://git.mascully.com/mascully?tab=repositories">"Git forge"</A>", including the "
|
||||
"You can check out some of my projects "<A href="/projects">"here"</A>" or on my "
|
||||
<A href="https://git.mascully.com/mascully?tab=repositories">"Git forge"</A>
|
||||
", including the "
|
||||
<A href="https://git.mascully.com/mascully/mascully_website">
|
||||
"source code for this website"
|
||||
</A>"."
|
||||
|
|
|
@ -15,7 +15,6 @@ use crate::command_line::CommandLine;
|
|||
pub enum Theme {
|
||||
Light,
|
||||
Dark,
|
||||
Auto,
|
||||
}
|
||||
|
||||
impl Theme {
|
||||
|
@ -23,7 +22,6 @@ impl Theme {
|
|||
match self {
|
||||
Theme::Light => "light",
|
||||
Theme::Dark => "dark",
|
||||
Theme::Auto => "auto",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,7 +29,7 @@ impl Theme {
|
|||
match s {
|
||||
"light" => Theme::Light,
|
||||
"dark" => Theme::Dark,
|
||||
_ => Theme::Auto,
|
||||
_ => unreachable!()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,12 +42,12 @@ fn get_stored_theme() -> Theme {
|
|||
{
|
||||
return Theme::from_str(&theme_str);
|
||||
}
|
||||
Theme::Auto
|
||||
Theme::Dark
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "hydrate"))]
|
||||
fn get_stored_theme() -> Theme {
|
||||
Theme::Auto
|
||||
Theme::Dark
|
||||
}
|
||||
|
||||
#[cfg(feature = "hydrate")]
|
||||
|
@ -81,7 +79,7 @@ fn apply_theme(theme: Theme) {
|
|||
Theme::Dark => {
|
||||
let _ = class_list.add_1("dark");
|
||||
}
|
||||
Theme::Auto => {}
|
||||
Theme::Dark => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +91,7 @@ fn apply_theme(_theme: Theme) {
|
|||
|
||||
#[component]
|
||||
pub fn ThemeSwitcher() -> impl IntoView {
|
||||
let (current_theme, set_current_theme) = signal(Theme::Auto);
|
||||
let (current_theme, set_current_theme) = signal(Theme::Dark);
|
||||
let (dropdown_open, set_dropdown_open) = signal(false);
|
||||
|
||||
// Load theme from localStorage and apply it on client side only
|
||||
|
@ -129,7 +127,6 @@ pub fn ThemeSwitcher() -> impl IntoView {
|
|||
let theme_icon = move || match current_theme.get() {
|
||||
Theme::Light => "☀️",
|
||||
Theme::Dark => "🌙",
|
||||
Theme::Auto => "🌓",
|
||||
};
|
||||
|
||||
view! {
|
||||
|
@ -152,13 +149,6 @@ pub fn ThemeSwitcher() -> impl IntoView {
|
|||
>
|
||||
"Dark"
|
||||
</button>
|
||||
<button
|
||||
class="theme-option"
|
||||
class:active=move || current_theme.get() == Theme::Auto
|
||||
on:click=move |_| select_theme(Theme::Auto)
|
||||
>
|
||||
"Auto"
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue