♻️ (base): Reorganiza el componente Intro
This commit is contained in:
parent
404739a3fd
commit
16eec316c4
12 changed files with 439 additions and 339 deletions
|
|
@ -19,11 +19,9 @@ impl Extension for FormControls {
|
|||
async fn form_controls(request: HttpRequest) -> Result<Markup, ErrorPage> {
|
||||
Page::new(request)
|
||||
.with_child(
|
||||
Intro::default()
|
||||
.with_opening(IntroOpening::Custom)
|
||||
Intro::custom()
|
||||
.with_title(Lc::t("title", &LOC))
|
||||
.with_slogan(Lc::t("slogan", &LOC))
|
||||
.with_button(None::<(Lc, Route)>)
|
||||
// Bloque 1: casillas, interruptores y botones de opción.
|
||||
.with_child(
|
||||
Block::new()
|
||||
|
|
|
|||
|
|
@ -14,11 +14,9 @@ impl Extension for IntroColors {
|
|||
async fn intro_colors(request: HttpRequest) -> Result<Markup, ErrorPage> {
|
||||
Page::new(request)
|
||||
.with_child(
|
||||
Intro::default()
|
||||
.with_opening(IntroOpening::Custom)
|
||||
Intro::custom()
|
||||
.with_title(Lc::n("PageTop"))
|
||||
.with_slogan(Lc::t("colors_slogan", &LOC))
|
||||
.with_button(None::<(Lc, Route)>)
|
||||
.with_child(
|
||||
Block::new()
|
||||
.with_title(Lc::t("colors_block", &LOC).with_arg("n", "1"))
|
||||
|
|
|
|||
|
|
@ -20,11 +20,9 @@ async fn intro_flex(request: HttpRequest) -> Result<Markup, ErrorPage> {
|
|||
.with_assets(demo_box_styles())
|
||||
.with_assets(demo_row_styles())
|
||||
.with_child(
|
||||
Intro::default()
|
||||
.with_opening(IntroOpening::Custom)
|
||||
Intro::custom()
|
||||
.with_title(Lc::n("PageTop"))
|
||||
.with_slogan(Lc::t("flex_slogan", &LOC))
|
||||
.with_button(None::<(Lc, Route)>)
|
||||
.with_child(direction_block())
|
||||
.with_child(justify_block())
|
||||
.with_child(align_block())
|
||||
|
|
|
|||
|
|
@ -20,11 +20,9 @@ async fn intro_grid(request: HttpRequest) -> Result<Markup, ErrorPage> {
|
|||
.with_assets(demo_box_styles())
|
||||
.with_assets(demo_row_styles())
|
||||
.with_child(
|
||||
Intro::default()
|
||||
.with_opening(IntroOpening::Custom)
|
||||
Intro::custom()
|
||||
.with_title(Lc::n("PageTop"))
|
||||
.with_slogan(Lc::t("grid_slogan", &LOC))
|
||||
.with_button(None::<(Lc, Route)>)
|
||||
.with_child(columns_block())
|
||||
.with_child(rows_gap_block())
|
||||
.with_child(placement_block())
|
||||
|
|
@ -472,7 +470,8 @@ fn layout_block() -> Block {
|
|||
// **< HELPERS >************************************************************************************
|
||||
|
||||
// Aspecto fijo de las cajas de muestra: esquinas rectas y borde claro, a diferencia de las cajas
|
||||
// redondeadas de `intro-flex.rs`, para distinguir a simple vista los ejemplos de Grid de los de Flex.
|
||||
// redondeadas de `intro-flex.rs`, para distinguir a simple vista los ejemplos de Grid de los de
|
||||
// Flex.
|
||||
fn demo_box_styles() -> AssetsOp {
|
||||
AssetsOp::add_responsive_styles(
|
||||
None,
|
||||
|
|
|
|||
|
|
@ -21,11 +21,9 @@ async fn intro_responsive(request: HttpRequest) -> Result<Markup, ErrorPage> {
|
|||
.with_assets(demo_row_styles())
|
||||
.with_assets(demo_code_styles())
|
||||
.with_child(
|
||||
Intro::default()
|
||||
.with_opening(IntroOpening::Custom)
|
||||
Intro::custom()
|
||||
.with_title(Lc::n("PageTop"))
|
||||
.with_slogan(Lc::t("responsive_slogan", &LOC))
|
||||
.with_button(None::<(Lc, Route)>)
|
||||
.with_child(Html::with(|cx| {
|
||||
html! {
|
||||
p class="intro-text-lead" {
|
||||
|
|
|
|||
|
|
@ -21,11 +21,9 @@ async fn intro_spacing(request: HttpRequest) -> Result<Markup, ErrorPage> {
|
|||
.with_assets(demo_row_styles())
|
||||
.with_assets(demo_code_styles())
|
||||
.with_child(
|
||||
Intro::default()
|
||||
.with_opening(IntroOpening::Custom)
|
||||
Intro::custom()
|
||||
.with_title(Lc::n("PageTop"))
|
||||
.with_slogan(Lc::t("spacing_slogan", &LOC))
|
||||
.with_button(None::<(Lc, Route)>)
|
||||
.with_child(Html::with(|cx| {
|
||||
html! {
|
||||
p class="intro-text-lead" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue