diff --git a/assets/style/contact.css b/assets/style/contact.css new file mode 100644 index 0000000..442cb22 --- /dev/null +++ b/assets/style/contact.css @@ -0,0 +1,34 @@ +@import "style.css"; + +.page-title { + color: var(--carpYellow); +} + +.body-wrapper { + display: flex; + direction: row; + margin-top: auto; + margin-bottom: auto; + background: linear-gradient( + -45deg, + hsl(204, 7.81%, 25.1%) 0%, + hsla(204, 7.81%, 25.1%, 0.99) 8.1%, + hsla(203.08, 10.24%, 24.9%, 0.963) 15.5%, + hsla(205.71, 11.11%, 24.71%, 0.921) 22.5%, + hsla(203.33, 14.52%, 24.31%, 0.867) 29%, + hsla(201.82, 18.03%, 23.92%, 0.803) 35.3%, + hsla(204, 20.66%, 23.73%, 0.732) 41.2%, + hsla(202.76, 24.37%, 23.33%, 0.658) 47.1%, + hsla(203.64, 28.21%, 22.94%, 0.582) 52.9%, + hsla(202.7, 32.17%, 22.55%, 0.508) 58.8%, + hsla(202.5, 35.71%, 21.96%, 0.437) 64.7%, + hsla(202.33, 38.74%, 21.76%, 0.373) 71%, + hsla(202.67, 41.28%, 21.37%, 0.319) 77.5%, + hsla(202.5, 44.44%, 21.18%, 0.277) 84.5%, + hsla(202.04, 45.79%, 20.98%, 0.25) 91.9%, + hsla(202.04, 45.79%, 20.98%, 0.24) 100% + ); + + padding: 15px; + border-radius: 15px; +} \ No newline at end of file diff --git a/assets/templates/footer.html b/assets/templates/footer.html index f483c4c..cb31ce6 100644 --- a/assets/templates/footer.html +++ b/assets/templates/footer.html @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/assets/templates/static/contact.html b/assets/templates/static/contact.html new file mode 100644 index 0000000..a2129be --- /dev/null +++ b/assets/templates/static/contact.html @@ -0,0 +1,33 @@ + + + + + Contact + + + + + + +{% include "nav.html" %} + + +
+
Contact Info
+

I can be reached in primarily two locations: +

+

+ I should take no more than 48 hours to get back to you. If you haven't received a response in 48 hours, please + send or update a comment with a ping to me. I probably earmarked it and forgot to come back to it or didn't see + it. +

+
+ + +{% include "footer.html" %} + + \ No newline at end of file diff --git a/assets/templates/credits.html b/assets/templates/static/credits.html similarity index 100% rename from assets/templates/credits.html rename to assets/templates/static/credits.html diff --git a/assets/templates/home.html b/assets/templates/static/home.html similarity index 69% rename from assets/templates/home.html rename to assets/templates/static/home.html index 225057c..23ada8c 100644 --- a/assets/templates/home.html +++ b/assets/templates/static/home.html @@ -16,11 +16,11 @@ sometimes write Rust. This page is generated from a Rust static site generator I wrote, it's not very good but it makes me happy. I'm a big fan of reproducible systems and infrastructure, though I'm not sure if I'm sold on NixOS just yet. I hold it as a dumb source of pride that I can wipe my laptop and have everything back to normal within - 20 - minutes depending on how nice Github's rate limit wants to play. Hit me up at my email if you want to get in contact.

-

Maggie and Ellie say hi: Black labrador and yellow
-      labrador dogs sleeping on bed with blankets over them

+ 20 minutes depending on how nice Github's rate limit wants to play. Hit me up at my email or on Github if you want to get in contact.

+

Maggie and Ellie say hi: Black labrador and yellow labrador dogs sleeping on bed with blankets over them

diff --git a/src/main.rs b/src/main.rs index 55d66d9..9bd78ac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -106,16 +106,18 @@ fn main() -> anyhow::Result<()> { } println!("Finished rendering Individual Tag Pages"); - let empty_context = tera::Context::new(); - println!("Rendering Home Page"); - let home_page = tera.render("home.html", &empty_context)?; - write_file(&out_path.join("home.html"), home_page.as_bytes())?; - println!("Finished rendering Home Page"); + // TODO: Refactor this so we recursively walk a directory and get these instead of updating a + // vec everytime + let static_pages = vec!["home.html", "credits.html", "contact.html"]; + let static_context = tera::Context::new(); - println!("Rendering Credits Page"); - let credits_page = tera.render("credits.html", &empty_context)?; - write_file(&out_path.join("credits.html"), credits_page.as_bytes())?; - println!("Finished rendering Home Page"); + for static_page in static_pages { + println!("Rendering Static Page: {}", &static_page); + let rendered_static_page = tera.render(&format!("static/{}", &static_page), &static_context)?; + write_file(&out_path.join(&static_page), rendered_static_page.as_bytes())?; + println!("Finished Rendering Static Page: {}", &static_page); + + } let base_asset_dir = PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/")); copy_recursive(&base_asset_dir.join("style/"), &out_path.join("style"))?;