Compare commits
No commits in common. "aae6c7df1582f6d956664af8a1c18e8e4967d7d1" and "940e6aaf18e13a50312cc186f33b1d1c6e14c86f" have entirely different histories.
aae6c7df15
...
940e6aaf18
8 changed files with 43 additions and 81 deletions
|
@ -269,8 +269,8 @@ pub fn builder_fn(_: TokenStream, item: TokenStream) -> TokenStream {
|
||||||
// Extrae atributos descartando la documentación para incluir en `alter_...()`.
|
// Extrae atributos descartando la documentación para incluir en `alter_...()`.
|
||||||
let non_doc_attrs: Vec<_> = attrs
|
let non_doc_attrs: Vec<_> = attrs
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|&a| !a.path().is_ident("doc"))
|
|
||||||
.cloned()
|
.cloned()
|
||||||
|
.filter(|a| !a.path().is_ident("doc"))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
// Documentación del método alter_...().
|
// Documentación del método alter_...().
|
||||||
|
|
|
@ -30,50 +30,22 @@ async fn homepage(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
|
||||||
.with_title(L10n::l("welcome_title"))
|
.with_title(L10n::l("welcome_title"))
|
||||||
.with_description(L10n::l("welcome_intro").with_arg("app", app))
|
.with_description(L10n::l("welcome_intro").with_arg("app", app))
|
||||||
.with_param("intro_button_text", L10n::l("welcome_powered"))
|
.with_param("intro_button_text", L10n::l("welcome_powered"))
|
||||||
.with_param("intro_button_link", "https://pagetop.cillero.es".to_string())
|
.with_param("intro_button_link", "https://pagetop.cillero.es".to_owned())
|
||||||
.with_assets(AssetsOp::AddJavaScript(JavaScript::on_load_async("welcome-js", |cx|
|
.add_component(Html::with(|cx| {
|
||||||
util::indoc!(r#"
|
html! {
|
||||||
try {
|
p { (L10n::l("welcome_text1").using(cx)) }
|
||||||
const resp = await fetch("https://crates.io/api/v1/crates/pagetop");
|
p { (L10n::l("welcome_text2").using(cx)) }
|
||||||
const data = await resp.json();
|
|
||||||
const date = new Date(data.versions[0].created_at);
|
|
||||||
const formatted = date.toLocaleDateString("LANGID", { year: "numeric", month: "2-digit", day: "2-digit" });
|
|
||||||
document.getElementById("welcome-release").src = `https://img.shields.io/badge/Release%20date-${encodeURIComponent(formatted)}-blue?label=LABEL&style=for-the-badge`;
|
|
||||||
document.getElementById("welcome-badges").style.display = "block";
|
|
||||||
} catch (e) {
|
|
||||||
console.error("Failed to fetch release date from crates.io:", e);
|
|
||||||
}
|
}
|
||||||
"#)
|
|
||||||
.replace("LANGID", cx.langid().to_string().as_str())
|
|
||||||
.replace("LABEL", L10n::l("welcome_release_label").using(cx).as_str())
|
|
||||||
.to_string(),
|
|
||||||
)))
|
|
||||||
.add_component(Html::with(|cx| html! {
|
|
||||||
p { (L10n::l("welcome_text1").using(cx)) }
|
|
||||||
div id="welcome-badges" style="display: none; margin-bottom: 1.1rem;" {
|
|
||||||
img
|
|
||||||
src="https://img.shields.io/crates/v/pagetop.svg?label=PageTop&style=for-the-badge"
|
|
||||||
alt=[L10n::l("welcome_pagetop_label").lookup(cx)] {} (" ")
|
|
||||||
img
|
|
||||||
id="welcome-release"
|
|
||||||
alt=[L10n::l("welcome_release_label").lookup(cx)] {} (" ")
|
|
||||||
img
|
|
||||||
src=(format!(
|
|
||||||
"https://img.shields.io/badge/license-MIT%2FApache-blue.svg?label={}&style=for-the-badge",
|
|
||||||
L10n::l("welcome_license_label").lookup(cx).unwrap_or_default()
|
|
||||||
))
|
|
||||||
alt=[L10n::l("welcome_license_label").lookup(cx)] {}
|
|
||||||
}
|
|
||||||
p { (L10n::l("welcome_text2").using(cx)) }
|
|
||||||
}))
|
}))
|
||||||
.add_component(
|
.add_component(
|
||||||
Block::new()
|
Block::new()
|
||||||
.with_title(L10n::l("welcome_notice_title"))
|
.with_title(L10n::l("welcome_about"))
|
||||||
.add_component(Html::with(move |cx| html! {
|
.add_component(Html::with(move |cx| {
|
||||||
p { (L10n::l("welcome_notice_1").using(cx)) }
|
html! {
|
||||||
p { (L10n::l("welcome_notice_2").using(cx)) }
|
p { (L10n::l("welcome_pagetop").using(cx)) }
|
||||||
p { (L10n::l("welcome_notice_3").using(cx)) }
|
p { (L10n::l("welcome_issues1").using(cx)) }
|
||||||
p { (L10n::l("welcome_notice_4").with_arg("app", app).using(cx)) }
|
p { (L10n::l("welcome_issues2").with_arg("app", app).using(cx)) }
|
||||||
|
}
|
||||||
})),
|
})),
|
||||||
)
|
)
|
||||||
.render()
|
.render()
|
||||||
|
|
|
@ -111,8 +111,8 @@ fn render_intro(page: &mut Page) -> Markup {
|
||||||
div class="intro-footer__links" {
|
div class="intro-footer__links" {
|
||||||
a href="https://crates.io/crates/pagetop" target="_blank" rel="noreferrer" { ("Crates.io") }
|
a href="https://crates.io/crates/pagetop" target="_blank" rel="noreferrer" { ("Crates.io") }
|
||||||
a href="https://docs.rs/pagetop" target="_blank" rel="noreferrer" { ("Docs.rs") }
|
a href="https://docs.rs/pagetop" target="_blank" rel="noreferrer" { ("Docs.rs") }
|
||||||
a href="https://git.cillero.es/manuelcillero/pagetop" target="_blank" rel="noreferrer" { (L10n::l("intro_code").using(page)) }
|
a href="https://git.cillero.es/manuelcillero/pagetop" target="_blank" rel="noreferrer" { (L10n::l("welcome_code").using(page)) }
|
||||||
em { (L10n::l("intro_have_fun").using(page)) }
|
em { (L10n::l("welcome_have_fun").using(page)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -314,7 +314,7 @@ impl Context {
|
||||||
.ok_or_else(|| ErrorParam::TypeMismatch {
|
.ok_or_else(|| ErrorParam::TypeMismatch {
|
||||||
key,
|
key,
|
||||||
expected: TypeInfo::FullName.of::<T>(),
|
expected: TypeInfo::FullName.of::<T>(),
|
||||||
saved: type_name,
|
saved: *type_name,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,2 @@
|
||||||
# Basic theme, intro layout.
|
|
||||||
intro_code = Code
|
|
||||||
intro_have_fun = Coding is creating
|
|
||||||
|
|
||||||
# PoweredBy component.
|
# PoweredBy component.
|
||||||
poweredby_pagetop = Powered by { $pagetop_link }
|
poweredby_pagetop = Powered by { $pagetop_link }
|
||||||
|
|
|
@ -1,21 +1,20 @@
|
||||||
welcome_extension_name = Default Homepage
|
welcome_extension_name = Default homepage
|
||||||
welcome_extension_description = Displays a default homepage when none is configured.
|
welcome_extension_description = Displays a landing page when none is configured.
|
||||||
|
|
||||||
welcome_page = Welcome page
|
welcome_page = Welcome Page
|
||||||
welcome_title = Hello, world!
|
welcome_title = Hello world!
|
||||||
|
|
||||||
welcome_intro = Discover⚡{ $app }
|
welcome_intro = Discover⚡{ $app }
|
||||||
welcome_powered = A web solution powered by <strong>PageTop</strong>
|
welcome_powered = A web solution powered by <strong>PageTop!</strong>
|
||||||
|
|
||||||
welcome_pagetop_label = PageTop version on Crates.io
|
welcome_text1 = If you can read this page, it means that the <strong>PageTop</strong> server is running correctly but has not yet been fully configured. This usually means the site is either experiencing temporary issues or is undergoing routine maintenance.
|
||||||
welcome_release_label = Release date
|
welcome_text2 = If the issue persists, please <strong>contact your system administrator</strong> for assistance.
|
||||||
welcome_license_label = License
|
|
||||||
|
|
||||||
welcome_text1 = PageTop is <strong>a Rust-based web development framework</strong> designed to build modular, extensible, and configurable web solutions.
|
welcome_about = About
|
||||||
welcome_text2 = PageTop brings back the essence of the classic web, renders on the server (SSR) and uses <em>HTML-first</em> components, CSS and JavaScript, <strong>with the performance and security of Rust</strong>.
|
welcome_pagetop = <strong>PageTop</strong> is a <a href="https://www.rust-lang.org" target="_blank">Rust</a>-based web development framework for building modular, extensible, and configurable web solutions.
|
||||||
|
|
||||||
welcome_notice_title = Notice
|
welcome_issues1 = To report issues related to the <strong>PageTop</strong> framework, please use <a href="https://git.cillero.es/manuelcillero/pagetop/issues" target="_blank">SoloGit</a>. Before opening a new issue, check existing reports to avoid duplicates.
|
||||||
welcome_notice_1 = If you can see this page, the <strong>PageTop</strong> server is running correctly, but the application is not fully configured. This may be due to routine maintenance or a temporary issue.
|
welcome_issues2 = For issues related specifically to <strong>{ $app }</strong>, please refer to its official repository or support channel, rather than directly to <strong>PageTop</strong>.
|
||||||
welcome_notice_2 = If the issue persists, please <strong>contact the system administrator</strong>.
|
|
||||||
welcome_notice_3 = To report issues with the <strong>PageTop</strong> framework, use <a href="https://git.cillero.es/manuelcillero/pagetop/issues" target="_blank" rel="noreferrer">SoloGit</a>. Before opening a new issue, review the existing ones to avoid duplicates.
|
welcome_code = Code
|
||||||
welcome_notice_4 = For issues specific to the application (<strong>{ $app }</strong>), please use its official repository or support channel.
|
welcome_have_fun = Coding is creating
|
||||||
|
|
|
@ -1,6 +1,2 @@
|
||||||
# Basic theme, intro layout.
|
|
||||||
intro_code = Código
|
|
||||||
intro_have_fun = Programar es crear
|
|
||||||
|
|
||||||
# PoweredBy component.
|
# PoweredBy component.
|
||||||
poweredby_pagetop = Funciona con { $pagetop_link }
|
poweredby_pagetop = Funciona con { $pagetop_link }
|
|
@ -1,21 +1,20 @@
|
||||||
welcome_extension_name = Página de inicio predeterminada
|
welcome_extension_name = Página de inicio predeterminada
|
||||||
welcome_extension_description = Muestra una página de inicio predeterminada cuando no hay ninguna configurada.
|
welcome_extension_description = Muestra una página de inicio predeterminada cuando no hay ninguna configurada.
|
||||||
|
|
||||||
welcome_page = Página de bienvenida
|
welcome_page = Página de Bienvenida
|
||||||
welcome_title = ¡Hola, mundo!
|
welcome_title = ¡Hola mundo!
|
||||||
|
|
||||||
welcome_intro = Descubre⚡{ $app }
|
welcome_intro = Descubre⚡{ $app }
|
||||||
welcome_powered = Una solución web creada con <strong>PageTop</strong>
|
welcome_powered = Una solución web creada con <strong>PageTop!</strong>
|
||||||
|
|
||||||
welcome_pagetop_label = Versión de PageTop en Crates.io
|
welcome_text1 = Si puedes leer esta página, significa que el servidor de <strong>PageTop</strong> funciona correctamente, pero aún no ha sido completamente configurado. Esto suele indicar que el sitio está experimentando problemas temporales o está pasando por un mantenimiento de rutina.
|
||||||
welcome_release_label = Lanzamiento
|
welcome_text2 = Si el problema persiste, por favor <strong>contacta con el administrador del sistema</strong> para recibir asistencia técnica.
|
||||||
welcome_license_label = Licencia
|
|
||||||
|
|
||||||
welcome_text1 = PageTop es un <strong>entorno de desarrollo web basado en Rust</strong>, pensado para construir soluciones web modulares, extensibles y configurables.
|
welcome_about = Acerca de
|
||||||
welcome_text2 = PageTop reivindica la esencia de la web clásica, renderiza en el servidor (SSR) utilizando componentes <em>HTML-first</em>, CSS y JavaScript, <strong>con el rendimiento y la seguridad de Rust</strong>.
|
welcome_pagetop = <strong>PageTop</strong> es un entorno de desarrollo web basado en <a href="https://www.rust-lang.org/es" target="_blank">Rust</a>, diseñado para crear soluciones web modulares, extensibles y configurables.
|
||||||
|
|
||||||
welcome_notice_title = Aviso
|
welcome_issues1 = Para comunicar cualquier problema con <strong>PageTop</strong>, utiliza <a href="https://git.cillero.es/manuelcillero/pagetop/issues" target="_blank">SoloGit</a>. Antes de informar de una incidencia, revisa los informes ya existentes para evitar duplicados.
|
||||||
welcome_notice_1 = Si puedes ver esta página, el servidor de <strong>PageTop</strong> está funcionando correctamente, pero la aplicación no está completamente configurada. Esto puede deberse a tareas de mantenimiento o a una incidencia temporal.
|
welcome_issues2 = Si se trata de fallos específicos de <strong>{ $app }</strong>, por favor acude a su repositorio oficial o canal de soporte, y no al de <strong>PageTop</strong> directamente.
|
||||||
welcome_notice_2 = Si el problema persiste, por favor, <strong>contacta con el administrador del sistema</strong>.
|
|
||||||
welcome_notice_3 = Para comunicar incidencias del propio entorno <strong>PageTop</strong>, utiliza <a href="https://git.cillero.es/manuelcillero/pagetop/issues" target="_blank" rel="noreferrer">SoloGit</a>. Antes de abrir una nueva incidencia, revisa las existentes para evitar duplicados.
|
welcome_code = Código
|
||||||
welcome_notice_4 = Para fallos específicos de la aplicación (<strong>{ $app }</strong>), utiliza su repositorio oficial o su canal de soporte.
|
welcome_have_fun = Programar es crear
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue