summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2026-02-06 00:00:31 -0500
committerAdam T. Carpenter <atc@53hor.net>2026-02-06 00:00:31 -0500
commit397cba80abde9a03252aeea7227a4eca00ed5b6e (patch)
tree91d0afb9f127f8f9c2a856839c537abedf15a813 /src
parent908bddf0bc68d18612ec2fae885cd178fef022d2 (diff)
downloadcarpentertutoring-397cba80abde9a03252aeea7227a4eca00ed5b6e.tar.xz
carpentertutoring-397cba80abde9a03252aeea7227a4eca00ed5b6e.zip
feat: summer camps
Diffstat (limited to 'src')
-rw-r--r--src/handlers.rs5
-rw-r--r--src/main.rs1
-rw-r--r--src/views.rs1
-rw-r--r--src/views/camp.rs6
4 files changed, 13 insertions, 0 deletions
diff --git a/src/handlers.rs b/src/handlers.rs
index aa36e15..576547d 100644
--- a/src/handlers.rs
+++ b/src/handlers.rs
@@ -2,6 +2,7 @@ use crate::posts::abstractions::repo::PostRepo;
use crate::tutors::abstractions::tutor_repo::TutorRepo;
use crate::views::about::AboutView;
use crate::views::brochure::BrochureTemplate;
+use crate::views::camp::CampTemplate;
use crate::views::highered::HigherEdTemplate;
use crate::views::index::IndexTemplate;
use crate::views::k12::K12Template;
@@ -59,3 +60,7 @@ pub async fn highered_handler() -> Html<String> {
pub async fn pro_handler() -> Html<String> {
Html(ProTemplate {}.render().unwrap())
}
+
+pub async fn camp_handler() -> Html<String> {
+ Html(CampTemplate {}.render().unwrap())
+}
diff --git a/src/main.rs b/src/main.rs
index a9cd722..d802cc4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -53,6 +53,7 @@ async fn main() {
.route("/k12", get(handlers::k12_handler))
.route("/highered", get(handlers::highered_handler))
.route("/professional", get(handlers::pro_handler))
+ .route("/camp", get(handlers::camp_handler))
.with_state(tutors)
.nest_service("/assets", ServeDir::new(assets_dir))
.nest_service("/team", ServeDir::new(tutor_dir))
diff --git a/src/views.rs b/src/views.rs
index f880818..041ae15 100644
--- a/src/views.rs
+++ b/src/views.rs
@@ -1,5 +1,6 @@
pub mod about;
pub mod brochure;
+pub mod camp;
pub mod highered;
pub mod index;
pub mod k12;
diff --git a/src/views/camp.rs b/src/views/camp.rs
new file mode 100644
index 0000000..edf1e7e
--- /dev/null
+++ b/src/views/camp.rs
@@ -0,0 +1,6 @@
+use crate::helpers::*;
+use askama::Template;
+
+#[derive(Template)]
+#[template(path = "camp.html.j2")]
+pub struct CampTemplate;