diff --git a/src/ui/color.rs b/src/ui/color.rs index e7baa05..50d070c 100644 --- a/src/ui/color.rs +++ b/src/ui/color.rs @@ -12,7 +12,18 @@ pub trait ColorCircle { fn next(&self) -> Self; } -// todo : specific colors rgb -[#50d71e] +#[allow(non_snake_case)] +pub fn RGB(r: u8, g: u8, b: u8) -> RGBColor { + RGBColor(format!("[#{r:02x}{g:02x}{b:02x}]")) +} + +pub struct RGBColor(String); + +impl UIColor for RGBColor { + fn color_class(&self) -> &str { + self.0.as_ref() + } +} macro_rules! color_map { ($name:ident, $id:literal) => { @@ -134,8 +145,6 @@ impl UIColor for Colors { } } -// TODO : Gradient - pub struct Gradient { start: Box, middle: Option>, diff --git a/src/ui/components/shell.rs b/src/ui/components/shell.rs index 351ba9d..8db6011 100644 --- a/src/ui/components/shell.rs +++ b/src/ui/components/shell.rs @@ -5,8 +5,6 @@ use crate::{ ui::UIWidget, }; -// TODO : refactor shell - /// Represents the HTML structure of a page shell, including the head, body class, and body content. /// /// This structure is used to construct the overall HTML structure of a page, making it easier to generate consistent HTML pages dynamically. diff --git a/src/ui/primitives/link.rs b/src/ui/primitives/link.rs index 0cf42e8..131537e 100644 --- a/src/ui/primitives/link.rs +++ b/src/ui/primitives/link.rs @@ -69,7 +69,6 @@ impl LinkWidget { /// Enable HTMX link capabilities #[must_use] pub fn use_htmx(self) -> Self { - // todo : investigate htmx attrs let url = self.1.clone(); self.hx_get(&url) .hx_target(Selector::Query("#main_content".to_string())) diff --git a/src/ui/wrapper/mod.rs b/src/ui/wrapper/mod.rs index 06654a3..410a9a6 100644 --- a/src/ui/wrapper/mod.rs +++ b/src/ui/wrapper/mod.rs @@ -104,10 +104,6 @@ wrapper!(LargeScreen, LargeScreenWrapper, "lg"); wrapper!(XLScreen, XLScreenWrapper, "xl"); wrapper!(_2XLScreen, _2XLScreenWrapper, "2xl"); -// TODO : responsive media - -// TODO : arbitrary values "min-[320px]:text-center max-[600px]:bg-sky-300" - #[allow(non_snake_case)] pub mod Screen { use crate::ui::UIWidget;