Some checks failed
CI/CD Pipeline / Test Suite (push) Has been cancelled
CI/CD Pipeline / Security Audit (push) Has been cancelled
CI/CD Pipeline / Performance Benchmarks (push) Has been cancelled
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
CI/CD Pipeline / Build Docker Image (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Cleanup (push) Has been cancelled
35 lines
773 B
Rust
35 lines
773 B
Rust
//! 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
|
|
}
|