feat: add rust browser terminal prototype
This commit is contained in:
6
app_config/Cargo.toml
Normal file
6
app_config/Cargo.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "app_config"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
18
app_config/src/lib.rs
Normal file
18
app_config/src/lib.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
pub struct SiteConfig;
|
||||
|
||||
impl SiteConfig {
|
||||
pub const TITLE: &str = "BASE_PATH Demo";
|
||||
pub const DESCRIPTION: &str = "A small Leptos SSR app for validating sub-path deployment.";
|
||||
pub const BASE_URL: &str = "http://127.0.0.1:3100";
|
||||
pub const BASE_PATH: &str = "/rustui";
|
||||
|
||||
pub fn with_base_path(path: &str) -> String {
|
||||
if Self::BASE_PATH.is_empty() {
|
||||
path.to_owned()
|
||||
} else if path == "/" {
|
||||
Self::BASE_PATH.to_owned()
|
||||
} else {
|
||||
format!("{}{}", Self::BASE_PATH, path)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user