From 0213fd2dcd09ca4b1252cdc45415a765a887d679 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Mon, 9 Sep 2024 22:28:33 -0400 Subject: feat: teams and blurbs but lots of todos --- Cargo.lock | 10 ++++ Cargo.toml | 1 + about/blurb.php | 4 -- about/team/adamc/adamc.png | Bin 385645 -> 0 bytes about/team/adamc/adamc.webp | Bin 44888 -> 0 bytes about/team/adamc/blurb.php | 1 - about/team/adamc/name.php | 1 - about/team/alexp/alexp.png | Bin 367859 -> 0 bytes about/team/alexp/alexp.webp | Bin 18202 -> 0 bytes about/team/alexp/blurb.php | 3 - about/team/alexp/name.php | 1 - about/team/genevievea/blurb.php | 14 ----- about/team/genevievea/genevievea.png | Bin 337781 -> 0 bytes about/team/genevievea/genevievea.webp | Bin 70202 -> 0 bytes about/team/genevievea/name.php | 1 - about/team/jaydea/blurb.php | 1 - about/team/jaydea/jaydea.png | Bin 465599 -> 0 bytes about/team/jaydea/jaydea.webp | Bin 23712 -> 0 bytes about/team/jaydea/name.php | 1 - about/team/joelm/blurb.php | 1 - about/team/joelm/joelm.png | Bin 491308 -> 0 bytes about/team/joelm/joelm.webp | Bin 33982 -> 0 bytes about/team/joelm/name.php | 1 - about/team/katherinev/blurb.php | 1 - about/team/katherinev/katherinev.png | Bin 382099 -> 0 bytes about/team/katherinev/katherinev.webp | Bin 21316 -> 0 bytes about/team/katherinev/name.php | 1 - about/team/zackh/blurb.php | 1 - about/team/zackh/name.php | 1 - about/team/zackh/zackh.png | Bin 532626 -> 0 bytes about/team/zackh/zackh.webp | Bin 48908 -> 0 bytes brochure/brochure.html | 38 ------------ brochure/brochure.js | 34 ----------- brochure/index.php | 24 -------- brochure/styles.css | 93 ---------------------------- policies/index.php | 61 ------------------- src/main.rs | 110 ++++++++++++++++++++++++++++++---- templates/about/blurb.html | 4 ++ templates/about/figure.html | 8 +++ templates/about/index.html | 71 ++++++++++++++++++++++ templates/about/team.html | 15 +++++ templates/base.html | 6 +- templates/brochure/brochure.css | 93 ++++++++++++++++++++++++++++ templates/brochure/brochure.html | 37 ++++++++++++ templates/brochure/brochure.js | 34 +++++++++++ templates/brochure/index.html | 32 ++++++++++ templates/index.html | 5 +- 47 files changed, 410 insertions(+), 299 deletions(-) delete mode 100644 about/blurb.php delete mode 100644 about/team/adamc/adamc.png delete mode 100644 about/team/adamc/adamc.webp delete mode 100644 about/team/adamc/blurb.php delete mode 100644 about/team/adamc/name.php delete mode 100644 about/team/alexp/alexp.png delete mode 100644 about/team/alexp/alexp.webp delete mode 100644 about/team/alexp/blurb.php delete mode 100644 about/team/alexp/name.php delete mode 100644 about/team/genevievea/blurb.php delete mode 100644 about/team/genevievea/genevievea.png delete mode 100644 about/team/genevievea/genevievea.webp delete mode 100644 about/team/genevievea/name.php delete mode 100644 about/team/jaydea/blurb.php delete mode 100644 about/team/jaydea/jaydea.png delete mode 100644 about/team/jaydea/jaydea.webp delete mode 100644 about/team/jaydea/name.php delete mode 100644 about/team/joelm/blurb.php delete mode 100644 about/team/joelm/joelm.png delete mode 100644 about/team/joelm/joelm.webp delete mode 100644 about/team/joelm/name.php delete mode 100644 about/team/katherinev/blurb.php delete mode 100644 about/team/katherinev/katherinev.png delete mode 100644 about/team/katherinev/katherinev.webp delete mode 100644 about/team/katherinev/name.php delete mode 100644 about/team/zackh/blurb.php delete mode 100644 about/team/zackh/name.php delete mode 100644 about/team/zackh/zackh.png delete mode 100644 about/team/zackh/zackh.webp delete mode 100644 brochure/brochure.html delete mode 100644 brochure/brochure.js delete mode 100644 brochure/index.php delete mode 100644 brochure/styles.css delete mode 100644 policies/index.php create mode 100644 templates/about/blurb.html create mode 100644 templates/about/figure.html create mode 100644 templates/about/index.html create mode 100644 templates/about/team.html create mode 100644 templates/brochure/brochure.css create mode 100644 templates/brochure/brochure.html create mode 100644 templates/brochure/brochure.js create mode 100644 templates/brochure/index.html diff --git a/Cargo.lock b/Cargo.lock index 11b2bd0..69052fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -209,6 +209,7 @@ dependencies = [ "askama", "askama_axum", "axum", + "chrono", "tokio", "tower 0.5.0", "tower-http", @@ -229,6 +230,15 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "num-traits", +] + [[package]] name = "comrak" version = "0.18.0" diff --git a/Cargo.toml b/Cargo.toml index afb71dd..2e017fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ edition = "2021" askama = { version = "0.12", features = ["markdown", "with-axum"], default-features = false } askama_axum = "0.4.0" axum = "0.7.5" +chrono = { version = "0.4.38", default-features = false, features = ["now"] } tokio = { version = "1.40.0", features = ["full"] } tower = "0.5.0" tower-http = { version = "0.5.2", features = ["fs"] } diff --git a/about/blurb.php b/about/blurb.php deleted file mode 100644 index 5b4e5db..0000000 --- a/about/blurb.php +++ /dev/null @@ -1,4 +0,0 @@ -
-

-

-
diff --git a/about/team/adamc/adamc.png b/about/team/adamc/adamc.png deleted file mode 100644 index e0af5e7..0000000 Binary files a/about/team/adamc/adamc.png and /dev/null differ diff --git a/about/team/adamc/adamc.webp b/about/team/adamc/adamc.webp deleted file mode 100644 index 1884f87..0000000 Binary files a/about/team/adamc/adamc.webp and /dev/null differ diff --git a/about/team/adamc/blurb.php b/about/team/adamc/blurb.php deleted file mode 100644 index 08eca54..0000000 --- a/about/team/adamc/blurb.php +++ /dev/null @@ -1 +0,0 @@ - Adam earned a Bachelor's in Computer Science from The College of William & Mary in 2018. Since graduating, he has accumulated over four years of experience as a software engineer specializing in server-side automation and front end self-service software. Adam's favorite part of software development is learning and teaching new technology. He loves simplifying complicated concepts in computing and giving others the hints and tricks they need to realize their ideas. In his spare time Adam is a hobbyist mechanic, constantly tinkering with his classic Hudson Hornet. He is eager to contribute to Carpenter Tutoring with all levels of high school and college computer science and programming, information technology fundamentals, and software development practices. diff --git a/about/team/adamc/name.php b/about/team/adamc/name.php deleted file mode 100644 index 6884f41..0000000 --- a/about/team/adamc/name.php +++ /dev/null @@ -1 +0,0 @@ -Adam Carpenter diff --git a/about/team/alexp/alexp.png b/about/team/alexp/alexp.png deleted file mode 100644 index e524184..0000000 Binary files a/about/team/alexp/alexp.png and /dev/null differ diff --git a/about/team/alexp/alexp.webp b/about/team/alexp/alexp.webp deleted file mode 100644 index 5c67439..0000000 Binary files a/about/team/alexp/alexp.webp and /dev/null differ diff --git a/about/team/alexp/blurb.php b/about/team/alexp/blurb.php deleted file mode 100644 index 94830ec..0000000 --- a/about/team/alexp/blurb.php +++ /dev/null @@ -1,3 +0,0 @@ -Alex graduated from Christopher Newport University with a Bachelor’s of Science in Mathematics with a minor in Leadership Studies in 2023. She is currently pursuing her Master of Arts in Secondary Education in hopes of becoming a high school math teacher. Alex has always loved helping others in her classes throughout her time in school, whether that is helping her friends in their math classes or through formal tutoring positions. One of her favorite parts of teaching is taking concepts that may be difficult for students, explaining it in a way that makes sense to them, and seeing the light bulb go off once they understand. She has worked with students of varying abilities and ages ranging from kindergarten to college. She has experience mainly in math and science but also loves to help with standardized test prep and writing papers at a college level. - -In her free time, Alex enjoys spending time with her friends and her cat, Finley, and reading books at the nearest coffee shop. diff --git a/about/team/alexp/name.php b/about/team/alexp/name.php deleted file mode 100644 index 6488d59..0000000 --- a/about/team/alexp/name.php +++ /dev/null @@ -1 +0,0 @@ -Alex Patterson diff --git a/about/team/genevievea/blurb.php b/about/team/genevievea/blurb.php deleted file mode 100644 index d555b46..0000000 --- a/about/team/genevievea/blurb.php +++ /dev/null @@ -1,14 +0,0 @@ - Genevieve is currently pursuing a master’s degree in Clinical Mental Health Counseling - at the College of William & Mary. Previously, Genevieve earned a master’s in Equality Studies - from University College Dublin and bachelors’ degrees in Political Science and Women and - Gender Studies from St. Olaf College. In high school, Genevieve began tutoring elementary and - middle school children in piano and violin. While in college, Genevieve worked as tutor in a local - elementary school, focusing on language arts, reading, and math. Genevieve continued to seek - tutoring opportunities while living in Dublin and gained experience working with middle school - aged children in reading and language arts. Through her work as a tutor and additional - employment experiences, Genevieve has worked with individuals of variety of ages, academic - levels, and children with additional support needs. Genevieve loves supporting students and - working with them to foster a love of learning and overcome any challenges. As a Carpenter - Tutor, Genevieve welcomes students seeking assistance with all levels of reading, writing, and - language arts; elementary and middle school math; piano and violin; and additional skills such - as time management and study skills. diff --git a/about/team/genevievea/genevievea.png b/about/team/genevievea/genevievea.png deleted file mode 100644 index 4b7f99a..0000000 Binary files a/about/team/genevievea/genevievea.png and /dev/null differ diff --git a/about/team/genevievea/genevievea.webp b/about/team/genevievea/genevievea.webp deleted file mode 100644 index 56197c5..0000000 Binary files a/about/team/genevievea/genevievea.webp and /dev/null differ diff --git a/about/team/genevievea/name.php b/about/team/genevievea/name.php deleted file mode 100644 index 56a0214..0000000 --- a/about/team/genevievea/name.php +++ /dev/null @@ -1 +0,0 @@ -Genevieve Akins diff --git a/about/team/jaydea/blurb.php b/about/team/jaydea/blurb.php deleted file mode 100644 index ab7cbda..0000000 --- a/about/team/jaydea/blurb.php +++ /dev/null @@ -1 +0,0 @@ -Jayde graduated from Christopher Newport University in 2019 with a Bachelor's of Arts in Spanish and a minor in Dance. She then went on to receive her Master's of Arts in TESOL (Teaching English as a Second Language) in 2020. For the past 3 years Jayde worked as a Middle School Newcomer teacher in Newport News, supporting students with very limited English in all subject areas. She tutored and taught students ranging from lower elementary to upper middle school and has a specific love for tutoring in Spanish and English. Outside of the classroom, she enjoys reading, spending time with her husband and son, and catching up on a good TV show. diff --git a/about/team/jaydea/jaydea.png b/about/team/jaydea/jaydea.png deleted file mode 100644 index 11ae1f7..0000000 Binary files a/about/team/jaydea/jaydea.png and /dev/null differ diff --git a/about/team/jaydea/jaydea.webp b/about/team/jaydea/jaydea.webp deleted file mode 100644 index d261530..0000000 Binary files a/about/team/jaydea/jaydea.webp and /dev/null differ diff --git a/about/team/jaydea/name.php b/about/team/jaydea/name.php deleted file mode 100644 index 39c83d7..0000000 --- a/about/team/jaydea/name.php +++ /dev/null @@ -1 +0,0 @@ -Jayde Adams diff --git a/about/team/joelm/blurb.php b/about/team/joelm/blurb.php deleted file mode 100644 index 843605f..0000000 --- a/about/team/joelm/blurb.php +++ /dev/null @@ -1 +0,0 @@ - Joel has been a math nerd since he first discovered the number 11. Since then, he has worked to develop his skills in both studying and teaching math. Joel earned his Bachelor's in Mathematics and his Master's in Computational Operations Research from the College of William & Mary. Throughout his education, he has consistently sought opportunities to tutor, whether it was helping friends in high school, peers in college, or other students during his Master's program. Joel has a passion for seeing students break through the barriers which can form when studying math and discover the amazing language hidden within. As a part of Carpenter Tutoring, Joel is happy to offer assistance to students in high school and college math and introductory physics. diff --git a/about/team/joelm/joelm.png b/about/team/joelm/joelm.png deleted file mode 100644 index fcf53ac..0000000 Binary files a/about/team/joelm/joelm.png and /dev/null differ diff --git a/about/team/joelm/joelm.webp b/about/team/joelm/joelm.webp deleted file mode 100644 index fdd9c0b..0000000 Binary files a/about/team/joelm/joelm.webp and /dev/null differ diff --git a/about/team/joelm/name.php b/about/team/joelm/name.php deleted file mode 100644 index 370f5ce..0000000 --- a/about/team/joelm/name.php +++ /dev/null @@ -1 +0,0 @@ -Joel Monroe diff --git a/about/team/katherinev/blurb.php b/about/team/katherinev/blurb.php deleted file mode 100644 index 4987d48..0000000 --- a/about/team/katherinev/blurb.php +++ /dev/null @@ -1 +0,0 @@ -Katherine is currently working as an English As A Second Language teacher in Newport News. Previously, she earned a Bachelor of Arts degree in Psychology and Leadership Studies with a minor in Linguistics from Christopher Newport University in 2022, and a Masters in Teaching in 2023. Katherine is passionate about all things education! She has been an independent tutor to students grades K-12 in math, science, English, French, and general study skills, while also working in middle schools for the past 3 years. Outside of the classroom, she enjoys being outdoors, reading, and learning new languages. Katherine loves getting to know students and breaking down difficult ideas in a way that each student will understand. She is excited to contribute to Carpenter Tutoring by working with students in French, English, and K-8 math, as well as academic coaching. diff --git a/about/team/katherinev/katherinev.png b/about/team/katherinev/katherinev.png deleted file mode 100644 index de82f40..0000000 Binary files a/about/team/katherinev/katherinev.png and /dev/null differ diff --git a/about/team/katherinev/katherinev.webp b/about/team/katherinev/katherinev.webp deleted file mode 100644 index 856dfca..0000000 Binary files a/about/team/katherinev/katherinev.webp and /dev/null differ diff --git a/about/team/katherinev/name.php b/about/team/katherinev/name.php deleted file mode 100644 index ea4ec1a..0000000 --- a/about/team/katherinev/name.php +++ /dev/null @@ -1 +0,0 @@ -Katherine Vander Vennet diff --git a/about/team/zackh/blurb.php b/about/team/zackh/blurb.php deleted file mode 100644 index eb49046..0000000 --- a/about/team/zackh/blurb.php +++ /dev/null @@ -1 +0,0 @@ - Zack graduated from William & Mary in 2021 with a Bachelors of Science in Computer Science and Applied Mathematics. There, he spent three years tutoring his peers in math and computer science to help them reach a deeper understanding and appreciation of both subjects. Here he gained a passion for teaching and is excited to offer his assistance again at any levels of math and computer science through Carpenter Tutoring. In addition to tutoring, he currently works as an application developer for ADP in Norfolk, VA. In his spare time he loves to bike and spend time with his cat, Hans. diff --git a/about/team/zackh/name.php b/about/team/zackh/name.php deleted file mode 100644 index 5d0283a..0000000 --- a/about/team/zackh/name.php +++ /dev/null @@ -1 +0,0 @@ -Zack H'Doubler diff --git a/about/team/zackh/zackh.png b/about/team/zackh/zackh.png deleted file mode 100644 index c666802..0000000 Binary files a/about/team/zackh/zackh.png and /dev/null differ diff --git a/about/team/zackh/zackh.webp b/about/team/zackh/zackh.webp deleted file mode 100644 index 9281421..0000000 Binary files a/about/team/zackh/zackh.webp and /dev/null differ diff --git a/brochure/brochure.html b/brochure/brochure.html deleted file mode 100644 index 6690f4d..0000000 --- a/brochure/brochure.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - -
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
diff --git a/brochure/brochure.js b/brochure/brochure.js deleted file mode 100644 index 4872373..0000000 --- a/brochure/brochure.js +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright (c) 2024 by Daniel Pox (https://codepen.io/danielpox/pen/abOopYo) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - - -document.addEventListener("DOMContentLoaded", (event) => { - const paper = document.querySelector(".paper"); - - const flipButton = document.querySelector("button") - flipButton.addEventListener("click", () => { - paper.classList.toggle("flip") - }) - - const leftSide = paper.querySelector(".page.left"); - leftSide.addEventListener("click", () => { - leftSide.classList.toggle("open") - }); - - const rightSide = paper.querySelector(".page.right"); - rightSide.addEventListener("click", () => { - rightSide.classList.toggle("open") - }); - - const centerSide = paper.querySelector(".page.center"); - centerSide.addEventListener("click", () => { - centerSide.classList.toggle("open") - }); -}); diff --git a/brochure/index.php b/brochure/index.php deleted file mode 100644 index 6dd3621..0000000 --- a/brochure/index.php +++ /dev/null @@ -1,24 +0,0 @@ - - - -
- - -

- Click on pages to fold and unfold and use Flip to toggle front and back. This works best on a tablet or desktop screen. -

- - - -
- -
- - - diff --git a/brochure/styles.css b/brochure/styles.css deleted file mode 100644 index 2abb118..0000000 --- a/brochure/styles.css +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright (c) 2024 by Daniel Pox (https://codepen.io/danielpox/pen/abOopYo) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - - -.paper { - display: grid; - - width: 8.25rem; - - grid-template-columns: 8.25rem; - grid-template-rows: 19.41rem; /* .425 aspect */ - - margin: 2rem auto; - - transform-style: preserve-3d; - transition: transform linear 1s; -} -.paper.flip { - transform: rotateY(180deg); -} - -.paper .page { - display: inline-block; - - grid-column: 1 / 2; - grid-row: 1 / 2; - - position: relative; - - transform-style: preserve-3d; - - box-shadow: 0 4px 8px #0001; -} - -.paper .page .side { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - - background: white; - backface-visibility: hidden; -} - -.paper .page .side.back { - transform: rotateY(180deg); -} - -.page { - transition: transform linear 1s; -} -.left.open { - transform: rotateY(-180deg); -} -.right.open { - transform: rotateY(180deg); -} - -.paper .page .side { - box-shadow: inset 1px 0 #f2f2f2, inset -1px 0 #f2f2f2; -} - -.side img { - max-width: 100%; - max-height: 100%; -} - -.left { - transform: translateZ(2px); - transform-origin: center left; -} - -.right { - transform: translateZ(1px); - transform-origin: center right; -} - -@media only screen and (min-width: 1500px) { - .paper { - width: 21.25em; - - grid-template-columns: 21.25em; - grid-template-rows: 50em; /* .425 aspect */ - } -} diff --git a/policies/index.php b/policies/index.php deleted file mode 100644 index 38dc2d2..0000000 --- a/policies/index.php +++ /dev/null @@ -1,61 +0,0 @@ - - -
-

-

Payment Methods

- We accept payments through Zelle (amy@carpentertutoring.com), Venmo - (@AmyCTutoring), and PayPal (amy@carpentertutoring.com). We also accept - checks made out to Carpenter Tutoring, LLC. Please contact Amy for - a mailing address if you would like to pay by check. -

- -

-

Travel

- Due to high appointment volumes, Amy is only able to travel to students in the Harbour View area of Suffolk, VA. -

- -

Please contact other tutors directly to discuss their locations and in-person policies.

- -

-

Remote sessions

- Remote sessions are typically conducted from tutors' homes. We use online video conferencing software such as - Zoom and Google Meet. - Your tutor will inform you of their preferred meeting method and provide initial meeting instructions and support. -

- -

-

Late Cancellations

- Sessions cancelled within 72 hours of their start time will incur a late - cancellation fee equal to 40% of the cancelled session price. -

- -

-

No-Shows

- Sessions which a student does not attend with no notice of - cancellation will be charged the full session price. -

- -

-

Session Duration

- Sessions are purchased in half-hour increments, and the shortest - appointment duration is 60 minutes. Families are responsible for the - amount of time they book and will be charged based on that amount. - Students who provide no advance notice of a need to end their meeting early will still be responsible for the full session price. If a student is - late to their appointment, we will work to the end of their scheduled - time, but no later. -

- -

-

Proof of Progress Evaluations

- Proof of Progress letters will be returned within 7 days of notification that materials are ready for review. Families are responsible for sending Proof of Progress letters and proof of evaluator credentials to their school system by August 1, the deadline for Proof of Progress submissions in Virginia. Notifications regarding sample readiness sent on or after July 24 of each year will incur a $10 late submission fee per evaluation. All payments are expected within two weeks of receipt of letter(s). Payment method information is available on this site as well as in the email sent along with Proof of Progress letters. -

- -

-

Learning Acceleration Grants

- Carpenter Tutoring is proud to serve Virginia students and families as a vendor for the K-12 Learning Acceleration Grant. Families must share student names as they appear on the grants, associated parent name, and associated address for invoicing purposes. Families are expected to upload emailed invoices at their earliest convenience as there are significant lag times between family submission and fund deposits from ClassWallet. While Carpenter Tutoring will provide an overview of funds used with our tutors with each invoice, families are expected to keep track of fund use and communicate with tutors when funds are nearing exhaustion to plan an end date for services or a transition to out-of-pocket payment. Grant vendors cannot see fund totals or funds used with other vendors, so we rely on families completely to communicate their remaining balances. Families who fail to notify us that their funds are nearly or have been depleted or rescinded but continue to use services will be required to pay for any excesses out-of-pocket. -

-
-
- diff --git a/src/main.rs b/src/main.rs index ca0a3d9..d07d201 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,6 +11,11 @@ use std::fs; use std::io::*; use std::path::Path; use std::path::PathBuf; +use chrono::Datelike; + +fn current_year() -> i32 { + chrono::Utc::now().year() +} trait Post: fmt::Debug { fn dump(&self); @@ -18,6 +23,12 @@ trait Post: fmt::Debug { fn get_content(&self) -> Cow; } +trait Tutor: fmt::Debug { + fn id(&self) -> &str; + fn display_name(&self) -> &str; + fn blurb(&self) -> &str; +} + struct MdFilePost { path: PathBuf, name: OsString, @@ -56,7 +67,11 @@ impl fmt::Debug for MdFilePost { } trait Posts { - fn get_posts(&self) -> impl Iterator; + fn get_posts(&self) -> impl IntoIterator; +} + +trait Tutors { + fn get_tutors(&self) -> impl IntoIterator; } struct FsDirPosts { @@ -71,10 +86,29 @@ impl FsDirPosts { } } +struct FsDirTutors { + path: PathBuf, +} + +impl Tutors for FsDirTutors { + fn get_tutors(&self) -> impl IntoIterator { + let test: Vec = Vec::new(); + test + } +} + +impl FsDirTutors { + fn new(path: &str) -> Self { + Self { + path: PathBuf::from(path), + } + } +} + impl Posts for FsDirPosts { - fn get_posts(&self) -> impl Iterator { - let dirs = fs::read_dir(&self.path).unwrap(); - dirs.flatten().map(|d| MdFilePost::new(&d.path())) + fn get_posts(&self) -> impl IntoIterator { + let files = fs::read_dir(&self.path).unwrap(); + files.flatten().filter(|d| !d.path().file_stem().unwrap().to_str().unwrap_or_default().starts_with('.')).map(|d| MdFilePost::new(&d.path())) } } @@ -105,16 +139,59 @@ struct PostsView { impl PostsView { fn with_posts(posts: &impl Posts) -> Self { Self { - post_titles: posts.get_posts().map(|p| p.display_name().into_owned()).map(String::from).collect() + post_titles: posts.get_posts().into_iter().map(|p| p.display_name().into_owned()).map(String::from).collect() } } } +// TODO: one single Markdown struct with id, name, and content can take over for both MdTutor and +// MdPost if it implements the Tutor and Post traits +// With this, I could have a repo which does all the same loading but returns things of a generic T +// as long as that T is provided it'll map values into those fields? + async fn posts_handler(State(posts): State>) -> Html { let view = PostsView::with_posts(&*posts); Html(view.render().unwrap()) } +#[derive(Debug)] +struct MdTutor { + id: String, + name: String, + blurb: String, +} + +impl Tutor for MdTutor { + fn id(&self) -> &str { + self.id.as_str() + } + + fn display_name(&self) -> &str { + self.name.as_str() + } + + fn blurb(&self) -> &str { + self.blurb.as_str() + } +} + +#[derive(Template)] +#[template(path = "about/index.html")] +struct AboutView { + tutors: Vec, +} + +impl AboutView { + fn with_tutors(tutors: &impl Tutors) -> Self { + todo!() + } +} + +async fn about_handler(State(tutors): State>) -> Html { + let view: AboutView = AboutView::with_tutors(&*tutors); + Html(view.render().unwrap()) +} + #[derive(Template)] #[template(path = "index.html")] struct IndexTemplate; @@ -131,17 +208,30 @@ async fn policies_handler() -> Html { Html(PoliciesTemplate{}.render().unwrap()) } +#[derive(Template)] +#[template(path = "brochure/index.html")] +struct BrochureTemplate; + +async fn brochure_handler() -> Html { + Html(BrochureTemplate{}.render().unwrap()) +} + #[tokio::main] async fn main() { - let repo = Arc::new(FsDirPosts::new(&format!("/data/ct/{}", "blog"))); + let posts = Arc::new(FsDirPosts::new(&format!("/data/ct/{}", "blog"))); + let tutors = Arc::new(FsDirTutors::new(&format!("/data/ct/{}", "team"))); let app = Router::new() - .nest_service("/static", ServeDir::new("static")) - .nest_service("/assets", ServeDir::new("/data/ct/assets")) + .route("/", get(index_handler)) .route("/posts", get(posts_handler)) + .with_state(posts) .route("/policies", get(policies_handler)) - .route("/", get(index_handler)) - .with_state(repo); + .route("/brochure", get(brochure_handler)) + .route("/about", get(about_handler)) + .with_state(tutors) + .nest_service("/assets", ServeDir::new("/data/ct/assets")) + .nest_service("/team", ServeDir::new("/data/ct/team")) + .fallback_service(ServeDir::new("static")); let listener = tokio::net::TcpListener::bind("0.0.0.0:8000").await.unwrap(); axum::serve(listener, app).await.unwrap(); diff --git a/templates/about/blurb.html b/templates/about/blurb.html new file mode 100644 index 0000000..630cf65 --- /dev/null +++ b/templates/about/blurb.html @@ -0,0 +1,4 @@ +
+

{{ tutor.display_name() }}

+

{{ tutor.blurb()|markdown }}

+
diff --git a/templates/about/figure.html b/templates/about/figure.html new file mode 100644 index 0000000..2b8e308 --- /dev/null +++ b/templates/about/figure.html @@ -0,0 +1,8 @@ +
+ + + + {{ tutor.display_name() }} + +
{{ tutor.display_name() }}
+
diff --git a/templates/about/index.html b/templates/about/index.html new file mode 100644 index 0000000..0c1d519 --- /dev/null +++ b/templates/about/index.html @@ -0,0 +1,71 @@ +{% extends "base.html" %} + +{% block main %} + + +
+

+

+ School is tricky, and there is no universal pathway to success. I started + Carpenter Tutoring for those seeking a little help finding their way. +

+

+
+ +
+
+ + + + Amy Carpenter + +
Amy Carpenter, M.Ed.
+
+ +
+

+ 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 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. +

+ +

+ I loved getting to work with the 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. +

+ +

+ 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. +

+ +

Thank you for considering Carpenter Tutoring.

+
+ +
+ +
+ +{% include "team.html" %} + +{% endblock %} diff --git a/templates/about/team.html b/templates/about/team.html new file mode 100644 index 0000000..b1f0588 --- /dev/null +++ b/templates/about/team.html @@ -0,0 +1,15 @@ +{% let flip = true %} + +{% for tutor in tutors %} +
+ {% if flip == true %} + {% include "blurb.html" %} + {% include "figure.html" %} + {% else %} + {% include "figure.html" %} + {% include "blurb.html" %} + {% endif %} +
+ +
+{% endfor %} diff --git a/templates/base.html b/templates/base.html index 1657ec1..f146a44 100644 --- a/templates/base.html +++ b/templates/base.html @@ -12,8 +12,8 @@ - - + + @@ -50,7 +50,7 @@

- © 2019- Carpenter Tutoring, LLC. All rights reserved. + © 2019-{{ self::current_year() }} Carpenter Tutoring, LLC. All rights reserved.

Visit me on Google diff --git a/templates/brochure/brochure.css b/templates/brochure/brochure.css new file mode 100644 index 0000000..2abb118 --- /dev/null +++ b/templates/brochure/brochure.css @@ -0,0 +1,93 @@ +/* +Copyright (c) 2024 by Daniel Pox (https://codepen.io/danielpox/pen/abOopYo) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + + +.paper { + display: grid; + + width: 8.25rem; + + grid-template-columns: 8.25rem; + grid-template-rows: 19.41rem; /* .425 aspect */ + + margin: 2rem auto; + + transform-style: preserve-3d; + transition: transform linear 1s; +} +.paper.flip { + transform: rotateY(180deg); +} + +.paper .page { + display: inline-block; + + grid-column: 1 / 2; + grid-row: 1 / 2; + + position: relative; + + transform-style: preserve-3d; + + box-shadow: 0 4px 8px #0001; +} + +.paper .page .side { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + + background: white; + backface-visibility: hidden; +} + +.paper .page .side.back { + transform: rotateY(180deg); +} + +.page { + transition: transform linear 1s; +} +.left.open { + transform: rotateY(-180deg); +} +.right.open { + transform: rotateY(180deg); +} + +.paper .page .side { + box-shadow: inset 1px 0 #f2f2f2, inset -1px 0 #f2f2f2; +} + +.side img { + max-width: 100%; + max-height: 100%; +} + +.left { + transform: translateZ(2px); + transform-origin: center left; +} + +.right { + transform: translateZ(1px); + transform-origin: center right; +} + +@media only screen and (min-width: 1500px) { + .paper { + width: 21.25em; + + grid-template-columns: 21.25em; + grid-template-rows: 50em; /* .425 aspect */ + } +} diff --git a/templates/brochure/brochure.html b/templates/brochure/brochure.html new file mode 100644 index 0000000..b5a3cd3 --- /dev/null +++ b/templates/brochure/brochure.html @@ -0,0 +1,37 @@ + + + +

+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
diff --git a/templates/brochure/brochure.js b/templates/brochure/brochure.js new file mode 100644 index 0000000..4872373 --- /dev/null +++ b/templates/brochure/brochure.js @@ -0,0 +1,34 @@ +/* +Copyright (c) 2024 by Daniel Pox (https://codepen.io/danielpox/pen/abOopYo) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + + +document.addEventListener("DOMContentLoaded", (event) => { + const paper = document.querySelector(".paper"); + + const flipButton = document.querySelector("button") + flipButton.addEventListener("click", () => { + paper.classList.toggle("flip") + }) + + const leftSide = paper.querySelector(".page.left"); + leftSide.addEventListener("click", () => { + leftSide.classList.toggle("open") + }); + + const rightSide = paper.querySelector(".page.right"); + rightSide.addEventListener("click", () => { + rightSide.classList.toggle("open") + }); + + const centerSide = paper.querySelector(".page.center"); + centerSide.addEventListener("click", () => { + centerSide.classList.toggle("open") + }); +}); diff --git a/templates/brochure/index.html b/templates/brochure/index.html new file mode 100644 index 0000000..41a62f4 --- /dev/null +++ b/templates/brochure/index.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} + +{% block style %} + {% include "../styles.css" %} + {% include "brochure.css" %} +{% endblock %} + +{% block main %} + + +
+ + +

+ Click on pages to fold and unfold and use Flip to toggle front and back. This works best on a tablet or desktop screen. +

+ + {% include "brochure.html" %} + +
+ +
+ + + +{% endblock %} diff --git a/templates/index.html b/templates/index.html index 48e85e8..c9b0e60 100644 --- a/templates/index.html +++ b/templates/index.html @@ -123,8 +123,7 @@