module
actions
Declarative page actions, handled by one delegated click listener:
data-copy="text"— copy the text to the clipboard (or, withdata-copy-target="<selector>", the target's text). The button getsdata-copiedfor a moment as feedback.data-motion-replay="<selector>"— replay the declarative animations in the matching elements (crate::motion::replay).data-theme-toggle— switch between the light and dark schemes (toggle_scheme).
Functions
set_scheme
pub fn set_scheme(scheme: &str)Show scheme ("light" or "dark"), flipping the palette when it isn't the page's own, and remember the choice.
sync_scheme
pub fn sync_scheme()Reflect the scheme on <html> (data-scheme, color-scheme) and on every toggle (aria-pressed = dark, and its label).
Constants
SCHEME_KEY
pub const SCHEME_KEY: &str = "weft-scheme";The localStorage key holding the chosen scheme.