From 20f6c85e682db0d88202239ddeb9376afc121c92 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Thu, 2 Feb 2023 08:47:21 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20[minimal]=20Saca=20tema=20del=20?= =?UTF-8?q?c=C3=B3digo=20base=20de=20PageTop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagetop-bootsier/build.rs | 3 +++ pagetop-minimal/Cargo.toml | 18 ++++++++++++++++++ pagetop-minimal/README.md | 27 +++++++++++++++++++++++++++ pagetop-minimal/src/lib.rs | 17 +++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 pagetop-bootsier/build.rs create mode 100644 pagetop-minimal/Cargo.toml create mode 100644 pagetop-minimal/README.md create mode 100644 pagetop-minimal/src/lib.rs diff --git a/pagetop-bootsier/build.rs b/pagetop-bootsier/build.rs new file mode 100644 index 00000000..43a25bd1 --- /dev/null +++ b/pagetop-bootsier/build.rs @@ -0,0 +1,3 @@ +fn main() -> std::io::Result<()> { + pagetop_build::bundle_resources("./static", "bootsier", None) +} diff --git a/pagetop-minimal/Cargo.toml b/pagetop-minimal/Cargo.toml new file mode 100644 index 00000000..a24da3ba --- /dev/null +++ b/pagetop-minimal/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "pagetop-minimal" +version = "0.0.1" +edition = "2021" + +authors = [ + "Manuel Cillero " +] +description = """\ + Theme for PageTop that uses minimal CSS for page layout and component display.\ +""" +homepage = "https://pagetop.cillero.es" +repository = "https://github.com/manuelcillero/pagetop" +license = "Apache-2.0 OR MIT" + +[dependencies] +pagetop = { path = "../pagetop", version = "0.0" } +maud = "0.24.0" diff --git a/pagetop-minimal/README.md b/pagetop-minimal/README.md new file mode 100644 index 00000000..0cc87d10 --- /dev/null +++ b/pagetop-minimal/README.md @@ -0,0 +1,27 @@ +Tema para **PageTop** que define un conjunto mínimo de estilos para la composición de páginas y +visualización de componentes. + +[PageTop](https://github.com/manuelcillero/pagetop/tree/main/pagetop), es un entorno de desarrollo +basado en algunos de los *crates* más estables y populares del ecosistema Rust para proporcionar +APIs, patrones de desarrollo y buenas prácticas para la creación de soluciones web SSR (*Server-Side +Rendering*). + + +# 🚧 Advertencia + +**PageTop** sólo libera actualmente versiones de desarrollo. La API no es estable y los cambios son +constantes. No puede considerarse preparado hasta que se libere la versión **0.1.0**. + + +# 📜 Licencia + +Este proyecto tiene licencia, de hecho tiene dos, puedes aplicar cualquiera de las siguientes a tu +elección: + +* Licencia Apache versión 2.0 + ([LICENSE-APACHE](https://github.com/manuelcillero/pagetop/blob/main/LICENSE-APACHE) o + [http://www.apache.org/licenses/LICENSE-2.0]). + +* Licencia MIT + ([LICENSE-MIT](https://github.com/manuelcillero/pagetop/blob/main/LICENSE-MIT) o + [http://opensource.org/licenses/MIT]). diff --git a/pagetop-minimal/src/lib.rs b/pagetop-minimal/src/lib.rs new file mode 100644 index 00000000..15c6c3a2 --- /dev/null +++ b/pagetop-minimal/src/lib.rs @@ -0,0 +1,17 @@ +use pagetop::prelude::*; + +pub_handle!(THEME_MINIMAL); + +pub struct Minimal; + +impl ModuleTrait for Minimal { + fn handle(&self) -> Handle { + THEME_MINIMAL + } + + fn theme(&self) -> Option { + Some(&Minimal) + } +} + +impl ThemeTrait for Minimal {}