Libera la versión de desarrollo 0.0.11

This commit is contained in:
Manuel Cillero 2022-05-07 15:29:38 +02:00
parent a6d39202d4
commit cbfe374eb5
3 changed files with 32 additions and 32 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "pagetop" name = "pagetop"
version = "0.0.10" version = "0.0.11"
edition = "2021" edition = "2021"
authors = [ authors = [

View file

@ -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. // JavaScript.
#[derive(PartialEq)] #[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. // Page assets.
pub struct Assets { pub struct Assets {

View file

@ -5,8 +5,8 @@ mod assets;
pub use assets::{ pub use assets::{
Assets, Assets,
Favicon, Favicon,
StyleSheet,
JavaScript, JSMode, JavaScript, JSMode,
StyleSheet,
}; };
mod definition; mod definition;