From 9f341d439f7aa5fd2365024169ead2d6bdc3210c Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Sat, 14 Sep 2024 20:30:05 -0400 Subject: feat: rewrite complete --- src/views/about.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/views/about.rs (limited to 'src/views/about.rs') 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 { + tutors: Vec, +} + +impl AboutView { + pub fn with_tutors(tutors: impl IntoIterator) -> Self { + let mut tutors: Vec = tutors.into_iter().collect(); + tutors.sort(); + Self { tutors } + } +} -- cgit v1.2.3