diff --git a/pagetop/Cargo.toml b/pagetop/Cargo.toml index 36215a52..1888cacc 100644 --- a/pagetop/Cargo.toml +++ b/pagetop/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pagetop" -version = "0.0.10" +version = "0.0.11" edition = "2021" authors = [ diff --git a/pagetop/src/api/component/assets.rs b/pagetop/src/api/component/assets.rs index 4801ada2..30a6e4b1 100644 --- a/pagetop/src/api/component/assets.rs +++ b/pagetop/src/api/component/assets.rs @@ -97,36 +97,6 @@ impl Favicon { } } -// StyleSheet. - -pub struct StyleSheet { - source: &'static str, - weight: isize, -} -impl StyleSheet { - pub fn source(s: &'static str) -> Self { - StyleSheet { - source: s, - weight: 0, - } - } - - pub fn with_weight(mut self, weight: isize) -> Self { - self.weight = weight; - self - } - - pub fn weight(self) -> isize { - self.weight - } - - fn render(&self) -> Markup { - html! { - link rel="stylesheet" href=(self.source); - } - } -} - // JavaScript. #[derive(PartialEq)] @@ -171,6 +141,36 @@ impl JavaScript { } } +// StyleSheet. + +pub struct StyleSheet { + source: &'static str, + weight: isize, +} +impl StyleSheet { + pub fn source(s: &'static str) -> Self { + StyleSheet { + source: s, + weight: 0, + } + } + + pub fn with_weight(mut self, weight: isize) -> Self { + self.weight = weight; + self + } + + pub fn weight(self) -> isize { + self.weight + } + + fn render(&self) -> Markup { + html! { + link rel="stylesheet" href=(self.source); + } + } +} + // Page assets. pub struct Assets { diff --git a/pagetop/src/api/component/mod.rs b/pagetop/src/api/component/mod.rs index 10a894b9..fe21f1ea 100644 --- a/pagetop/src/api/component/mod.rs +++ b/pagetop/src/api/component/mod.rs @@ -5,8 +5,8 @@ mod assets; pub use assets::{ Assets, Favicon, - StyleSheet, JavaScript, JSMode, + StyleSheet, }; mod definition;