Skip to main content

wan3video_site_kit/
lib.rs

1//! URL helpers for WAN 3.0 Video (wan3video.art).
2pub const BASE: &str = "https://wan3video.art";
3pub const BRAND: &str = "WAN 3.0 Video";
4
5pub fn page_url(path: &str) -> String {
6    let p = if path.is_empty() { "/" } else if path.starts_with('/') { path } else { return format!("{BASE}/{path}"); };
7    if p == "/" { format!("{BASE}/") } else { format!("{BASE}{}", p.trim_end_matches('/')) }
8}
9
10pub fn home_url() -> String { page_url("/") }
11pub fn pricing_url() -> String { page_url("/pricing") }
12
13#[cfg(test)]
14mod tests {
15    use super::*;
16    #[test]
17    fn builds_public_urls() {
18        assert!(home_url().starts_with("https://wan3video.art"));
19        assert!(pricing_url().contains("pricing"));
20    }
21}