diff options
-rw-r--r-- | .vscode/launch.json | 6 | ||||
-rw-r--r-- | src/views/about.rs | 2 | ||||
-rw-r--r-- | src/views/brochure.rs | 2 | ||||
-rw-r--r-- | src/views/index.rs | 2 | ||||
-rw-r--r-- | src/views/k12.rs | 2 | ||||
-rw-r--r-- | src/views/policies.rs | 2 | ||||
-rw-r--r-- | src/views/post.rs | 2 | ||||
-rw-r--r-- | src/views/posts.rs | 2 | ||||
-rw-r--r-- | static/brochure.css (renamed from templates/brochure/brochure.css) | 0 | ||||
-rw-r--r-- | static/styles.css (renamed from templates/styles.css) | 7 | ||||
-rw-r--r-- | templates/about/blurb.html.j2 (renamed from templates/about/blurb.html) | 0 | ||||
-rw-r--r-- | templates/about/figure.html.j2 (renamed from templates/about/figure.html) | 0 | ||||
-rw-r--r-- | templates/about/index.html.j2 (renamed from templates/about/index.html) | 4 | ||||
-rw-r--r-- | templates/about/team.html | 11 | ||||
-rw-r--r-- | templates/about/team.html.j2 | 11 | ||||
-rw-r--r-- | templates/base.html.j2 (renamed from templates/base.html) | 26 | ||||
-rw-r--r-- | templates/brochure/brochure.html.j2 (renamed from templates/brochure/brochure.html) | 0 | ||||
-rw-r--r-- | templates/brochure/index.html.j2 (renamed from templates/brochure/index.html) | 12 | ||||
-rw-r--r-- | templates/card.html.j2 (renamed from templates/card.html) | 0 | ||||
-rw-r--r-- | templates/contact-buttons.html.j2 (renamed from templates/contact-buttons.html) | 0 | ||||
-rw-r--r-- | templates/index.html.j2 (renamed from templates/index.html) | 7 | ||||
-rw-r--r-- | templates/k12.html.j2 (renamed from templates/k12.html) | 2 | ||||
-rw-r--r-- | templates/policies.html.j2 (renamed from templates/policies.html) | 4 | ||||
-rw-r--r-- | templates/post.html.j2 (renamed from templates/post.html) | 2 | ||||
-rw-r--r-- | templates/posts.html.j2 (renamed from templates/posts.html) | 2 | ||||
-rw-r--r-- | templates/stylewrap.html.j2 | 5 |
26 files changed, 58 insertions, 55 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json index d2d9ffe..74bf340 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -17,7 +17,11 @@ } }, "args": [], - "cwd": "${workspaceFolder}" + "cwd": "${workspaceFolder}", + "preLaunchTask": "rust: cargo build", + "env": { + "CT_BIND": "0.0.0.0:8001" + } }, { "type": "lldb", diff --git a/src/views/about.rs b/src/views/about.rs index 349c9de..d2e0958 100644 --- a/src/views/about.rs +++ b/src/views/about.rs @@ -3,7 +3,7 @@ use crate::tutors::abstractions::tutor::Tutor; use askama::Template; #[derive(Template)] -#[template(path = "about/index.html")] +#[template(path = "about/index.html.j2")] pub struct AboutView<T: Tutor> { tutors: Vec<T>, } diff --git a/src/views/brochure.rs b/src/views/brochure.rs index 0d2f8fc..fedf827 100644 --- a/src/views/brochure.rs +++ b/src/views/brochure.rs @@ -2,5 +2,5 @@ use crate::helpers::*; use askama::Template; #[derive(Template)] -#[template(path = "brochure/index.html")] +#[template(path = "brochure/index.html.j2")] pub struct BrochureTemplate; diff --git a/src/views/index.rs b/src/views/index.rs index 3ced24d..720749a 100644 --- a/src/views/index.rs +++ b/src/views/index.rs @@ -2,5 +2,5 @@ use crate::helpers::*; use askama::Template; #[derive(Template)] -#[template(path = "index.html")] +#[template(path = "index.html.j2")] pub struct IndexTemplate; diff --git a/src/views/k12.rs b/src/views/k12.rs index eb9725f..c7dc019 100644 --- a/src/views/k12.rs +++ b/src/views/k12.rs @@ -2,5 +2,5 @@ use crate::helpers::*; use askama::Template; #[derive(Template)] -#[template(path = "k12.html")] +#[template(path = "k12.html.j2")] pub struct K12Template; diff --git a/src/views/policies.rs b/src/views/policies.rs index 3d9787d..4253e6c 100644 --- a/src/views/policies.rs +++ b/src/views/policies.rs @@ -2,5 +2,5 @@ use crate::helpers::*; use askama::Template; #[derive(Template)] -#[template(path = "policies.html")] +#[template(path = "policies.html.j2")] pub struct PoliciesTemplate; diff --git a/src/views/post.rs b/src/views/post.rs index 4f0554b..03e5ef2 100644 --- a/src/views/post.rs +++ b/src/views/post.rs @@ -3,7 +3,7 @@ use crate::posts::abstractions::post::Post; use askama::Template; #[derive(Template)] -#[template(path = "post.html")] +#[template(path = "post.html.j2")] pub struct PostView<P: Post> { post: P, } diff --git a/src/views/posts.rs b/src/views/posts.rs index 82b5996..5091059 100644 --- a/src/views/posts.rs +++ b/src/views/posts.rs @@ -3,7 +3,7 @@ use crate::posts::abstractions::post::Post; use askama::Template; #[derive(Template)] -#[template(path = "posts.html")] +#[template(path = "posts.html.j2")] pub struct PostsView<P: Post> { posts: Vec<P>, } diff --git a/templates/brochure/brochure.css b/static/brochure.css index 2abb118..2abb118 100644 --- a/templates/brochure/brochure.css +++ b/static/brochure.css diff --git a/templates/styles.css b/static/styles.css index 609a0f7..6dde6d4 100644 --- a/templates/styles.css +++ b/static/styles.css @@ -23,6 +23,7 @@ body { body { background-image: url("/assets/bg.webp"); + background-size: 50%; } nav { @@ -31,6 +32,7 @@ nav { background-color: white; position: fixed; width: 100%; + z-index: 1; } nav img { @@ -112,11 +114,6 @@ section.cards { background-color: transparent; } -section.squarshed { - padding-bottom: 1em; - padding-top: 1em; -} - .button img { margin-right: 1em; } diff --git a/templates/about/blurb.html b/templates/about/blurb.html.j2 index 4389d47..4389d47 100644 --- a/templates/about/blurb.html +++ b/templates/about/blurb.html.j2 diff --git a/templates/about/figure.html b/templates/about/figure.html.j2 index 168aa4e..168aa4e 100644 --- a/templates/about/figure.html +++ b/templates/about/figure.html.j2 diff --git a/templates/about/index.html b/templates/about/index.html.j2 index fcbc286..71891ee 100644 --- a/templates/about/index.html +++ b/templates/about/index.html.j2 @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base.html.j2" %} {% block main %} <section class="banner"> @@ -64,6 +64,6 @@ </section> -{% include "team.html" %} +{% include "team.html.j2" %} {% endblock %}
\ No newline at end of file diff --git a/templates/about/team.html b/templates/about/team.html deleted file mode 100644 index c2b4498..0000000 --- a/templates/about/team.html +++ /dev/null @@ -1,11 +0,0 @@ -{% for tutor in tutors %} -<sectionclass=" flexible"> - {% if loop.index0 % 2 == 0 %} - {% include "blurb.html" %} - {% include "figure.html" %} - {% else %} - {% include "figure.html" %} - {% include "blurb.html" %} - {% endif %} - </section> - {% endfor %}
\ No newline at end of file diff --git a/templates/about/team.html.j2 b/templates/about/team.html.j2 new file mode 100644 index 0000000..05bb2f8 --- /dev/null +++ b/templates/about/team.html.j2 @@ -0,0 +1,11 @@ +{% for tutor in tutors %} +<sectionclass=" flexible"> + {% if loop.index0 % 2 == 0 %} + {% include "blurb.html.j2" %} + {% include "figure.html.j2" %} + {% else %} + {% include "figure.html.j2" %} + {% include "blurb.html.j2" %} + {% endif %} + </section> + {% endfor %}
\ No newline at end of file diff --git a/templates/base.html b/templates/base.html.j2 index 49d8c40..c0f8885 100644 --- a/templates/base.html +++ b/templates/base.html.j2 @@ -7,11 +7,9 @@ Tutoring Excellence Online and in Suffolk, VA - Carpenter Tutoring, LLC {% endblock %} </title> - <style> - {% block style %} - {% include "styles.css" %} - {% endblock %} - </style> + {% block styles %} + <link rel="stylesheet" href="/styles.css" /> + {% endblock %} <link rel="preconnect" href="https://fonts.gstatic.com" /> <link rel="stylesheet" href="/desktop.css" /> <link rel="stylesheet" href="/widescreen.css" /> @@ -33,11 +31,11 @@ <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-RZLJ3ZBKZL"></script> <script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); + window.dataLayer = window.dataLayer || []; + function gtag() { dataLayer.push(arguments); } + gtag('js', new Date()); - gtag('config', 'G-RZLJ3ZBKZL'); + gtag('config', 'G-RZLJ3ZBKZL'); </script> @@ -71,11 +69,11 @@ </figure> <div id="contact" class="buttons centered"> - {% include "contact-buttons.html" %} + {% include "contact-buttons.html.j2" %} </div> <p> - © 2019-{{ self::current_year() }} Carpenter Tutoring, LLC. All rights reserved. + © 2019-{{ self::current_year() }} Carpenter Tutoring, LLC. All rights reserved. </p> <p> <a href="https://g.page/carpenter-tutoring?share">Visit me on Google</a> @@ -89,7 +87,9 @@ </footer> <script src="/nav.js"></script> - <link href="https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Indie+Flower&family=PT+Sans&display=swap" rel="stylesheet" /> + <link + href="https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Indie+Flower&family=PT+Sans&display=swap" + rel="stylesheet" /> </body> -</html> +</html>
\ No newline at end of file diff --git a/templates/brochure/brochure.html b/templates/brochure/brochure.html.j2 index b5a3cd3..b5a3cd3 100644 --- a/templates/brochure/brochure.html +++ b/templates/brochure/brochure.html.j2 diff --git a/templates/brochure/index.html b/templates/brochure/index.html.j2 index 6304887..a3a5b33 100644 --- a/templates/brochure/index.html +++ b/templates/brochure/index.html.j2 @@ -1,8 +1,8 @@ -{% extends "base.html" %} +{% extends "base.html.j2" %} -{% block style %} -{% include "../styles.css" %} -{% include "brochure.css" %} +{% block styles %} +<link rel="stylesheet" href="/styles.css" /> +<link rel="stylesheet" href="/brochure.css" /> {% endblock %} {% block main %} @@ -21,12 +21,10 @@ desktop screen. </p> - {% include "brochure.html" %} + {% include "brochure.html.j2" %} </section> -<section></section> - <script> {% include "brochure.js" %} </script> diff --git a/templates/card.html b/templates/card.html.j2 index 1397bc8..1397bc8 100644 --- a/templates/card.html +++ b/templates/card.html.j2 diff --git a/templates/contact-buttons.html b/templates/contact-buttons.html.j2 index bae7460..bae7460 100644 --- a/templates/contact-buttons.html +++ b/templates/contact-buttons.html.j2 diff --git a/templates/index.html b/templates/index.html.j2 index b5f4bd6..9af86fe 100644 --- a/templates/index.html +++ b/templates/index.html.j2 @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base.html.j2" %} {% block main %} <!--banner--> @@ -53,7 +53,7 @@ </section> <!-- help --> -<section class="squarshed centered" id="help"> +<section class="centered" id="help"> <h2>Helpful Links</h2> <a class="button primary centered" href="/brochure">View an interactive brochure of our offerings</a> <a class="button centered" href="/policies">See policies and procedures regarding scheduling, payment, and @@ -61,7 +61,8 @@ </section> <!-- reviews --> -<section id="reviews"> +<!-- TODO: fix these cards --> +<section id="reviews" class="cards"> <div class="card"> <h2>C.L. Cannon</h2> diff --git a/templates/k12.html b/templates/k12.html.j2 index 6467d55..bfa9527 100644 --- a/templates/k12.html +++ b/templates/k12.html.j2 @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base.html.j2" %} {% block main %} diff --git a/templates/policies.html b/templates/policies.html.j2 index 6a5754a..3d90da5 100644 --- a/templates/policies.html +++ b/templates/policies.html.j2 @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base.html.j2" %} {% block main %} @@ -365,6 +365,4 @@ </ul> </section> -<section></section> - {% endblock %}
\ No newline at end of file diff --git a/templates/post.html b/templates/post.html.j2 index 9eb3444..e1c447a 100644 --- a/templates/post.html +++ b/templates/post.html.j2 @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base.html.j2" %} {% block title %} {{ post.get_title() }} - Carpenter Tutoring, LLC diff --git a/templates/posts.html b/templates/posts.html.j2 index 2f1df6b..e9efdfb 100644 --- a/templates/posts.html +++ b/templates/posts.html.j2 @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base.html.j2" %} {% block main %} <section class="banner"> diff --git a/templates/stylewrap.html.j2 b/templates/stylewrap.html.j2 new file mode 100644 index 0000000..a68f592 --- /dev/null +++ b/templates/stylewrap.html.j2 @@ -0,0 +1,5 @@ +<style> + {% block style %} + {% include "styles.css" %} + {% endblock %} +</style>
\ No newline at end of file |