diff --git a/src/components/community_teams.rs b/src/components/community_teams.rs index 8c43e6b..3384ca6 100644 --- a/src/components/community_teams.rs +++ b/src/components/community_teams.rs @@ -36,14 +36,14 @@ pub fn CommunityTeams() -> impl IntoView { let steering_committee = create_steering_committee(); view! { -
+
-
+
{"How ODP is built by its community"}
-
+
{"The Open Device Partnership (ODP) is a collaborative open-source initiative designed to promote cooperative innovation in firmware development through contribution and transparency."} diff --git a/src/components/documentation_training.rs b/src/components/documentation_training.rs index 8958c52..dfbc237 100644 --- a/src/components/documentation_training.rs +++ b/src/components/documentation_training.rs @@ -44,7 +44,7 @@ pub const DEFAULT_DOC_LINKS: &[DocLink] = &[ #[component] pub fn DocumentationTraining(#[prop(default = DEFAULT_DOC_LINKS.to_vec())] links: Vec) -> impl IntoView { view! { -
+
impl IntoView { let menu_open = RwSignal::new(false); + let close_menu = move || menu_open.set(false); + + // ESC closes the mobile menu when it is open. + window_event_listener(ev::keydown, move |e| { + if e.key() == "Escape" && menu_open.get_untracked() { + menu_open.set(false); + } + }); + view! {
-
+
-
} } #[component] -fn NavButton(href: &'static str, label: &'static str, #[prop(optional)] mobile: bool) -> impl IntoView { +fn NavButton( + href: &'static str, + label: &'static str, + #[prop(optional)] mobile: bool, + #[prop(optional, into)] on_navigate: Option>, +) -> impl IntoView { let location = leptos_router::hooks::use_location(); let is_active = move || location.pathname.get().starts_with(href); @@ -71,6 +104,12 @@ fn NavButton(href: &'static str, label: &'static str, #[prop(optional)] mobile: class:odp-header-btn-active=is_active class:odp-header-btn-active-text=is_active class:w-full=mobile + attr:aria-current=move || if is_active() { Some("page") } else { None } + on:click=move |_| { + if let Some(cb) = on_navigate { + cb.run(()); + } + } > {label} @@ -78,7 +117,12 @@ fn NavButton(href: &'static str, label: &'static str, #[prop(optional)] mobile: } #[component] -fn ExternalNavButton(href: &'static str, label: &'static str, #[prop(optional)] mobile: bool) -> impl IntoView { +fn ExternalNavButton( + href: &'static str, + label: &'static str, + #[prop(optional)] mobile: bool, + #[prop(optional, into)] on_navigate: Option>, +) -> impl IntoView { view! { {label} diff --git a/src/components/image_button.rs b/src/components/image_button.rs index 0ae014e..2465099 100644 --- a/src/components/image_button.rs +++ b/src/components/image_button.rs @@ -1,54 +1,23 @@ use leptos::prelude::*; +/// Rounded image rendered as a link. +/// +/// Sizing is purely declarative via Tailwind utilities passed in `class`. +/// The default `aspect-square max-w-[350px]` matches the landing-page +/// tiles; call sites override the cap when the surrounding layout calls +/// for a larger image. There is no per-instance ` - alt + + alt } -} +} \ No newline at end of file diff --git a/src/components/landing_page.rs b/src/components/landing_page.rs index 09530b7..9dd87de 100644 --- a/src/components/landing_page.rs +++ b/src/components/landing_page.rs @@ -5,14 +5,17 @@ use leptos::prelude::*; #[component] pub fn LandingPage() -> impl IntoView { view! { -
+
-
+
{"An Open Collaboration for Secure, Modern Devices"}
-
+
{"The Open Device Partnership (ODP) is a global initiative to make it easier for developers and device makers to build secure, efficient, and reliable client devices for cross-platform needs and certified environments."}

@@ -21,11 +24,11 @@ pub fn LandingPage() -> impl IntoView {
-
+

{"Value Proposition"}

-
+
{"Enhanced Security"} @@ -34,7 +37,7 @@ pub fn LandingPage() -> impl IntoView { {"Security threats continue to evolve. ODP takes a proactive approach: reducing attack surfaces, using secure hardware features, leveraging the memory-safe Rust language, and designing every component with security-first principles."}
-
+
{"Standardization"} @@ -43,7 +46,7 @@ pub fn LandingPage() -> impl IntoView { {"Many device firmware components are 'invisible plumbing' - necessary but costly to build and maintain. ODP's standards-based approach simplifies this infrastructure, maximizing reuse across devices, architectures (x86 and ARM), and generations."}
-
+
{"Accelerated Development"} @@ -57,7 +60,7 @@ pub fn LandingPage() -> impl IntoView {
// ODP Projects Section -
+

{"ODP Projects"}

@@ -69,7 +72,7 @@ pub fn LandingPage() -> impl IntoView {

// Boot Firmware Buttons Section -
+
impl IntoView {
// Two Columns Section -
+
{"Partner-Oriented Vision"} diff --git a/src/components/main.rs b/src/components/main.rs index 0b02994..1ec9a3f 100644 --- a/src/components/main.rs +++ b/src/components/main.rs @@ -6,8 +6,8 @@ use leptos_router::components::A; pub fn Main() -> impl IntoView { view! {
-
-
+
+

"Building the Future of Trusted System Software Together"

@@ -16,10 +16,10 @@ pub fn Main() -> impl IntoView {

-
+
@@ -31,7 +31,7 @@ pub fn Main() -> impl IntoView {
@@ -45,7 +45,7 @@ pub fn Main() -> impl IntoView {
-
+
impl IntoView {