From bf4d599ccd68187edaf14ab0f55e842acdf09f91 Mon Sep 17 00:00:00 2001 From: Thom Dickson Date: Fri, 18 Mar 2022 23:04:32 -0400 Subject: [PATCH 1/5] Add some basic zola boilerplate --- .gitignore | 1 + config.toml | 16 ++++++++++++++++ content/about.md | 5 +++++ templates/base.html | 16 ++++++++++++++++ templates/index.html | 4 ++++ templates/page.html | 7 +++++++ 6 files changed, 49 insertions(+) create mode 100644 .gitignore create mode 100644 config.toml create mode 100644 content/about.md create mode 100644 templates/base.html create mode 100644 templates/index.html create mode 100644 templates/page.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..364fdec --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +public/ diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..312dec5 --- /dev/null +++ b/config.toml @@ -0,0 +1,16 @@ +# The URL the site will be built for +base_url = "https://mountainlinux.club" + +# Whether to automatically compile all Sass files in the sass directory +compile_sass = true + +# Whether to build a search index to be used later on by a JavaScript library +build_search_index = true + +[markdown] +# Whether to do syntax highlighting +# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola +highlight_code = true + +[extra] +# Put all your custom variables here diff --git a/content/about.md b/content/about.md new file mode 100644 index 0000000..28961f6 --- /dev/null +++ b/content/about.md @@ -0,0 +1,5 @@ ++++ +title="About Us" ++++ + +This is an about us page diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..91d6745 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,16 @@ + + + + {% if page.title %} + {{ page.title }} + {% else %} + Mountain Linux Club + {% endif %} + + + + {% block content %} + {% endblock %} + + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..c339891 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} +{% block content %} +This will be the homepage +{% endblock %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..b27e1b1 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} +{% block content %} +{% if page.title %} +

{{ page.title }}

+{% endif %} +{{ page.content | safe }} +{% endblock %} From 488e853ec2fd840f6709a873c249b320050dd53d Mon Sep 17 00:00:00 2001 From: Thom Dickson Date: Sun, 20 Mar 2022 14:24:55 -0400 Subject: [PATCH 2/5] Add basic base layout --- config.toml | 4 ++++ sass/main.scss | 30 ++++++++++++++++++++++++++++++ templates/base.html | 10 ++++++++-- templates/sidebar.html | 14 ++++++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 sass/main.scss create mode 100644 templates/sidebar.html diff --git a/config.toml b/config.toml index 312dec5..9e74342 100644 --- a/config.toml +++ b/config.toml @@ -14,3 +14,7 @@ highlight_code = true [extra] # Put all your custom variables here +toolbar_pages = [ + ["About Us", "about"], + ["Contact", "contact"], +] diff --git a/sass/main.scss b/sass/main.scss new file mode 100644 index 0000000..d4106b4 --- /dev/null +++ b/sass/main.scss @@ -0,0 +1,30 @@ +$sidebar_width: 20%; + +body { + margin: 0; + nav { + height: 100%; + position: fixed; + width: $sidebar_width; + background: rgba(255, 0, 0, .1); + padding-top: 32px; + img { + width: 100%; + } + div { + padding: 0 16px 0 16px; + } + } + main { + height: 100%; + margin-left: $sidebar_width; + background: rgba(0, 255, 0, .1); + padding-top: 50px; + article { + margin: auto; + border: 1px solid blue; + padding: 16px; + max-width: 1000px; + } + } +} diff --git a/templates/base.html b/templates/base.html index 91d6745..741c6d4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,10 +7,16 @@ Mountain Linux Club {% endif %} + - {% block content %} - {% endblock %} + {% include "sidebar.html" %} +
+
+ {% block content %} + {% endblock %} +
+
diff --git a/templates/sidebar.html b/templates/sidebar.html new file mode 100644 index 0000000..ba80c63 --- /dev/null +++ b/templates/sidebar.html @@ -0,0 +1,14 @@ + From 236b0e5eeb149b0d0edbb8a87974d7fed991df45 Mon Sep 17 00:00:00 2001 From: Thom Dickson Date: Sun, 20 Mar 2022 14:29:35 -0400 Subject: [PATCH 3/5] Add planned pages list --- config.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 9e74342..b0935ea 100644 --- a/config.toml +++ b/config.toml @@ -16,5 +16,10 @@ highlight_code = true # Put all your custom variables here toolbar_pages = [ ["About Us", "about"], - ["Contact", "contact"], + ["Chat", "chat"], + ["Get involved", "getinvolved"], + ["Projects", "projects"], + ["Helpful Resources", "resources"], + ["Unhelpful Resources", "unresources"], + ["Members' PGP Keys", "keys"], ] From a92ee83b87d92bf72066fe819dd375f9ac9849b1 Mon Sep 17 00:00:00 2001 From: Thom Dickson Date: Thu, 24 Mar 2022 15:27:03 -0400 Subject: [PATCH 4/5] Add mobile layouts --- sass/main.scss | 12 ++++++++++-- sass/mobile.scss | 11 +++++++++++ templates/404.html | 4 ++++ templates/sidebar.html | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 sass/mobile.scss create mode 100644 templates/404.html diff --git a/sass/main.scss b/sass/main.scss index d4106b4..eb921eb 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -1,4 +1,6 @@ $sidebar_width: 20%; +$sidebar_background: rgba(255, 0, 0, .1); +$body_background: rgba(0, 255, 0, .1); body { margin: 0; @@ -6,8 +8,9 @@ body { height: 100%; position: fixed; width: $sidebar_width; - background: rgba(255, 0, 0, .1); + background: $sidebar_background; padding-top: 32px; + padding-bottom: 16px; img { width: 100%; } @@ -17,8 +20,9 @@ body { } main { height: 100%; + box-sizing: border-box; margin-left: $sidebar_width; - background: rgba(0, 255, 0, .1); + background: $body_background; padding-top: 50px; article { margin: auto; @@ -28,3 +32,7 @@ body { } } } + +@media screen and (max-width: 1000px) { + @import "mobile.scss"; +} diff --git a/sass/mobile.scss b/sass/mobile.scss new file mode 100644 index 0000000..656e9b3 --- /dev/null +++ b/sass/mobile.scss @@ -0,0 +1,11 @@ +body { + nav { + position: unset; + height: auto; + width: 100%; + } + main { + margin-left: 0; + height: auto; + } +} diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..fca4400 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} +{% block content %} +

Insert epic 404 page here

+{% endblock %} diff --git a/templates/sidebar.html b/templates/sidebar.html index ba80c63..c4f6072 100644 --- a/templates/sidebar.html +++ b/templates/sidebar.html @@ -1,6 +1,6 @@