2026-02-08 20:09:38 +00:00
|
|
|
//! jpl-website shared components and utilities
|
|
|
|
|
|
|
|
|
|
use leptos::prelude::*;
|
|
|
|
|
|
|
|
|
|
/// Shared component that works on both server and client
|
|
|
|
|
#[component]
|
|
|
|
|
pub fn SharedComponent() -> impl IntoView {
|
|
|
|
|
view! {
|
|
|
|
|
<div class="shared-component">
|
|
|
|
|
<h2>"jpl-website Shared Component"</h2>
|
|
|
|
|
<p>"This component works on both server and client"</p>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Shared data structures for CMS
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
|
pub struct CmsPage {
|
|
|
|
|
pub id: String,
|
|
|
|
|
pub title: String,
|
|
|
|
|
pub content: String,
|
|
|
|
|
pub slug: String,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Server-only code
|
|
|
|
|
#[cfg(feature = "ssr")]
|
|
|
|
|
pub mod server {
|
|
|
|
|
//! Server-only code for jpl-website
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Client-only code
|
|
|
|
|
#[cfg(not(feature = "ssr"))]
|
|
|
|
|
pub mod client {
|
|
|
|
|
//! Client-only code for jpl-website
|
2026-02-08 20:37:49 +00:00
|
|
|
}
|