From c56e564fa3a17472ada944d75d422891992434dc Mon Sep 17 00:00:00 2001 From: futile Date: Wed, 4 Dec 2024 18:01:59 +0000 Subject: [PATCH] refactor rust side of the code --- Trunk.toml | 3 +++ src/buttons.rs | 59 +++++++++++++++++++++++++++++++++++++++++++ src/content.rs | 24 ++++++++++++++++++ src/main.rs | 41 +++++------------------------- static/www/style.scss | 12 ++------- 5 files changed, 95 insertions(+), 44 deletions(-) create mode 100644 src/buttons.rs create mode 100644 src/content.rs diff --git a/Trunk.toml b/Trunk.toml index f6405a9..d5366a0 100644 --- a/Trunk.toml +++ b/Trunk.toml @@ -1,3 +1,6 @@ [build] target = "static/www/index.html" minify = "on_release" + +[watch] +watch = ["src/", "static/www/"] diff --git a/src/buttons.rs b/src/buttons.rs new file mode 100644 index 0000000..264ce49 --- /dev/null +++ b/src/buttons.rs @@ -0,0 +1,59 @@ +use yew::prelude::*; + +fn firtnite() -> Callback { + Callback::from(|_| { + web_sys::window() + .unwrap() + .alert_with_message("firt night") + .unwrap(); + }) +} + +pub fn buttons() -> Html { + html! { +
+
    +
  • button that says 'futile' in white, grotesque font, on a black background, with a white outline | by futile
  • +
  • button that says 'rose' with a rose growing out of the 'o', with milk-chan to the right of the text | by rose
  • +
  • -
  • button that says 'powered by fedora' in white and blue, with the fedora logo to the left | by unknown; retouched by futile
  • -
  • button that flashes between the texts 'tested on' and 'firefox' in firefox's orange, yellow, and purple scheme, with the firefox logo to the left | by unknown
  • -
  • button that says 'made with vscodium' in light blue, with the vscodium logo to the right | by unknown
  • -
  • button that says 'firtnite' (a misspelling of 'fortnite'), otherwise looks very similar to an old fortnite title screen | by unknown
  • -
  • button (grey) that says 'ublock origin now!', with the ublock origin red logo to the left | by unknown
  • -
  • button (grey) that says 'rust now!', with the rust gear logo to the left and a yellow banner that says '1.82.0' on the to the bottom right | by futile
  • -
  • button (grey) that says 'piracy now!', with a jolly roger flag to the left and a black banner that says 'free' on the to the bottom right | by unknown; retouched by futile
  • -
-
+
+ { buttons::buttons() }