Crates.io | viewy-codegen |
lib.rs | viewy-codegen |
version | |
source | src |
created_at | 2023-08-11 08:39:06.27 |
updated_at | 2024-12-10 13:15:11.592976 |
description | Procedural macros for Viewy web ui library. |
homepage | |
repository | https://github.com/strowbeary/viewy-rs |
max_upload_size | |
id | 941683 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A UI toolkit that combine the advantages of a design system and an ui library.
use viewy::*;
use viewy::components::*;
#[macro_use] extern crate rocket;
pub fn default_layout() -> Box<dyn Fn(Box<dyn Renderable>) -> Box<dyn Renderable>> {
Box::new(move |content| Box::new({
content
}))
}
#[get("/")]
fn index() -> RawHtml<String> {
RawHtml({
Page::new(
&format!("{} – Viewy", "Hello World"),
&default_layout(),
{
Text::new("Hello world", TextStyle::LargeTitle)
}
)
.compile(RenderMode::Complete)
})
}
#[launch]
fn rocket() -> _ {
rocket::build().mount("/", routes![index])
}