Skip to content

Commit

Permalink
refactor(website): ♻️ updated website routes for path prefixing
Browse files Browse the repository at this point in the history
  • Loading branch information
arctic-hen7 committed Oct 6, 2021
1 parent 83e0667 commit 28bba42
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions website/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <arctic_hen7@pm.me>"]
Expand All @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions website/src/templates/docs/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn docs_page(props: DocsPageProps) -> SycamoreTemplate<G> {
})
// 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();"
}
Expand All @@ -63,9 +63,9 @@ pub fn get_template<G: GenericNode>() -> Template<G> {
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")
}
}))
}
6 changes: 3 additions & 3 deletions website/src/templates/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn index_page() -> SycamoreTemplate<G> {
// 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")) }
Expand All @@ -41,7 +41,7 @@ pub fn index_page() -> SycamoreTemplate<G> {
}
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") {
Expand Down Expand Up @@ -102,7 +102,7 @@ pub fn index_page() -> SycamoreTemplate<G> {
// 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")) }
Expand Down

0 comments on commit 28bba42

Please sign in to comment.