Libera la versión de desarrollo 0.0.11
This commit is contained in:
parent
a6d39202d4
commit
cbfe374eb5
3 changed files with 32 additions and 32 deletions
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "pagetop"
|
||||
version = "0.0.10"
|
||||
version = "0.0.11"
|
||||
edition = "2021"
|
||||
|
||||
authors = [
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ mod assets;
|
|||
pub use assets::{
|
||||
Assets,
|
||||
Favicon,
|
||||
StyleSheet,
|
||||
JavaScript, JSMode,
|
||||
StyleSheet,
|
||||
};
|
||||
|
||||
mod definition;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue