summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--about/figure.php8
-rw-r--r--about/index.php99
-rw-r--r--footer.php26
-rw-r--r--header.php315
-rw-r--r--index.php417
-rw-r--r--src/handlers.rs34
-rw-r--r--src/helpers.rs5
-rw-r--r--src/main.rs213
-rw-r--r--src/posts.rs3
-rw-r--r--src/posts/abstractions.rs2
-rw-r--r--src/posts/abstractions/post.rs6
-rw-r--r--src/posts/abstractions/repo.rs5
-rw-r--r--src/posts/fs_post.rs24
-rw-r--r--src/posts/fs_post_repo.rs23
-rw-r--r--src/tutors.rs3
-rw-r--r--src/tutors/abstractions.rs2
-rw-r--r--src/tutors/abstractions/tutor.rs7
-rw-r--r--src/tutors/abstractions/tutor_repo.rs5
-rw-r--r--src/tutors/fs_tutor.rs48
-rw-r--r--src/tutors/fs_tutor_repo.rs29
-rw-r--r--src/views.rs5
-rw-r--r--src/views/about.rs17
-rw-r--r--src/views/brochure.rs6
-rw-r--r--src/views/index.rs6
-rw-r--r--src/views/policies.rs6
-rw-r--r--src/views/posts.rs17
-rw-r--r--static/favicon.ico (renamed from favicon.ico)bin327262 -> 327262 bytes
-rw-r--r--tutors/email/index.php150
28 files changed, 267 insertions, 1214 deletions
diff --git a/about/figure.php b/about/figure.php
deleted file mode 100644
index c6cee51..0000000
--- a/about/figure.php
+++ /dev/null
@@ -1,8 +0,0 @@
- <figure class="shadowy">
- <picture>
- <source srcset="<?php printf('/about/team/%s/%s.webp', $tutor, $tutor) ?>" type="image/webp" />
- <source srcset="<?php printf('/about/team/%s/%s.png', $tutor, $tutor) ?>" type="image/png" />
- <img alt="<?php include("./team/$tutor/name.php") ?>" src="<?php printf('/about/team/%s/%s.png', $tutor, $tutor) ?>" />
- </picture>
- <figcaption><?php include("./team/$tutor/name.php") ?></figcaption>
- </figure>
diff --git a/about/index.php b/about/index.php
deleted file mode 100644
index b821726..0000000
--- a/about/index.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php include('../header.php'); ?>
-<section class="banner">
- <h1>About Us</h1>
-</section>
-
-<section class="quiet squarshed">
- <p>
- <h2 style="font-size: 1.5em; text-align: center;">
- 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>
-</section>
-
-<section class="quiet flexible squarshed">
- <figure class="shadowy">
- <picture>
- <source srcset="/assets/amy.webp" type="image/webp" />
- <source srcset="/assets/amy.png" type="image/png" />
- <img alt="Amy Carpenter" src="/assets/amy.png" />
- </picture>
- <figcaption>Amy Carpenter, M.Ed.</figcaption>
- </figure>
-
- <div>
- <p>
- I received my B.A. from The College of William and Mary in 2018 and received
- my M.Ed. from W&amp;M in 2020. As an undergraduate, I worked and was trained
- as a tutor at W&amp;M's peer tutoring center, the TutorZone. During
- this period, I conducted over 150 one-on-one appointments with W&amp;M
- students in 26 different content areas. I earned lifetime Advanced Tutor
- Certification, the highest level W&amp;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 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>
- </div>
-
-</section>
-
-<section></section>
-
-<?php
-// Using scandir because directory will remain sufficiently small for memory
-// constraints. Also skipping error handling while team list is a highly
-// controlled directory.
-$flip = true;
-$tutors = scandir('./team');
-
-foreach ($tutors as &$tutor) {
- if (str_starts_with($tutor, '.')) {
- continue;
- }
-?>
- <section class="quiet flexible">
-
- <?php
- if ($flip) {
- include('./blurb.php');
- include('./figure.php');
- } else {
- include('./figure.php');
- include('./blurb.php');
- }
- ?>
-
- </section>
-
- <section></section>
-<?php
- $flip = !$flip;
-}
-?>
-
-<?php include('../footer.php'); ?>
diff --git a/footer.php b/footer.php
deleted file mode 100644
index 3a89f89..0000000
--- a/footer.php
+++ /dev/null
@@ -1,26 +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 alt="logo" src="/assets/logo.png" />
- </picture>
- </figure>
- <p>
- &copy; 2019-<?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/header.php b/header.php
deleted file mode 100644
index fc3ac25..0000000
--- a/header.php
+++ /dev/null
@@ -1,315 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
- <title>
- Tutoring Excellence Online and in Suffolk, 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;
- }
-
- em {
-
- color: var(--darkteal);
- }
-
- section {
- font-size: 1.5em;
- margin: 0;
- padding: 1em;
- }
-
- section.quiet {
- background-color: white;
- }
-
- section.squarshed {
- padding-bottom: 1em;
- padding-top: 1em;
- }
-
- .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;
- }
-
- /* honeypot */
- textarea#beehive {
- display: none;
- }
-
- table {
- width: 100%;
- border-collapse: collapse;
- }
-
- table caption {
- text-align: left;
- }
-
- 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;
- }
-
- .centered {
- text-align: center;
-justify-content: center;
- }
-
- <?php
- if (str_contains($_SERVER['REQUEST_URI'], '/brochure')) {
- include('../brochure/styles.css');
- }
- ?>
- </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 Suffolk, 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 Suffolk, VA - Carpenter Tutoring, LLC" />
- <meta property="og:type" content="website" />
- <meta property="og:url" content="https://carpentertutoring.com" />
-</head>
-
-<body>
- <nav>
- <a href="/#reviews">Reviews</a>
- <a href="/about">Team</a>
- <a href="/policies">Policies</a>
- <a href="/#pricing">Pricing</a>
- <a href="/brochure">Brochure</a>
- <a href="/#offerings">Offerings</a>
- <a href="/#"><img alt="logo" src="/assets/logo-simple.png" /></a>
- </nav>
-
- <main>
diff --git a/index.php b/index.php
deleted file mode 100644
index 530544a..0000000
--- a/index.php
+++ /dev/null
@@ -1,417 +0,0 @@
-<?php
-// honeypot handling for form bots
-session_start();
-
-if ($_SERVER['REQUEST_METHOD'] == 'GET') {
- $_SESSION['beehive'] = true;
-} else if (empty($_SESSION['beehive']) || !$_SESSION['beehive'] || !empty($_POST['beehive'])) {
- header('location: http://0.0.0.0/');
- die;
-}
-
-include('header.php');
-?>
-<!--banner-->
-<section class="banner">
- <h1>CARPENTER TUTORING</h1>
- <h2>
- <strong>Discovering <em>your</em> path to success</strong>
- </h2>
-
- <div class="buttons">
- <a class="button" href="mailto:amy@carpentertutoring.com"> <img src="/assets/icons/email-variant.svg" alt="mailbox" />Amy@CarpenterTutoring.com</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 id="welcome" 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. We offer high-engagement remote appointments through Zoom. A limited
- number of in-person appointments with me are also available for students in the Harbour
- View region of Suffolk, VA. Most of our offerings are one-on-one, and siblings
- and pre-existing groups of students may opt for group meetings. 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 and learn more about the <a href="/#offerings">services we offer</a>, <a href="/about">Carpenter Tutoring's background</a>,
- and some of <a href="/policies">our policies</a>. Thank you for visiting, and
- please do not hesitate to reach out with any questions. We will 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 alt="Amy's signature" src="/assets/signature.png" />
- </picture>
- </figure>
-
- </div>
-
- <figure class="shadowy">
- <picture>
- <source srcset="/assets/amy-sunny.webp" type="image/webp" />
- <source srcset="/assets/amy-sunny.png" type="image/png" />
- <img alt="Amy Carpenter" src="/assets/amy-sunny.png" />
- </picture>
- <figcaption>Amy Carpenter, M.Ed.</figcaption>
- </figure>
-</section>
-
-<!-- offering modals -->
-<div id="offering-subject-tutoring" class="modal">
- <div class="card">
- <p>
- Our regular subject specific offerings include:
-
- <ul>
- <li> All levels of reading/language arts/English</li>
- <li> Writing (formal and creative)</li>
- <li> Foreign Language: French and all levels of Latin</li>
- <li> Math through Calculus II</li>
- <li> Introductory Physics (not at the honors or AP level)</li>
- <li> Biology and Chemistry through 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 &amp; ACT</li>
- <li> PSAT</li>
- <li> ISEE</li>
- <li> SSAT</li>
- <li> GED</li>
- <li> GMAT</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> <strong>$45 option</strong>: Considers math and language arts materials,
- satisfies proof of progress with a personalized letter and evaluator
- credentials </p>
- <p><strong>$80+ option</strong>: Considers math and language arts materials
- 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.
- <strong>Other subjects may be added on for $10 each</strong>.
- </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>
-
-<section class="squarshed flexible centered">
- <a class="button primary" href="/brochure">Click here to view an interactive brochure of our offerings</a>
-</section>
-
-<!-- pricing -->
-<section class="quiet" id="pricing">
- <table>
- <caption>
- <h2>Pricing Guide - Remote*</h2>
- </caption>
- <tbody>
- <tr>
- <th scope="col">
- <a href="#offering-subject-tutoring">Single 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>$60/hr</td>
- </tr>
-
- <tr>
- <th scope="col">
- <a href="#offering-subject-tutoring">Multi-Subject</a>, <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>$70/hr</td>
- </tr>
-
- <tr>
- <th scope="col">Small Group Sessions, Group Lessons</th>
- <td>$40/hr/student</td>
- </tr>
- <tr>
- <th scope="col"><a href="#offering-evals">Simplified Homeschool Evaluations</a></th>
- <td>$45</td>
- </tr>
- <tr>
- <th scope="col"><a href="#offering-evals">Detailed Homeschool Evaluations</a></th>
- <td>$80+</td>
- </tr>
- </tbody>
- </table>
-
- <h3>
- <p><em>*In-person pricing for students in the Harbour View region of Suffolk is $10/hr more in each category.</em></p>
- <a href="/policies">See a list of our policies and procedures regarding scheduling,
- payment, and booking.</a>
- </h3>
-
-</section>
-
-<!-- reviews -->
-<section id="reviews">
-
- <div class="card">
- <h2>C.L. Cannon</h2>
- <blockquote>
- I hired Amy to complete an end-of-the-year evaluation for both of my Elementary aged sons. This being our first year of independent home instruction, the task of testing and/or evaluation was daunting! Amy put my fears to rest! She was super easy to work with, had great communication skills, and answered all my questions in a timely and informative manner! I would highly recommend her services!
- </blockquote>
- <p>
- <a href="https://goo.gl/maps/kC4aTuFqpiyLCJ2r8">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>
-
- <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>
-
-</section>
-<?php include('footer.php'); ?>
diff --git a/src/handlers.rs b/src/handlers.rs
new file mode 100644
index 0000000..db5cf7c
--- /dev/null
+++ b/src/handlers.rs
@@ -0,0 +1,34 @@
+use askama::Template;
+use crate::views::posts::PostsView;
+use crate::posts::abstractions::repo::PostRepo;
+use crate::views::policies::PoliciesTemplate;
+use crate::views::index::IndexTemplate;
+use crate::views::brochure::BrochureTemplate;
+use crate::views::about::AboutView;
+use crate::tutors::abstractions::tutor_repo::TutorRepo;
+use std::sync::Arc;
+use axum::response::Html;
+use axum::extract::State;
+
+pub async fn about_handler(State(repo): State<Arc<impl TutorRepo>>) -> Html<String> {
+ let view = AboutView::with_tutors(repo.load());
+ Html(view.render().unwrap())
+}
+
+pub async fn brochure_handler() -> Html<String> {
+ Html(BrochureTemplate{}.render().unwrap())
+}
+
+pub async fn index_handler() -> Html<String> {
+ Html(IndexTemplate {}.render().unwrap())
+}
+
+pub async fn policies_handler() -> Html<String> {
+ Html(PoliciesTemplate{}.render().unwrap())
+}
+
+pub async fn posts_handler(State(repo): State<Arc<impl PostRepo>>) -> Html<String> {
+ let view = PostsView::with_posts(repo.load());
+ Html(view.render().unwrap())
+}
+
diff --git a/src/helpers.rs b/src/helpers.rs
new file mode 100644
index 0000000..c7509de
--- /dev/null
+++ b/src/helpers.rs
@@ -0,0 +1,5 @@
+use chrono::{prelude::*, Utc};
+
+pub fn current_year() -> i32 {
+ Utc::now().year()
+}
diff --git a/src/main.rs b/src/main.rs
index 7b5ddfc..fb15e51 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,199 +1,14 @@
-use std::cmp::Ordering;
-use std::borrow::Cow;
-use tower_http::services::ServeDir;
-use axum::response::Html;
-use axum::extract::State;
-use std::sync::Arc;
-use askama_axum::Template;
use axum::{routing::get, Router};
-use std::fmt;
-use std::fs;
-use std::path::PathBuf;
-use chrono::Datelike;
-
-fn current_year() -> i32 {
- chrono::Utc::now().year()
-}
-
-trait Post: fmt::Debug {
- fn get_title(&self) -> &str;
- fn get_article(&self) -> Cow<str>;
-}
-
-#[derive(Debug)]
-struct FsPost {
- file: PathBuf,
-}
-
-impl Post for FsPost {
- fn get_title(&self) -> &str {
- self.file.file_name().unwrap().to_str().unwrap()
- }
-
- fn get_article(&self) -> Cow<str> {
- let article = fs::read_to_string(&self.file).unwrap();
- Cow::Owned(article)
- }
-}
-
-trait PostRepo {
- fn load(&self) -> impl IntoIterator<Item = impl Post>;
-}
-
-struct FsPostRepo {
- dir: PathBuf,
-}
-
-impl FsPostRepo {
- fn with_dir(path: impl Into<PathBuf>) -> Self {
- Self {
- dir: path.into()
- }
- }
-}
-
-impl PostRepo for FsPostRepo {
- fn load(&self) -> impl IntoIterator<Item = FsPost> {
- let files = fs::read_dir(&self.dir).unwrap();
- files
- .flatten()
- .filter(|d| !d.file_name().to_string_lossy().starts_with('.'))
- .map(|d| FsPost { file: d.path() })
- }
-}
-
-
-#[derive(Template)]
-#[template(path = "posts.html")]
-struct PostsView<P: Post> {
- posts: Vec<P>
-}
-
-impl<P: Post> PostsView<P> {
- fn with_posts(posts: impl IntoIterator<Item = P>) -> Self {
- Self {
- posts: posts.into_iter().collect()
- }
- }
-}
-
-async fn posts_handler(State(repo): State<Arc<impl PostRepo>>) -> Html<String> {
- let view = PostsView::with_posts(repo.load());
- Html(view.render().unwrap())
-}
-
-trait Tutor: fmt::Debug + Ord {
- fn get_name(&self) -> &str;
- fn get_id(&self) -> &str;
- fn get_blurb(&self) -> Cow<str>;
-}
-
-#[derive(Debug, Eq)]
-struct FsTutor {
- dir: PathBuf
-}
-
-impl Tutor for FsTutor {
- fn get_id(&self) -> &str {
- self.dir.file_name().unwrap().to_str().unwrap()
- }
-
- fn get_name(&self) -> &str {
- self.get_id()
- }
-
- fn get_blurb(&self) -> Cow<str> {
- let mut path = self.dir.to_owned();
- path.push(format!("{}.md", self.get_id()));
- let blurb = fs::read_to_string(path).unwrap();
- Cow::Owned(blurb)
- }
-}
-
-impl Ord for FsTutor {
- fn cmp(&self, other: &Self) -> Ordering {
- self.get_id().cmp(other.get_id())
- }
-}
-
-impl PartialOrd for FsTutor {
- fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
- Some(self.cmp(other))
- }
-}
-
-impl PartialEq for FsTutor {
- fn eq(&self, other: &Self) -> bool {
- self.get_id() == other.get_id()
- }
-}
-
-trait TutorRepo {
- fn load(&self) -> impl IntoIterator<Item = impl Tutor>;
-}
-
-struct FsTutorRepo {
- dir: PathBuf
-}
-
-impl FsTutorRepo {
- fn with_dir(path: impl Into<PathBuf>) -> Self {
- Self {
- dir: path.into()
- }
- }
-}
-
-
-impl TutorRepo for FsTutorRepo {
- fn load(&self) -> impl IntoIterator<Item = FsTutor> {
- let dirs = fs::read_dir(&self.dir).unwrap();
- dirs.flatten().filter(|d| !d.path().file_stem().unwrap().to_str().unwrap_or_default().starts_with('.')).map(|d| FsTutor { dir: d.path() })
- }
-}
-
-
-#[derive(Template)]
-#[template(path = "about/index.html")]
-struct AboutView<T: Tutor> {
- tutors: Vec<T>,
-}
-impl<T: Tutor + Ord> AboutView<T> {
- fn with_tutors(tutors: impl IntoIterator<Item = T>) -> Self {
- let mut tutors: Vec<T> = tutors.into_iter().collect();
- tutors.sort();
- Self { tutors }
- }
-}
-
-async fn about_handler(State(repo): State<Arc<impl TutorRepo>>) -> Html<String> {
- let view = AboutView::with_tutors(repo.load());
- Html(view.render().unwrap())
-}
-
-#[derive(Template)]
-#[template(path = "index.html")]
-struct IndexTemplate;
-
-async fn index_handler() -> Html<String> {
- Html(IndexTemplate {}.render().unwrap())
-}
-
-#[derive(Template)]
-#[template(path = "policies.html")]
-struct PoliciesTemplate;
-
-async fn policies_handler() -> Html<String> {
- Html(PoliciesTemplate{}.render().unwrap())
-}
-
-#[derive(Template)]
-#[template(path = "brochure/index.html")]
-struct BrochureTemplate;
+use tutors::fs_tutor_repo::FsTutorRepo;
+use std::sync::Arc;
+use tower_http::services::ServeDir;
+use posts::fs_post_repo::FsPostRepo;
-async fn brochure_handler() -> Html<String> {
- Html(BrochureTemplate{}.render().unwrap())
-}
+mod helpers;
+mod posts;
+mod tutors;
+mod views;
+mod handlers;
#[tokio::main]
async fn main() {
@@ -201,12 +16,12 @@ async fn main() {
let tutors = Arc::new(FsTutorRepo::with_dir(format!("/data/ct/{}", "team")));
let app = Router::new()
- .route("/", get(index_handler))
- .route("/posts", get(posts_handler))
+ .route("/", get(handlers::index_handler))
+ .route("/posts", get(handlers::posts_handler))
.with_state(posts)
- .route("/policies", get(policies_handler))
- .route("/brochure", get(brochure_handler))
- .route("/about", get(about_handler))
+ .route("/policies", get(handlers::policies_handler))
+ .route("/brochure", get(handlers::brochure_handler))
+ .route("/about", get(handlers::about_handler))
.with_state(tutors)
.nest_service("/assets", ServeDir::new("/data/ct/assets"))
.nest_service("/team", ServeDir::new("/data/ct/team"))
diff --git a/src/posts.rs b/src/posts.rs
new file mode 100644
index 0000000..7f2c217
--- /dev/null
+++ b/src/posts.rs
@@ -0,0 +1,3 @@
+pub mod abstractions;
+pub mod fs_post;
+pub mod fs_post_repo;
diff --git a/src/posts/abstractions.rs b/src/posts/abstractions.rs
new file mode 100644
index 0000000..96c8ced
--- /dev/null
+++ b/src/posts/abstractions.rs
@@ -0,0 +1,2 @@
+pub mod post;
+pub mod repo;
diff --git a/src/posts/abstractions/post.rs b/src/posts/abstractions/post.rs
new file mode 100644
index 0000000..6d504db
--- /dev/null
+++ b/src/posts/abstractions/post.rs
@@ -0,0 +1,6 @@
+use std::{borrow::Cow, fmt};
+
+pub trait Post: fmt::Debug {
+ fn get_title(&self) -> &str;
+ fn get_article(&self) -> Cow<str>;
+}
diff --git a/src/posts/abstractions/repo.rs b/src/posts/abstractions/repo.rs
new file mode 100644
index 0000000..6fcb385
--- /dev/null
+++ b/src/posts/abstractions/repo.rs
@@ -0,0 +1,5 @@
+use crate::posts::abstractions::post::Post;
+
+pub trait PostRepo {
+ fn load(&self) -> impl IntoIterator<Item = impl Post>;
+}
diff --git a/src/posts/fs_post.rs b/src/posts/fs_post.rs
new file mode 100644
index 0000000..e767803
--- /dev/null
+++ b/src/posts/fs_post.rs
@@ -0,0 +1,24 @@
+use crate::posts::abstractions::post::Post;
+use std::{borrow::Cow, fs, path::PathBuf};
+
+#[derive(Debug)]
+pub struct FsPost {
+ file: PathBuf,
+}
+
+impl FsPost {
+ pub fn with_path(path: PathBuf) -> Self {
+ Self { file: path }
+ }
+}
+
+impl Post for FsPost {
+ fn get_title(&self) -> &str {
+ self.file.file_name().unwrap().to_str().unwrap()
+ }
+
+ fn get_article(&self) -> Cow<str> {
+ let article = fs::read_to_string(&self.file).unwrap();
+ Cow::Owned(article)
+ }
+}
diff --git a/src/posts/fs_post_repo.rs b/src/posts/fs_post_repo.rs
new file mode 100644
index 0000000..eb37a6a
--- /dev/null
+++ b/src/posts/fs_post_repo.rs
@@ -0,0 +1,23 @@
+use crate::posts::abstractions::repo::PostRepo;
+use crate::posts::fs_post::FsPost;
+use std::{fs, path::PathBuf};
+
+pub struct FsPostRepo {
+ dir: PathBuf,
+}
+
+impl FsPostRepo {
+ pub fn with_dir(path: impl Into<PathBuf>) -> Self {
+ Self { dir: path.into() }
+ }
+}
+
+impl PostRepo for FsPostRepo {
+ fn load(&self) -> impl IntoIterator<Item = FsPost> {
+ let files = fs::read_dir(&self.dir).unwrap();
+ files
+ .flatten()
+ .filter(|d| !d.file_name().to_string_lossy().starts_with('.'))
+ .map(|d| FsPost::with_path(d.path()))
+ }
+}
diff --git a/src/tutors.rs b/src/tutors.rs
new file mode 100644
index 0000000..d90ef99
--- /dev/null
+++ b/src/tutors.rs
@@ -0,0 +1,3 @@
+pub mod abstractions;
+pub mod fs_tutor;
+pub mod fs_tutor_repo;
diff --git a/src/tutors/abstractions.rs b/src/tutors/abstractions.rs
new file mode 100644
index 0000000..a93c25d
--- /dev/null
+++ b/src/tutors/abstractions.rs
@@ -0,0 +1,2 @@
+pub mod tutor;
+pub mod tutor_repo;
diff --git a/src/tutors/abstractions/tutor.rs b/src/tutors/abstractions/tutor.rs
new file mode 100644
index 0000000..f36da3d
--- /dev/null
+++ b/src/tutors/abstractions/tutor.rs
@@ -0,0 +1,7 @@
+use std::{borrow::Cow, fmt};
+
+pub trait Tutor: fmt::Debug + Ord {
+ fn get_name(&self) -> &str;
+ fn get_id(&self) -> &str;
+ fn get_blurb(&self) -> Cow<str>;
+}
diff --git a/src/tutors/abstractions/tutor_repo.rs b/src/tutors/abstractions/tutor_repo.rs
new file mode 100644
index 0000000..e017806
--- /dev/null
+++ b/src/tutors/abstractions/tutor_repo.rs
@@ -0,0 +1,5 @@
+use crate::tutors::abstractions::tutor::Tutor;
+
+pub trait TutorRepo {
+ fn load(&self) -> impl IntoIterator<Item = impl Tutor>;
+}
diff --git a/src/tutors/fs_tutor.rs b/src/tutors/fs_tutor.rs
new file mode 100644
index 0000000..dc8a635
--- /dev/null
+++ b/src/tutors/fs_tutor.rs
@@ -0,0 +1,48 @@
+use crate::tutors::abstractions::tutor::Tutor;
+use std::{borrow::Cow, cmp::Ordering, fs, path::PathBuf};
+
+#[derive(Debug, Eq)]
+pub struct FsTutor {
+ dir: PathBuf,
+}
+
+impl FsTutor {
+ pub fn with_dir(path: PathBuf) -> Self {
+ Self { dir: path }
+ }
+}
+
+impl Tutor for FsTutor {
+ fn get_id(&self) -> &str {
+ self.dir.file_name().unwrap().to_str().unwrap()
+ }
+
+ fn get_name(&self) -> &str {
+ self.get_id()
+ }
+
+ fn get_blurb(&self) -> Cow<str> {
+ let mut path = self.dir.to_owned();
+ path.push(format!("{}.md", self.get_id()));
+ let blurb = fs::read_to_string(path).unwrap();
+ Cow::Owned(blurb)
+ }
+}
+
+impl Ord for FsTutor {
+ fn cmp(&self, other: &Self) -> Ordering {
+ self.get_id().cmp(other.get_id())
+ }
+}
+
+impl PartialOrd for FsTutor {
+ fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+ Some(self.cmp(other))
+ }
+}
+
+impl PartialEq for FsTutor {
+ fn eq(&self, other: &Self) -> bool {
+ self.get_id() == other.get_id()
+ }
+}
diff --git a/src/tutors/fs_tutor_repo.rs b/src/tutors/fs_tutor_repo.rs
new file mode 100644
index 0000000..9b9a8d9
--- /dev/null
+++ b/src/tutors/fs_tutor_repo.rs
@@ -0,0 +1,29 @@
+use crate::tutors::abstractions::tutor_repo::TutorRepo;
+use crate::tutors::fs_tutor::FsTutor;
+use std::{fs, path::PathBuf};
+
+pub struct FsTutorRepo {
+ dir: PathBuf,
+}
+
+impl FsTutorRepo {
+ pub fn with_dir(path: impl Into<PathBuf>) -> Self {
+ Self { dir: path.into() }
+ }
+}
+
+impl TutorRepo for FsTutorRepo {
+ fn load(&self) -> impl IntoIterator<Item = FsTutor> {
+ let dirs = fs::read_dir(&self.dir).unwrap();
+ dirs.flatten()
+ .filter(|d| {
+ !d.path()
+ .file_stem()
+ .unwrap()
+ .to_str()
+ .unwrap_or_default()
+ .starts_with('.')
+ })
+ .map(|d| FsTutor::with_dir(d.path()))
+ }
+}
diff --git a/src/views.rs b/src/views.rs
new file mode 100644
index 0000000..b986f56
--- /dev/null
+++ b/src/views.rs
@@ -0,0 +1,5 @@
+pub mod about;
+pub mod brochure;
+pub mod index;
+pub mod policies;
+pub mod posts;
diff --git a/src/views/about.rs b/src/views/about.rs
new file mode 100644
index 0000000..349c9de
--- /dev/null
+++ b/src/views/about.rs
@@ -0,0 +1,17 @@
+use crate::helpers::*;
+use crate::tutors::abstractions::tutor::Tutor;
+use askama::Template;
+
+#[derive(Template)]
+#[template(path = "about/index.html")]
+pub struct AboutView<T: Tutor> {
+ tutors: Vec<T>,
+}
+
+impl<T: Tutor> AboutView<T> {
+ pub fn with_tutors(tutors: impl IntoIterator<Item = T>) -> Self {
+ let mut tutors: Vec<T> = tutors.into_iter().collect();
+ tutors.sort();
+ Self { tutors }
+ }
+}
diff --git a/src/views/brochure.rs b/src/views/brochure.rs
new file mode 100644
index 0000000..0d2f8fc
--- /dev/null
+++ b/src/views/brochure.rs
@@ -0,0 +1,6 @@
+use crate::helpers::*;
+use askama::Template;
+
+#[derive(Template)]
+#[template(path = "brochure/index.html")]
+pub struct BrochureTemplate;
diff --git a/src/views/index.rs b/src/views/index.rs
new file mode 100644
index 0000000..3ced24d
--- /dev/null
+++ b/src/views/index.rs
@@ -0,0 +1,6 @@
+use crate::helpers::*;
+use askama::Template;
+
+#[derive(Template)]
+#[template(path = "index.html")]
+pub struct IndexTemplate;
diff --git a/src/views/policies.rs b/src/views/policies.rs
new file mode 100644
index 0000000..3d9787d
--- /dev/null
+++ b/src/views/policies.rs
@@ -0,0 +1,6 @@
+use crate::helpers::*;
+use askama::Template;
+
+#[derive(Template)]
+#[template(path = "policies.html")]
+pub struct PoliciesTemplate;
diff --git a/src/views/posts.rs b/src/views/posts.rs
new file mode 100644
index 0000000..2ce69f8
--- /dev/null
+++ b/src/views/posts.rs
@@ -0,0 +1,17 @@
+use crate::helpers::*;
+use crate::posts::abstractions::post::Post;
+use askama::Template;
+
+#[derive(Template)]
+#[template(path = "posts.html")]
+pub struct PostsView<P: Post> {
+ posts: Vec<P>,
+}
+
+impl<P: Post> PostsView<P> {
+ pub fn with_posts(posts: impl IntoIterator<Item = P>) -> Self {
+ Self {
+ posts: posts.into_iter().collect(),
+ }
+ }
+}
diff --git a/favicon.ico b/static/favicon.ico
index 8ba4c15..8ba4c15 100644
--- a/favicon.ico
+++ b/static/favicon.ico
Binary files differ
diff --git a/tutors/email/index.php b/tutors/email/index.php
deleted file mode 100644
index 7ea8211..0000000
--- a/tutors/email/index.php
+++ /dev/null
@@ -1,150 +0,0 @@
-<?php include('../../header.php'); ?>
-
-<section class="banner">
- <h1>Email setup</h1>
-</section>
-
-<section class="quiet flexible">
- <div>
- <p>
- Every tutor is expected to use a <em>@carpentertutoring.com</em> email address to facilitate client communication. This guide will walk you through setting up your email from scratch and configuring your mail client to use it.
- </p>
-
- <p>
- You have two options for using your new email address. The first is <em>standalone</em> which allows you to use the mail client of your choice to send and receive mail. Some popular desktop clients are Apple's Mail app, Mozilla Thunderbird, and Microsoft Outlook. Popular mobile mail clients include the iOS Mail app and K-9 Mail for Android. Your mailbox will remain on the Carpenter Tutoring mail server and in no way interact with any personal or private mail accounts you have on other systems.
- </p>
-
- <p>
- Your second choice is <em>forwarding</em>, where all of your Carpenter Tutoring mail will forward to a personal email address of your choice. Your personal email provider will need to be configured to send mail as your Carpenter Tutoring address for any client communication. The amount of setup is the same, but this method allows you to use a client such as <em>GMail</em> for managing mail.
- </p>
-
- <p>
- Remember you can change your decision anytime. See "Getting help" below.
- </p>
-
- <?php
- if (empty($_POST['password'])) {
- ?>
- <h2>Create a mail account</h2>
- <form method="post" action="/tutors/email/index.php#submit">
- <label for="name">Your full name
- <input type="text" name="name" placeholder="Amy Carpenter" required />
- </label>
-
- <label for="password">Your new Carpenter Tutoring email password
- <input type="password" name="password" minlength="8" placeholder="8 character minimum" required />
- </label>
-
- <label for="forward">Personal email address for forwarding
- <input type="email" name="forward" placeholder="leave blank to use a standalone mail client" />
- </label>
-
- <button type="submit" class="button" alt="submit">Set me up</button>
- </form>
- <?
- }
- ?>
-
- <?php
- if (!empty($_POST['password']) && !empty($_POST['name'])) {
- // encrypt email and add to logins queue
- $descriptorspec = array(
- 0 => array('pipe', 'r'),
- 1 => array('file', '/var/ct_logins', 'a'),
- 2 => array('file', '/var/log/ct_mail_submit.log', 'a')
- );
- $process = proc_open('smtpctl encrypt', $descriptorspec, $pipes);
- fwrite($pipes[0], $_POST['password']);
- fclose($pipes[0]);
-
- // include name and generated email in logins queue
- $logins_queue = fopen('/var/ct_logins', 'a');
- fprintf($logins_queue, '\n%s\n', $_POST['name']);
-
- $names = explode(' ', strtolower($_POST['name']));
-
- $last = $names[1][0];
- $first = $names[0];
- $email = "$first$last@carpentertutoring.com";
- fprintf($logins_queue, '%s\n\n', $email);
-
- // close queue
- fclose($logins_queue);
- }
- ?>
- <h2 id="submit">Configuring your mail client</h2>
- <p>
- You may choose to use a third-party mail app to check your mail, forward your mail to a GMail address, or use another third-party webmail client. Follow the instructions below for the option you chose when you created your password. The connection settings remain the same either way.
- </p>
-
- <h3>Connection details</h2>
- <pre>
-SMTP server: mail.53hor.net
-Connection security: STARTTLS
-Authentication method: normal password
-SMTP port: 587
-SMTP password: (use the password you just submitted)
-SMTP username: (full carpenter tutoring email address)
-
-
-IMAP server: mail.53hor.net
-Connection security: STARTTLS
-Authentication method: normal password
-IMAP port: 143
-IMAP password: (use the password you just submitted)
-IMAP username: (full carpenter tutoring email address)
-</pre>
- <h3>Gmail forwarding</h3>
-
- <p>
- Once your <em>@carpentertutoring.com</em> email address is created, you will begin receiving forwarded email in your Gmail inbox. Sending mail from your <em>@carpentertutoring.com</em> address via Gmail requires a small amount of setup.
- </p>
-
- <p>
-
- <ol>
- <li>On your computer, open <a href="https://mail.google.com" target="_blank">Gmail</a>.</li>
- <li>In the top right, click settings (⚙️) and then <em>See all settings</em>.</li>
- <li>Click the <em>Accounts and import</em> or <em>Accounts</em> tab.</li>
- <li>In the "Send mail as" section, click <em>Add another email address</em>.</li>
- <li>Enter your name and the address you want to send from. This will be your <em>@carpentertutoring.com</em> address. Leave the "Treat as an alias" box checked.</li>
- <li>Click <em>Next Step</em>.</li>
- <li>For the "SMTP server" enter <em>mail.53hor.net</em>. Select <em>587</em> for the port.</li>
- <li>For the username and password you will enter your new Carpenter Tutoring address (with "@carpentertutoring.com" suffix) and the password you submitted in the previous step.</li>
- <li>Check "Secured connection using TLS (recommended)" and click <em>Add Account</em>.</li>
- <li>Gmail will prompt you to verify your new address. You should receive a confirmation code in your inbox, forwarded from your <em>@carpentertutoring.com</em> address. Use it to complete the alias setup.</li>
- <li>Return to the "Send mail as" section on the settings page and look for "When replying to a message." Check "Reply from the same address the message was sent to." This will ensure you respond to tutoring inquiries with your Carpenter Tutoring address and personal mail with your Gmail address.</li>
-
- </ol>
- </p>
-
- <h3>Native mail clients</h3>
- <p>
- <ul>
- <li><a href="https://support.apple.com/en-us/HT201320">iOS Mail app</a></li>
- <li><a href="https://support.microsoft.com/en-us/office/set-up-email-in-the-mail-app-7ff79e8b-439b-4b47-8ff9-3f9a33166c60">Mail app for Windows 10 or Windows 11</a></li>
- <li><a href="https://support.mozilla.org/en-US/kb/manual-account-configuration">Mozilla Thunderbird</a></li>
- </ul>
- </p>
-
- <h3>Other webmail clients</h3>
-
- <p>
- Setup instructions for other popular webmail clients are largely the same. The configuration options for IMAP and SMTP should be identical. Below is a list of setup instructions for common providers.
- </p>
- <p>
- <ul>
- <li><a href="https://support.microsoft.com/en-gb/office/add-or-remove-an-email-alias-in-outlook-com-459b1989-356d-40fa-a689-8f285b13f1f2">Outlook.com (MS Hotmail)</a></li>
- <li><a href="https://support.apple.com/guide/icloud/add-and-manage-email-aliases-mm6b1a490a/icloud">iCloud.com (Apple iCloud)</a></li>
-
- </ul>
- </p>
- <h2>Getting help</h2>
- <p>
- If you encounter difficulty or have questions throughout any part of this process, please reach out to <a href="webmaster@carpentertutoring.com">webmaster@carpentertutoring.com</a> and we'll get in touch to help.
- </p>
- </div>
-
-</section>
-
-<?php include('../../footer.php'); ?>