From 28bba423a75329f9610f7b61ee7e846e266c3d52 Mon Sep 17 00:00:00 2001 From: arctic_hen7 Date: Thu, 7 Oct 2021 09:26:56 +1100 Subject: [PATCH] =?UTF-8?q?refactor(website):=20=E2=99=BB=EF=B8=8F=20updat?= =?UTF-8?q?ed=20website=20routes=20for=20path=20prefixing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/Cargo.toml | 4 ++-- website/src/templates/docs/template.rs | 8 ++++---- website/src/templates/index.rs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/website/Cargo.toml b/website/Cargo.toml index 2f390165db..56e190febc 100644 --- a/website/Cargo.toml +++ b/website/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "perseus-website" -version = "0.3.0-beta.5" +version = "0.3.0-beta.7" edition = "2018" description = "The official website for the Perseus framework." authors = ["arctic_hen7 "] @@ -13,7 +13,7 @@ readme = "./README.md" [dependencies] # We use the current version of Perseus, not the local one -perseus = "0.3.0-beta.6" +perseus = "0.3.0-beta.7" sycamore = "0.6" sycamore-router = "0.6" serde = "1" diff --git a/website/src/templates/docs/template.rs b/website/src/templates/docs/template.rs index 1fea99155d..f2da785990 100644 --- a/website/src/templates/docs/template.rs +++ b/website/src/templates/docs/template.rs @@ -43,7 +43,7 @@ pub fn docs_page(props: DocsPageProps) -> SycamoreTemplate { }) // Because of how Perseus currently shifts everything, we need to re-highlight // And if the user starts on a page with nothing, they'll see no highlighting on any other pages, so we rerun every time the URL changes - script(src = "/perseus/.perseus/static/prism.js", defer = true) + script(src = ".perseus/static/prism.js", defer = true) script { "window.Prism.highlightAll();" } @@ -63,9 +63,9 @@ pub fn get_template() -> Template { let props: DocsPageProps = serde_json::from_str(&props.unwrap()).unwrap(); template! { title { (format!("{} | {}", props.title, t!("docs-title-base"))) } - link(rel = "stylesheet", href = "/perseus/.perseus/static/styles/markdown.css") - link(rel = "stylesheet", href = "/perseus/.perseus/static/styles/docs_links_markdown.css") - link(rel = "stylesheet", href = "/perseus/.perseus/static/prism.css") + link(rel = "stylesheet", href = ".perseus/static/styles/markdown.css") + link(rel = "stylesheet", href = ".perseus/static/styles/docs_links_markdown.css") + link(rel = "stylesheet", href = ".perseus/static/prism.css") } })) } diff --git a/website/src/templates/index.rs b/website/src/templates/index.rs index 85fba82388..8e9d87b38a 100644 --- a/website/src/templates/index.rs +++ b/website/src/templates/index.rs @@ -15,7 +15,7 @@ pub fn index_page() -> SycamoreTemplate { // Splash page div( class = "bg-cover h-full flex justify-center items-center text-center dark:text-white", - style = "background-image: url(\"/perseus/.perseus/static/svg/splash_page_bg.svg\"), url(\"/perseus/.perseus/static/svg/polygon_scatter.svg\");" + style = "background-image: url(\".perseus/static/svg/splash_page_bg.svg\"), url(\".perseus/static/svg/polygon_scatter.svg\");" ) { div { p(class = "text-7xl xs:text-8xl sm:text-9xl p-2 font-extrabold") { (t!("perseus")) } @@ -41,7 +41,7 @@ pub fn index_page() -> SycamoreTemplate { } div( class = "bg-cover py-4 text-white", - style = "background-image: url(\"/perseus/.perseus/static/svg/stacked_waves.svg\");" + style = "background-image: url(\".perseus/static/svg/stacked_waves.svg\");" ) { // Brief description div(class = "flex justify-center text-center text-lg w-full") { @@ -102,7 +102,7 @@ pub fn index_page() -> SycamoreTemplate { // Second CTA div( class = "pb-24 flex flex-col justify-center text-white", - style = "background: url(\"/perseus/.perseus/static/svg/cta_bg.svg\");background-size:cover;" + style = "background: url(\".perseus/static/svg/cta_bg.svg\");background-size:cover;" ) { div(class = "text-3xl 2xs:text-4xl xs:text-5xl sm:text-6xl p-2 font-extrabold text-center") { p { (t!("index-cta.first")) }