diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .prettierrc.json | 11 | ||||
-rw-r--r-- | Cargo.lock | 294 | ||||
-rw-r--r-- | Cargo.toml | 6 | ||||
-rw-r--r-- | src/main.rs | 56 | ||||
-rw-r--r-- | static/about/index.php | 50 | ||||
-rw-r--r-- | static/assets/favicon.ico | bin | 327262 -> 0 bytes | |||
-rw-r--r-- | static/footer.php | 28 | ||||
-rw-r--r-- | static/header.php | 286 | ||||
-rw-r--r-- | static/index.php | 479 | ||||
-rw-r--r-- | templates/about.hbs | 52 | ||||
-rw-r--r-- | templates/base.hbs | 4 | ||||
-rw-r--r-- | templates/policies.hbs (renamed from static/policies/index.php) | 6 |
13 files changed, 108 insertions, 1165 deletions
@@ -7,3 +7,4 @@ PHPMailer-master /target *.core +*.core diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index a455f4e..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "proseWrap": "always", - "overrides": [ - { - "files": "*.liquid", - "options": { - "parser": "html" - } - } - ] -} @@ -8,7 +8,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" dependencies = [ - "getrandom 0.2.3", + "getrandom", "once_cell", "version_check", ] @@ -62,16 +62,6 @@ dependencies = [ ] [[package]] -name = "buf_redux" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" -dependencies = [ - "memchr", - "safemem", -] - -[[package]] name = "byte-tools" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -228,7 +218,6 @@ dependencies = [ "futures-task", "pin-project-lite", "pin-utils", - "slab", ] [[package]] @@ -252,24 +241,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ "cfg-if", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -300,7 +278,7 @@ dependencies = [ "log", "pest", "pest_derive", - "quick-error 2.0.1", + "quick-error", "serde", "serde_json", ] @@ -416,17 +394,6 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] name = "indexmap" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -437,15 +404,6 @@ dependencies = [ ] [[package]] -name = "input_buffer" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97967975f448f1a7ddb12b0bc41069d09ed6a1c161a92687e057325db35d413" -dependencies = [ - "bytes", -] - -[[package]] name = "itoa" version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -539,24 +497,6 @@ dependencies = [ ] [[package]] -name = "multipart" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050aeedc89243f5347c3e237e3e13dc76fbe4ae3742a57b94dc14f69acf76d4" -dependencies = [ - "buf_redux", - "httparse", - "log", - "mime", - "mime_guess", - "quick-error 1.2.3", - "rand 0.7.3", - "safemem", - "tempfile", - "twoway", -] - -[[package]] name = "ntapi" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -681,12 +621,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] -name = "ppv-lite86" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" - -[[package]] name = "proc-macro2" version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -697,12 +631,6 @@ dependencies = [ [[package]] name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quick-error" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" @@ -717,105 +645,6 @@ dependencies = [ ] [[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", - "rand_hc 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom 0.2.3", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.3", -] - -[[package]] -name = "redox_syscall" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" -dependencies = [ - "bitflags", -] - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] name = "rusqlite" version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -837,12 +666,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - -[[package]] name = "scoped-tls" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -959,20 +782,6 @@ dependencies = [ ] [[package]] -name = "tempfile" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" -dependencies = [ - "cfg-if", - "libc", - "rand 0.8.4", - "redox_syscall", - "remove_dir_all", - "winapi", -] - -[[package]] name = "time" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -983,21 +792,6 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] name = "tokio" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1039,19 +833,6 @@ dependencies = [ ] [[package]] -name = "tokio-tungstenite" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1a5f475f1b9d077ea1017ecbc60890fda8e54942d680ca0b1d2b47cfa2d861b" -dependencies = [ - "futures-util", - "log", - "pin-project", - "tokio", - "tungstenite", -] - -[[package]] name = "tokio-util" version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1099,34 +880,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] -name = "tungstenite" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ada8297e8d70872fa9a551d93250a9f407beb9f37ef86494eb20012a2ff7c24" -dependencies = [ - "base64", - "byteorder", - "bytes", - "http", - "httparse", - "input_buffer", - "log", - "rand 0.8.4", - "sha-1 0.9.7", - "url", - "utf-8", -] - -[[package]] -name = "twoway" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" -dependencies = [ - "memchr", -] - -[[package]] name = "typenum" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1148,45 +901,12 @@ dependencies = [ ] [[package]] -name = "unicode-bidi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" - -[[package]] -name = "unicode-normalization" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" -dependencies = [ - "tinyvec", -] - -[[package]] name = "unicode-xid" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] -name = "url" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" -dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1222,7 +942,6 @@ dependencies = [ "log", "mime", "mime_guess", - "multipart", "percent-encoding", "pin-project", "scoped-tls", @@ -1231,7 +950,6 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-stream", - "tokio-tungstenite", "tokio-util", "tower-service", "tracing", @@ -1239,12 +957,6 @@ dependencies = [ [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" @@ -7,11 +7,13 @@ authors = ["Adam T. Carpenter <atc@53hor.net>"] [dependencies] #env_logger = { version = "0.8", default-features = false } #log = "0.4" -#serde_urlencoded = "0.7" handlebars = "3" lazy_static = "1.4" rusqlite = "0.25" -warp = "0.3" + +[dependencies.warp] +version = "0.3" +default-features = false [dependencies.serde] version = "1" diff --git a/src/main.rs b/src/main.rs index cbabc10..5359661 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,7 @@ use handlebars::Handlebars; use serde::Serialize; -use serde_json::json; use std::sync::Arc; -use std::time::SystemTime; -use warp::{Filter, Rejection}; +use warp::{http::Uri, Filter, Rejection}; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { @@ -11,10 +9,14 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let mut hbs = Handlebars::new(); hbs.register_template_file("base", "templates/base.hbs")?; hbs.register_template_file("index", "templates/index.hbs")?; + hbs.register_template_file("policies", "templates/policies.hbs")?; + hbs.register_template_file("about", "templates/about.hbs")?; let hbs = Arc::new(hbs); // Build routes let routes = index_filter(hbs.clone()) + .or(template_filter(hbs.clone())) + .or(redirect_static_ext()) .or(evals_list()) .or(warp::fs::dir("static")); @@ -30,7 +32,44 @@ fn index_filter( ) -> impl Filter<Extract = (impl warp::Reply,), Error = Rejection> + Clone { warp::get() .and(warp::path::end()) - .map(move || render("index", hbs.clone(), json!({"year", year().unwrap()}))) + .map(move || render("index", hbs.clone(), "")) +} + +fn template_filter( + hbs: Arc<Handlebars<'static>>, +) -> impl Filter<Extract = (impl warp::Reply,), Error = Rejection> + Clone { + warp::path!(String).and_then(move |name: String| { + let hbs = hbs.clone(); + async move { + if hbs.has_template(&name) { + Ok(render(&name, hbs, "")) + } else { + Err(warp::reject::not_found()) + } + } + }) +} + +fn redirect_static_ext() -> impl Filter<Extract = (impl warp::Reply,), Error = Rejection> + Clone { + warp::path!(String).and_then(move |path: String| async move { + if let Some(prefix) = path.strip_suffix(".php") { + return Ok(warp::redirect( + prefix + .parse::<Uri>() + .unwrap_or_else(|_| Uri::from_static("/")), + )); + } + + if let Some(prefix) = path.strip_suffix(".html") { + return Ok(warp::redirect( + prefix + .parse::<Uri>() + .unwrap_or_else(|_| Uri::from_static("/")), + )); + } + + Err(warp::reject::not_found()) + }) } fn evals_list() -> impl Filter<Extract = (&'static str,), Error = Rejection> + Clone { @@ -49,12 +88,3 @@ where .unwrap_or_else(|err| err.to_string()); warp::reply::html(render) } - -const UNIX_YEAR: u64 = 31556926; - -fn year() -> Result<u64, Box<dyn std::error::Error>> { - let date = SystemTime::now() - .duration_since(SystemTime::UNIX_EPOCH)? - .as_secs(); - Ok(date / UNIX_YEAR) -} diff --git a/static/about/index.php b/static/about/index.php deleted file mode 100644 index 0b09bfc..0000000 --- a/static/about/index.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php include('../header.php'); ?> -<section class="banner"> - <h1>About Me</h1> -</section> - -<section class="quiet"> - <h2> - School is tricky, and there is no universal pathway to success. I started - Carpenter Tutoring for those seeking a little help finding their way. - </h2> - - <p> - I received my B.A. from The College of William and Mary in 2018 and received - my M.Ed. from W&M in 2020. As an undergraduate, I worked and was trained - as a tutor at W&M's peer tutoring center, the Tribe TutorZone. During - this period, I conducted over 150 one-on-one appointments with W&M - students in 26 different content areas. I earned lifetime Advanced Tutor - Certification, the highest level W&M can grant, through the College - Reading and Learning Association, and I was trained as a time management - consultant. I took on leadership roles within the TutorZone until I was - working alongside its director. As a graduate student, I became one of the - Graduate Assistants helping oversee the TutorZone as well as an academic - coach to students with high need for academic support. - </p> - - <p> - I loved getting to work with the Tribe TutorZone tutors, but I realized that - I missed being the tutor. There's just nothing like watching the light bulb - of understanding go off or seeing students who had struggled with material - master it! With that realization, I decided to dedicate my life to my - passion -- helping students of all ages learn, succeed, and believe in - themselves. - </p> - - <p> - My instructional approach focuses on meeting students where they are and - supporting them through any hesitations or discomforts from which academic - difficulties may arise. Whether your student only has to brush up on a few - concepts or is resistant to completing coursework, I will come to each - session with patience, understanding, and just the right amount of - discipline. I truly believe that excellent educational relationships begin - with mutual respect, and I work to build meaningful relationships with all - of my clients. - </p> - - <p>Thank you for considering Carpenter Tutoring.</p> - -</section> -<section></section> -<?php include('../footer.php'); ?> diff --git a/static/assets/favicon.ico b/static/assets/favicon.ico Binary files differdeleted file mode 100644 index 8ba4c15..0000000 --- a/static/assets/favicon.ico +++ /dev/null diff --git a/static/footer.php b/static/footer.php deleted file mode 100644 index 91bc9d6..0000000 --- a/static/footer.php +++ /dev/null @@ -1,28 +0,0 @@ -</main> - -<footer> - <figure class="logo"> - <picture> - <source srcset="/assets/logo.webp" type="image/webp" /> - <source srcset="/assets/logo.png" type="image/png" /> - <img src="/assets/logo.png" /> - </picture> - </figure> - <p> - © - <?php echo date('Y'); ?> - Carpenter Tutoring, LLC. All rights reserved. - </p> - <p> - <a href="https://g.page/carpenter-tutoring?share">Visit me on Google</a> - | - <a href="https://g.page/carpenter-tutoring/review?np">Submit a review</a> - | - <a href="mailto:webmaster@carpentertutoring.com"> - Having trouble with our site? - </a> - </p> -</footer> -</body> - -</html> diff --git a/static/header.php b/static/header.php deleted file mode 100644 index 42925fa..0000000 --- a/static/header.php +++ /dev/null @@ -1,286 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - -<head> - <title> - Tutoring Excellence Online and in Hampton Roads, VA - Carpenter Tutoring, - LLC - </title> - <style> - /* Colors */ - :root { - --darkteal: rgb(0, 100, 108); - --green: rgb(88, 169, 143); - --darkerteal: rgb(29, 133, 137); - --gray: rgb(157, 210, 211); - --teal: rgb(58, 165, 166); - --cyan: rgb(156, 210, 210); - --darkgray: rgb(127, 177, 181); - --darkgreen: rgb(59, 136, 114); - --yellow: rgb(186, 214, 187); - } - - /* Elements */ - - html, - body { - margin: 0; - padding: 0; - font-family: "PT Sans", sans-serif; - color: dimgray; - } - - body { - background-image: url("/assets/bg.png"); - } - - .banner { - font-size: 1em; - text-align: center; - padding: 3em; - background-color: white; - } - - nav { - display: flex; - background-color: white; - flex-direction: column-reverse; - } - - nav img { - height: 1.4em; - } - - nav a { - font-family: "PT Sans", sans-serif; - color: dimgray; - text-align: center; - text-decoration: none; - padding: 1em 1em; - transition: 0.15s; - } - - nav a:hover { - color: var(--darkteal); - background-color: lightgray; - } - - div.buttons { - display: flex; - flex-direction: column; - } - - h1 { - font-size: 3em; - color: var(--darkteal); - font-family: "Architects Daughter", cursive; - } - - h2 { - font-size: 2em; - color: var(--darkteal); - font-family: "Indie Flower", cursive; - } - - section { - font-size: 1.5em; - margin: 0; - padding: 1em; - } - - section.quiet { - background-color: white; - } - - .button img { - margin-right: 1em; - } - - button.button, - a.button { - display: flex; - align-items: center; - background-color: var(--teal); - padding-left: 1em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; - margin-right: 0.5em; - margin-bottom: 0.5em; - text-decoration: none; - color: white; - border-radius: 3em; - transition: 0.15s; - } - - button.button:hover, - a.button:hover { - box-shadow: 0 4px 8px 0 lightgray, 0 6px 20px 0 lightgray; - } - - button { - font-family: "PT Sans", sans-serif; - border: none; - font-size: 0.75em; - } - - a.primary { - background-color: var(--darkteal); - } - - footer { - background-color: white; - text-align: center; - padding: 3em; - font-size: 1.5em; - } - - footer a, - section a { - color: var(--darkteal); - text-decoration: underline; - } - - .card { - font-size: 0.9em; - background-color: white; - padding: 1em; - border-radius: 1em; - margin-left: 0; - margin-right: 0; - } - - form input, - form textarea { - font-family: "PT Sans", sans-serif; - margin-bottom: 1.5em; - box-sizing: border-box; - width: 100%; - border: 1px solid lightgray; - padding: 1em; - } - - form input { - border-radius: 3em; - } - - textarea { - border-radius: 1em; - resize: none; - } - - table { - width: 100%; - border-collapse: collapse; - } - - table th { - text-align: right; - color: var(--darkteal); - } - - table td, - table th { - vertical-align: bottom; - } - - tr:nth-child(even) { - background-color: lightgray; - } - - picture img { - width: 100%; - } - - .shadowy img { - box-shadow: 0 4px 8px 0 dimgray, 0 6px 20px 0 dimgray; - } - - figcaption { - text-align: right; - color: var(--darkteal); - font-family: "Architects Daughter", cursive; - } - - section.flexible { - display: flex; - flex-direction: column; - } - - #reviews .card, - #offerings .card { - margin: 1em; - text-align: center; - } - - #reviews, - #offerings { - padding-left: 0; - padding-right: 0; - display: flex; - flex-wrap: wrap; - justify-content: center; - } - - .modal { - position: fixed; - z-index: 1; - left: 0; - top: 0; - width: 100%; - height: 100%; - background-color: white; - background-color: rgba(1, 1, 1, 0.4); - overflow: auto; - display: none; - font-size: 1.5em; - } - - .modal .card { - max-height: 90%; - max-width: 60%; - } - - .modal a, - .card a.button { - float: right; - } - - :target.modal { - display: flex; - justify-content: center; - align-items: center; - } - - :target.modal .card { - overflow: auto; - } - </style> - <link rel="preconnect" href="https://fonts.gstatic.com" /> - <link href="https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Indie+Flower&family=PT+Sans&display=swap" rel="stylesheet" /> - <link rel="stylesheet" href="/desktop.css" /> - <link rel="stylesheet" href="/widescreen.css" /> - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="description" content="Tutoring Excellence Online and in Hampton Roads, VA" /> - <meta property="og:description" content="Tutoring excellence online and in-person" /> - <meta property="og:image" content="http://carpentertutoring.com/assets/logo.webp" /> - <meta property="og:image:secure_url" content="https://carpentertutoring.com/assets/logo.webp" /> - <meta property="og:site_name" content="Carpenter Tutoring" /> - <meta property="og:title" content="Tutoring Excellence Online and in Hampton Roads, VA - Carpenter Tutoring, LLC" /> - <meta property="og:type" content="website" /> - <meta property="og:url" content="https://carpentertutoring.com" /> -</head> - -<body> - <nav> - <a href="/#contact">Contact Me</a> - <a href="/#reviews">Reviews</a> - <a href="/about">About</a> - <a href="/policies">Policies</a> - <a href="/#pricing">Pricing</a> - <a href="/#offerings">Offerings</a> - <a href="/#"><img src="/assets/logo-simple.png" /></a> - </nav> - - <main> diff --git a/static/index.php b/static/index.php deleted file mode 100644 index c3aef21..0000000 --- a/static/index.php +++ /dev/null @@ -1,479 +0,0 @@ -<?php include('header.php'); ?> -<!--banner--> -<section class="banner"> - <h1>CARPENTER TUTORING</h1> - <h2> - <b>Discovering <em>your</em> path to success</b> - </h2> - - <div class="buttons"> - <a class="button" href="/#contact"> <img src="/assets/icons/email-variant.svg" alt="mailbox" /> Send a message</a> - <a class="button primary" href="tel:1-757-335-7555"> - <img src="/assets/icons/phone-classic.svg" alt="phone" /> - (757) 335-7555</a> - </div> -</section> - -<!-- welcome--> -<section class="quiet flexible"> - <div> - <h2> - Welcome, and thank you for your interest in Carpenter Tutoring! - </h2> - - <p> - Carpenter Tutoring is a private tutoring service based in Suffolk, - Virginia. I offer in-person sessions throughout the Hampton Roads - area and remote sessions anywhere in the country. Most of my - offerings are one-on-one, and group sessions and classes are also - available. No matter your budget, I am confident that we can find an - arrangement that will provide your student services without creating - financial strain. - </p> - - <p> - I invite you to explore my site to learn more about the <a href="/#offerings"> - services I offer - </a>, - <a href="/about">my background</a> - , - and some of <a href="/policies">my policies</a>. Thank you for visiting, and - please do not hesitate to reach out with any questions. I would be thrilled to - assist you! - </p> - - <figure class="signature"> - <picture> - <source srcset="/assets/signature.webp" type="image/webp" /> - <source srcset="/assets/signature.png" type="image/png" /> - <img src="/assets/signature.png" /> - </picture> - </figure> - - </div> - - <figure class="shadowy"> - <picture> - <source srcset="/assets/amy.webp" type="image/webp" /> - <source srcset="/assets/amy.png" type="image/png" /> - <img src="/assets/amy.png" /> - </picture> - <figcaption>Amy Carpenter, M.Ed.</figcaption> - </figure> -</section> - -<!-- offering modals --> -<div id="offering-subject-tutoring" class="modal"> - <div class="card"> - <p> - My regular subject specific offerings include: - - <ul> - <li> All levels of reading/language arts/English</li> - <li> Writing (formal and creative)</li> - <li> All levels of Latin</li> - <li> Math through Algebra II/Geometry</li> - <li> Introductory Biology, Physics, and Chemistry (not at the honors or AP - level)</li> - </ul> - - Special arrangements can be made for subjects that fall outside of these - offerings. Please contact me directly for more information. - - </p> - <a href="#offerings" class="button"><img src="/assets/icons/close-box.svg" alt="close" />Close</a> - </div> -</div> - -<div id="offering-college-prep" class="modal"> - <div class="card"> - <p> - Work with a former Higher Education professional to - determine what types of schools and/or degree programs may be a good fit - for your interests and desires. Additionally, learn how to write an - attention-grabbing personal essay for college applications and receive - guidance on institution-specific supplemental essays. - </p> - <a href="#offerings" class="button"><img src="/assets/icons/close-box.svg" alt="close" />Close</a> - </div> -</div> - -<div id="offering-test-prep" class="modal"> - <div class="card"> - <p> - One-on-one content instruction, practice testing, and - testing strategization for a number of standardized tests, including but - not limited to: - - <ul> - <li> SAT & ACT</li> - <li> PSAT</li> - <li> ISEE</li> - <li> SSAT</li> - <li> GED</li> - <li> MAT</li> - <li> GRE</li> - <li> LSAT</li> - </ul> - - Please contact me directly if you'd like assistance for a test not listed - here. - </p> - <a href="#offerings" class="button"><img src="/assets/icons/close-box.svg" alt="close" />Close</a> - </div> -</div> - -<div id="offering-music-lessons" class="modal"> - <div class="card"> - <p> - Instruments offered include piano, guitar, drums, and voice. - Instrument lessons include a combination of formal instruction and - ear-training, which allows students to select the songs they'd like to - learn. Music composition lessons focus on the techniques necessary for - writing original songs, whether they be instrumental or singer/songwriter - style. - </p> - <a href="#offerings" class="button"><img src="/assets/icons/close-box.svg" alt="close" />Close</a> - </div> -</div> - -<div id="offering-evals" class="modal"> - <div class="card"> - <p> - Both evaluations are based on materials submitted through an online - portal. Letters are returned within a week of your notice that all documents - have been uploaded.</p> - <p> <b>$30 option</b>: Considers math and language arts materials, - satisfies proof of progress with a personalized letter and evaluator - credentials </p> - <p><b>$70 option</b>: Considers at least math and language arts materials - plus any other subject(s) you desire, satisfies proof of progress with a - personalized letter and evaluator credentials, provides homeschool families - with a separate document detailing identified areas of strength, areas of - weakness, and recommendations for addressing weaknesses. - </p> - <a href="#offerings" class="button"><img src="/assets/icons/close-box.svg" alt="close" />Close</a> - </div> -</div> - -<div id="offering-college-writing" class="modal"> - <div class="card"> - <p> - Learn how to shift high-school level writing to that which will be expected in - college. Topics covered include moving beyond the five-paragraph essay, writing - research papers, and choosing a topic for essays with open prompts. In-session - exercises will allow students to implement these skills in real time with - immediate feedback. - </p> - <a href="#offerings" class="button"><img src="/assets/icons/close-box.svg" alt="close" />Close</a> - </div> -</div> - -<div id="offering-academic-coaching" class="modal"> - <div class="card"> - <p> - Academic Coaching offers all the benefits of Study Skills and Time Management - appointments plus ongoing planning and accountability support. As an Academic - Coach, I keep track of your student's upcoming assignments and assessments and - help craft a schedule week to week for them to accomplish their goals. Students - come away as more independent and confident planners and self-advocates. - </p> - <a href="#offerings" class="button"><img src="/assets/icons/close-box.svg" alt="close" />Close</a> - </div> -</div> - -<div id="offering-study-skills" class="modal"> - <div class="card"> - <p> - Study Skills sessions will allow students to develop a toolkit for - successful study habits. Learn about techniques to fight mental fatigue and - tools for mental recall. Study Skills sessions also cover ways to address - motivation, attention, and avoidance. Topics will be tailored for your specific - needs. - </p> - <a href="#offerings" class="button"><img src="/assets/icons/close-box.svg" alt="close" />Close</a> - </div> -</div> - -<div id="offering-dissertation-coaching" class="modal"> - <div class="card"> - <p> - Dissertation coaching consists of one-on-one work to strengthen the effort you - have already put in. Draw out the significance of your research by honing in on - the implications, connections, and recommendations that stem from your - findings. Together, we will break past a surface-level review of your study to - generate the greatest impact possible. Dissertation coaching can also focus on - general writing mechanics, clarity of message, and/or consistency of voice. - </p> - <a href="#offerings" class="button"><img src="/assets/icons/close-box.svg" alt="close" />Close</a> - </div> -</div> - -<div id="offering-time-management" class="modal"> - <div class="card"> - <p> - Learn how to balance all of the demands in your life. Time - Management sessions are tailored to your needs and can include building an - hour-by-hour schedule of your week, creating a long-term plan for assignments - and responsibilities, and discussing time and stress management techniques. - </p> - <a href="#offerings" class="button"><img src="/assets/icons/close-box.svg" alt="close" />Close</a> - </div> -</div> - -<!-- offerings cards --> -<section id="offerings"> - - <div class="card"> - <h2>Subject Tutoring</h2> - <p>Tutoring for specific courses or disciplines - </p> - <a class="button" href="#offering-subject-tutoring"><img src="/assets/icons/dots-horizontal-circle.svg" alt="expand" /> Learn more</a> - </div> - - <div class="card"> - <h2>Time Management</h2> - <p> - Personalized plans for managing academics, extracurriculars, and - other commitments - </p> - <a class="button" href="#offering-time-management"><img src="/assets/icons/dots-horizontal-circle.svg" alt="expand" /> Learn more</a> - </div> - - <div class="card"> - <h2>Study Skills</h2> - <p>Learn how to make the most of your study time</p> - <a class="button" href="#offering-study-skills"><img src="/assets/icons/dots-horizontal-circle.svg" alt="expand" /> Learn more</a> - </div> - - <div class="card"> - <h2>Academic Coaching</h2> - <p> - Time management and study skills blended with continuing - accountability - </p> - <a class="button" href="#offering-academic-coaching"><img src="/assets/icons/dots-horizontal-circle.svg" alt="expand" /> Learn more</a> - </div> - - <div class="card"> - <h2>College Application Assistance</h2> - <p> - Assistance with generating a college list and crafting application - essays - </p> - <a class="button" href="#offering-college-prep"><img src="/assets/icons/dots-horizontal-circle.svg" alt="expand" /> Learn more</a> - </div> - - <div class="card"> - <h2>College-Level Writing</h2> - <p>Get a head start on meeting professors' expectations</p> - <a class="button" href="#offering-college-writing"><img src="/assets/icons/dots-horizontal-circle.svg" alt="expand" /> Learn more</a> - </div> - - <div class="card"> - <h2>Dissertation Coaching</h2> - <p>Ensure your research is communicated effectively and eloquently</p> - <a class="button" href="#offering-dissertation-coaching"><img src="/assets/icons/dots-horizontal-circle.svg" alt="expand" /> Learn more</a> - </div> - - <div class="card"> - <h2>Standardized Test Prep</h2> - <p> - Tailored assistance in preparing for a variety of standardized tests - </p> - <a class="button" href="#offering-test-prep"><img src="/assets/icons/dots-horizontal-circle.svg" alt="expand" /> Learn more</a> - </div> - - <div class="card"> - <h2>Music Lessons</h2> - <p>Instrument and/or composition lessons for students of all ages</p> - <a class="button" href="#offering-music-lessons"><img src="/assets/icons/dots-horizontal-circle.svg" alt="expand" /> Learn more</a> - </div> - - <div class="card"> - <h2>Proof of Progress Evaluations</h2> - <p> - Two levels of portfolio-based evaluations for homeschool families - looking to satisfy Proof of Progress or gain insight into their - child's learning - </p> - <a class="button" href="#offering-evals"><img src="/assets/icons/dots-horizontal-circle.svg" alt="expand" /> Learn more</a> - </div> - -</section> - -<!-- pricing --> -<section class="quiet" id="pricing"> - <h2>Pricing Guide</h2> - - <table> - <tbody> - <tr> - <td></td> - <td>Remote</td> - <td>In-Person</td> - </tr> - - <tr> - <th> - <a href="#offering-subject-tutoring">Subject</a>, <a href="#offering-time-management">Time Management</a>, <a href="#offering-study-skills">Study Skills Tutoring</a>, <a href="#offering-music-lessons">Music Lessons</a> - </th> - <td>$50/hr</td> - <td>$60/hr</td> - </tr> - - <tr> - <th> - <a href="#offering-academic-coaching">Academic Coaching</a>, <a href="#offering-dissertation-coaching">Dissertation Coaching</a>, <a href="#offering-test-prep">Test Prep</a>, <a href="#offering-college-prep">College - Application Assistance</a> - </th> - <td>$60/hr</td> - <td>$70/hr</td> - </tr> - - <tr> - <th>Small Group Sessions, Group Lessons</th> - <td>$30/hr</td> - <td>$40/hr</td> - </tr> - <tr> - <th><a href="#offering-evals">Simplified Homeschool Evaluations</a></th> - <td colspan="2">$30</td> - </tr> - <tr> - <th><a href="#offering-evals">Detailed Homeschool Evaluations</a></th> - <td colspan="2">$70</td> - </tr> - </tbody> - </table> - - <h3> - <a href="/policies">See a list of my policies and procedures regarding scheduling, - payment, and booking.</a> - </h3> - -</section> - -<!-- contact box --> -<section id="contact"> - <form class="card" action="/#contact" method="post"> - <h2>Contact</h2> - - <label for="name">Name</label> - <input name="name" type="text" id="name" placeholder="Jane Doe" required /> - - <label for="email">Email Address</label> - <input name="email" type="email" id="email" placeholder="jdoe85@aol.com" required /> - - <label for="body">Question/Comment</label> - <textarea name="body" id="body" placeholder="Briefly describe your inquiry, including any services or areas of study you're interested in." required></textarea> - - <button type="submit" class="button"><img src="/assets/icons/send-circle.svg" alt="send" />Send</button> - - <?php - - use PHPMailer\PHPMailer\PHPMailer; - - require('PHPMailer-master/src/PHPMailer.php'); - require('PHPMailer-master/src/SMTP.php'); - require('PHPMailer-master/src/Exception.php'); - - // handle form submission - if (isset($_POST['name'], $_POST['email'], $_POST['body'])) { - $body = substr(strip_tags($_POST['body']), 0, 16384); - $name = substr(strip_tags($_POST['name']), 0, 255); - - if (!PHPMailer::validateAddress($_POST['email'])) { - echo 'Bad email'; - } - - $email = $_POST['email']; - - $smtpuser = file_get_contents('/var/carpentertutoring/smtpuser'); - $smtppass = file_get_contents('/var/carpentertutoring/smtppass'); - $address = file_get_contents('/var/carpentertutoring/address'); - - $mail = new PHPMailer(); - $mail->isSMTP(); - $mail->Host = 'smtp.gmail.com'; - $mail->Port = 465; - $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; - $mail->SMTPAuth = true; - $mail->Username = $smtpuser; - $mail->Password = $smtppass; - $mail->setFrom($email, $name); - $mail->addAddress($address); - $mail->addReplyTo($email); - $mail->Subject = 'Tutoring Inquiry from ' . $email; - $mail->Body = $body; - - if (!$mail->send()) { - echo 'There was a problem sending your message. Please try again later or send mail to <a href="mailto:amy@carpentertutoring.com">Amy@CarpenterTutoring.com</a>.'; - echo '<!--Send error: ' . $mail->ErrorInfo . '-->'; - } else { - echo "Your message was successfully sent."; - } - } else { - echo 'Send us a message and we`ll reply by mail as soon as possible. Please note that your email address will not be stored on our server. It will only be used to contact you with a reply. You may also send mail directly to <a href="mailto:amy@carpentertutoring.com">Amy@CarpenterTutoring.com</a>.'; - } - ?> - </form> - -</section> - -<!-- reviews --> -<section id="reviews"> - - <div class="card"> - <h2>Connor Fenton</h2> - <blockquote> - I was a Graduate student at the College of William and Mary who needed to pass a Latin Language test as part of my degree requirements. I was struggling with refreshing my Latin after a few years out of the classroom and Amy was both professional and helpful. With her tutoring I was able to pass my test and finish my degree. She is very considerate and easy to work with. - </blockquote> - <p> - <a href="https://goo.gl/maps/73wWvyS7azkBBkA39">View on Google</a> - or - <a href="https://g.page/carpenter-tutoring/review?np">leave a review.</a> - </p> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - </div> - - <div class="card"> - <h2>Marie & Robert</h2> - <blockquote> - I highly recommend Amy as a dissertation coach. Amy is a very kind and patient person. Over the time we worked together, she helped me take down the barriers that were preventing me from moving forward in my process and assisted me in creating a plan to get to the finish line and achieve my goal. She was very helpful with revising and editing my writing to strengthen it. She helped me think creatively, so I could clarify and expand upon my findings. Amy not only pointed out grammatical errors and typos, but she made sure I was able to keep my voice consistent in my writing. Because of her, I was able to finish my doctoral degree, something that I will be forever grateful to her for. - </blockquote> - <p> - <a href="https://goo.gl/maps/73wWvyS7azkBBkA39">View on Google</a> - or - <a href="https://g.page/carpenter-tutoring/review?np">leave a review.</a> - </p> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - </div> - - <div class="card"> - <h2>Lee Crabtree</h2> - <blockquote> - Amy is a wonderful tutor who helped my child (who does not like help at all) though some difficult classes where the teacher was not providing the support my child needed. Highly recommended. - </blockquote> - <p> - <a href="https://goo.gl/maps/73wWvyS7azkBBkA39">View on Google</a> - or - <a href="https://g.page/carpenter-tutoring/review?np">leave a review.</a> - </p> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - <img src="/assets/icons/star-box.svg" alt="star" /> - </div> - -</section> -<?php include('footer.php'); ?> diff --git a/templates/about.hbs b/templates/about.hbs new file mode 100644 index 0000000..6bb9600 --- /dev/null +++ b/templates/about.hbs @@ -0,0 +1,52 @@ +{{#> base}} +{{#*inline "main"}} + <section class="banner"> + <h1>About Me</h1> + </section> + + <section class="quiet"> + <h2> + School is tricky, and there is no universal pathway to success. I started + Carpenter Tutoring for those seeking a little help finding their way. + </h2> + + <p> + I received my B.A. from The College of William and Mary in 2018 and received + my M.Ed. from W&M in 2020. As an undergraduate, I worked and was trained + as a tutor at W&M's peer tutoring center, the Tribe TutorZone. During + this period, I conducted over 150 one-on-one appointments with W&M + students in 26 different content areas. I earned lifetime Advanced Tutor + Certification, the highest level W&M can grant, through the College + Reading and Learning Association, and I was trained as a time management + consultant. I took on leadership roles within the TutorZone until I was + working alongside its director. As a graduate student, I became one of the + Graduate Assistants helping oversee the TutorZone as well as an academic + coach to students with high need for academic support. + </p> + + <p> + I loved getting to work with the Tribe TutorZone tutors, but I realized that + I missed being the tutor. There's just nothing like watching the light bulb + of understanding go off or seeing students who had struggled with material + master it! With that realization, I decided to dedicate my life to my + passion -- helping students of all ages learn, succeed, and believe in + themselves. + </p> + + <p> + My instructional approach focuses on meeting students where they are and + supporting them through any hesitations or discomforts from which academic + difficulties may arise. Whether your student only has to brush up on a few + concepts or is resistant to completing coursework, I will come to each + session with patience, understanding, and just the right amount of + discipline. I truly believe that excellent educational relationships begin + with mutual respect, and I work to build meaningful relationships with all + of my clients. + </p> + + <p>Thank you for considering Carpenter Tutoring.</p> + + </section> + <section></section> +{{/inline}} +{{/base}} diff --git a/templates/base.hbs b/templates/base.hbs index a16e6eb..f2c0f38 100644 --- a/templates/base.hbs +++ b/templates/base.hbs @@ -298,9 +298,7 @@ </picture> </figure> <p> - © - <!-- TODO:<?php echo date('Y'); ?>--> - Carpenter Tutoring, LLC. All rights reserved. + © 2020, 2021 Carpenter Tutoring, LLC. All rights reserved. </p> <p> <a href="https://g.page/carpenter-tutoring?share">Visit me on Google</a> diff --git a/static/policies/index.php b/templates/policies.hbs index 1fdd037..326d61f 100644 --- a/static/policies/index.php +++ b/templates/policies.hbs @@ -1,4 +1,5 @@ -<?php include('../header.php'); ?> +{{#> base}} +{{#*inline "main"}} <section class="banner"> <h1>Policies & Procedures</h1> </section> @@ -52,4 +53,5 @@ </p> </section> <section></section> -<?php include('../footer.php'); ?> +{{/inline}} +{{/base}} |