This commit is contained in:
JMARyA 2025-01-21 18:00:48 +01:00
parent fb4a142c9c
commit caeac280eb
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
4 changed files with 12 additions and 10 deletions

View file

@ -12,7 +12,18 @@ pub trait ColorCircle {
fn next(&self) -> Self; 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 { macro_rules! color_map {
($name:ident, $id:literal) => { ($name:ident, $id:literal) => {
@ -134,8 +145,6 @@ impl UIColor for Colors {
} }
} }
// TODO : Gradient
pub struct Gradient { pub struct Gradient {
start: Box<dyn UIColor>, start: Box<dyn UIColor>,
middle: Option<Box<dyn UIColor>>, middle: Option<Box<dyn UIColor>>,

View file

@ -5,8 +5,6 @@ use crate::{
ui::UIWidget, ui::UIWidget,
}; };
// TODO : refactor shell
/// Represents the HTML structure of a page shell, including the head, body class, and body content. /// 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. /// This structure is used to construct the overall HTML structure of a page, making it easier to generate consistent HTML pages dynamically.

View file

@ -69,7 +69,6 @@ impl LinkWidget {
/// Enable HTMX link capabilities /// Enable HTMX link capabilities
#[must_use] #[must_use]
pub fn use_htmx(self) -> Self { pub fn use_htmx(self) -> Self {
// todo : investigate htmx attrs
let url = self.1.clone(); let url = self.1.clone();
self.hx_get(&url) self.hx_get(&url)
.hx_target(Selector::Query("#main_content".to_string())) .hx_target(Selector::Query("#main_content".to_string()))

View file

@ -104,10 +104,6 @@ wrapper!(LargeScreen, LargeScreenWrapper, "lg");
wrapper!(XLScreen, XLScreenWrapper, "xl"); wrapper!(XLScreen, XLScreenWrapper, "xl");
wrapper!(_2XLScreen, _2XLScreenWrapper, "2xl"); wrapper!(_2XLScreen, _2XLScreenWrapper, "2xl");
// TODO : responsive media
// TODO : arbitrary values "min-[320px]:text-center max-[600px]:bg-sky-300"
#[allow(non_snake_case)] #[allow(non_snake_case)]
pub mod Screen { pub mod Screen {
use crate::ui::UIWidget; use crate::ui::UIWidget;