Fix favicon (real icon, not an unrelated orange circle) + stack encouragements with the submit button
Deploy / deploy (push) Successful in 35s
Deploy / deploy (push) Successful in 35s
favicon.svg was a plain solid circle, unrelated to the actual brand
mark - replaced with the real single-arch icon (matching
infrastructure/assets/icon-{light,dark}.svg), split into two
prefers-color-scheme-scoped files rather than one SVG with an embedded
@media query - the latter doesn't reliably re-evaluate via <link> on
Safari/iOS (confirmed by prior real-device testing on the Gitea side,
see gitea-head.tmpl).
Encouragements used to render right after the description, separated
from the actual submit button by the whole features/requirements
block - moved them into the same wrapper as the form, directly above
the button, so reassurance text and the call to action read together.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
aa18c69be4
commit
11c6f3e8f7
+23
-15
@@ -32,7 +32,13 @@ pub fn shell(options: LeptosOptions) -> impl IntoView {
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml"/>
|
||||
// Two prefers-color-scheme-scoped links, not one SVG with
|
||||
// an embedded @media query - confirmed via real-device
|
||||
// testing (see infrastructure's gitea-head.tmpl) that an
|
||||
// SVG's own internal @media doesn't reliably re-evaluate
|
||||
// once loaded via <link>/<img> on Safari/iOS.
|
||||
<link rel="icon" media="(prefers-color-scheme: light)" href="/favicon-light.svg" type="image/svg+xml"/>
|
||||
<link rel="icon" media="(prefers-color-scheme: dark)" href="/favicon-dark.svg" type="image/svg+xml"/>
|
||||
<AutoReload options=options.clone()/>
|
||||
<HydrationScripts options/>
|
||||
<MetaTags/>
|
||||
@@ -558,11 +564,6 @@ fn AlternativeCard(
|
||||
<section class="alt-card">
|
||||
<h2>{alternative.name.clone()}</h2>
|
||||
<p class="alt-description">{alternative.description.clone()}</p>
|
||||
<For
|
||||
each=move || alternative.encouragements.clone()
|
||||
key=|e| e.clone()
|
||||
children=move |e| view! { <p class="alt-encouragement">{e}</p> }
|
||||
/>
|
||||
<div class="features">
|
||||
<For
|
||||
each={
|
||||
@@ -766,15 +767,22 @@ fn AlternativeCard(
|
||||
{has_action
|
||||
.then(|| {
|
||||
view! {
|
||||
<form on:submit=on_submit>
|
||||
<button
|
||||
type="submit"
|
||||
class="alt-submit"
|
||||
disabled=move || submit.pending().get()
|
||||
>
|
||||
{button_label.clone()}
|
||||
</button>
|
||||
</form>
|
||||
<div class="alt-cta">
|
||||
<For
|
||||
each=move || alternative.encouragements.clone()
|
||||
key=|e| e.clone()
|
||||
children=move |e| view! { <p class="alt-encouragement">{e}</p> }
|
||||
/>
|
||||
<form on:submit=on_submit>
|
||||
<button
|
||||
type="submit"
|
||||
class="alt-submit"
|
||||
disabled=move || submit.pending().get()
|
||||
>
|
||||
{button_label.clone()}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
})}
|
||||
</section>
|
||||
|
||||
+4
-2
@@ -117,7 +117,8 @@ async fn main() -> anyhow::Result<()> {
|
||||
"{}/{}",
|
||||
leptos_options.site_root, leptos_options.site_pkg_dir
|
||||
);
|
||||
let favicon_path = format!("{}/favicon.svg", leptos_options.site_root);
|
||||
let favicon_light_path = format!("{}/favicon-light.svg", leptos_options.site_root);
|
||||
let favicon_dark_path = format!("{}/favicon-dark.svg", leptos_options.site_root);
|
||||
let fonts_dir = format!("{}/fonts", leptos_options.site_root);
|
||||
|
||||
let app = Router::new()
|
||||
@@ -130,7 +131,8 @@ async fn main() -> anyhow::Result<()> {
|
||||
.route("/automation/kv/{bucket}", get(content::automation_kv_handler))
|
||||
.nest_service("/pkg", ServeDir::new(pkg_dir))
|
||||
.nest_service("/fonts", ServeDir::new(fonts_dir))
|
||||
.route_service("/favicon.svg", ServeFile::new(favicon_path))
|
||||
.route_service("/favicon-light.svg", ServeFile::new(favicon_light_path))
|
||||
.route_service("/favicon-dark.svg", ServeFile::new(favicon_dark_path))
|
||||
.leptos_routes_with_context(
|
||||
&state,
|
||||
routes,
|
||||
|
||||
Reference in New Issue
Block a user