From 763f74a0e28ca84357d5b982066b5c0aab174c33 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Tue, 24 Jun 2025 22:05:57 +0100 Subject: [PATCH] Improve style --- examples/website/index.html | 5 ++++- examples/website/script.js | 44 ++++++++++++++++++++----------------- examples/website/style.css | 28 ++++++++++++++++++----- scripts/dev-website.sh | 2 +- src/utils/history.rs | 14 +++++++++--- 5 files changed, 63 insertions(+), 30 deletions(-) diff --git a/examples/website/index.html b/examples/website/index.html index 2ced4ab..18953f4 100644 --- a/examples/website/index.html +++ b/examples/website/index.html @@ -2,7 +2,10 @@ - + h1 { + margin-bottom: 18px; + } + + header > p { + font-size: 1rem; + } + main { - padding: 24px 2vw; + padding: 18px; } } @@ -203,7 +222,6 @@ footer { justify-content: center; align-items: center; color: #5a6272; - border-radius: 32px; } .github-link > svg { diff --git a/scripts/dev-website.sh b/scripts/dev-website.sh index b2b08ce..e49bdb4 100755 --- a/scripts/dev-website.sh +++ b/scripts/dev-website.sh @@ -11,4 +11,4 @@ cp -R pkg/reconcile_bg.wasm examples/website/ cd examples/website/ -python3 -m http.server $1 +python3 -m http.server $1 --bind 0.0.0.0 diff --git a/src/utils/history.rs b/src/utils/history.rs index 91acd7a..611132a 100644 --- a/src/utils/history.rs +++ b/src/utils/history.rs @@ -1,11 +1,9 @@ -#[cfg(feature = "serde")] -use serde::{Deserialize, Serialize}; #[cfg(feature = "wasm")] use wasm_bindgen::prelude::*; #[cfg_attr(feature = "wasm", wasm_bindgen)] -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[cfg(feature = "wasm")] pub enum History { Unchanged = "Unchanged", AddedFromLeft = "AddedFromLeft", @@ -13,3 +11,13 @@ pub enum History { RemovedFromLeft = "RemovedFromLeft", RemovedFromRight = "RemovedFromRight", } + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[cfg(not(feature = "wasm"))] +pub enum History { + Unchanged, + AddedFromLeft, + AddedFromRight, + RemovedFromLeft, + RemovedFromRight, +}