diff --git a/content/blog/_index.md b/content/blog/_index.md index 3f84557..185c44e 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -3,4 +3,5 @@ title = "Blogs" sort_by = "date" template = "blog.html" page_template = "blog-page.html" +in_search_index = true +++ \ No newline at end of file diff --git a/content/blog/first.md b/content/blog/first.md index 223047f..d9a6584 100644 --- a/content/blog/first.md +++ b/content/blog/first.md @@ -1,10 +1,21 @@ +++ title = "My first post" -description = "moving from an abandond react website which hasn't been updated in over 4 years to Zola" +description = "Moving from an abandond react website which hasn't been updated in over 4 years to Zola" date = 2026-01-16 +updated = 2026-01-20 [taxonomies] tags = ["web", "zola"] +++ + +I finally had the motivation (and time) to update the site. + + + +## Style + +I borrowed *heavily* from the style and theming used in [without.boats](https://without.boats/) + +I also took insparation from [mcyoung.xyc](https://mcyoung.xyz) \ No newline at end of file diff --git a/static/images/charcoal/apple.jpg b/content/crafts/charcoal/apple.jpg similarity index 98% rename from static/images/charcoal/apple.jpg rename to content/crafts/charcoal/apple.jpg index 6bc671e..857aa96 100644 Binary files a/static/images/charcoal/apple.jpg and b/content/crafts/charcoal/apple.jpg differ diff --git a/static/images/charcoal/garlic.jpg b/content/crafts/charcoal/garlic.jpg similarity index 99% rename from static/images/charcoal/garlic.jpg rename to content/crafts/charcoal/garlic.jpg index 31ea536..0cf878e 100644 Binary files a/static/images/charcoal/garlic.jpg and b/content/crafts/charcoal/garlic.jpg differ diff --git a/content/crafts/charcoal.md b/content/crafts/charcoal/index.md similarity index 63% rename from content/crafts/charcoal.md rename to content/crafts/charcoal/index.md index 03652eb..73d03e2 100644 --- a/content/crafts/charcoal.md +++ b/content/crafts/charcoal/index.md @@ -9,12 +9,12 @@ tags = ["charcoal", "crafty"] So, for no apparent reason, I one day decided it would be interesting to start seeing what different organic objects would look like charcoalized. Here is a collection of ones which turned out interesting. -{{image(src="images/charcoal/onion.jpg", caption="A charcoalized onion with the layers clearly defined")}} -{{image(src="images/charcoal/apple.jpg", caption="Charcoalized apple showing a clear silhouette and shape of an apple but with blistered and flaking skin")}} +{{image(src="/crafts/charcoal/onion.jpg", caption="A charcoalized onion with the layers clearly defined")}} +{{image(src="/crafts/charcoal/apple.jpg", caption="Charcoalized apple showing a clear silhouette and shape of an apple but with blistered and flaking skin")}} I think the garlic was my favourite of all. Though the structure did not hold up well at all, the cloves inside developed this iridescent colour akin to an oil spill or oxidation on metals -{{image(src="images/charcoal/garlic.jpg", caption="a lump of black material loosely resembling garlic with brilliant sections of blue, purple, and gold")}} +{{image(src="/crafts/charcoal/garlic.jpg", caption="a lump of black material loosely resembling garlic with brilliant sections of blue, purple, and gold")}} bucket list of items I want to charcoalize diff --git a/static/images/charcoal/onion.jpg b/content/crafts/charcoal/onion.jpg similarity index 98% rename from static/images/charcoal/onion.jpg rename to content/crafts/charcoal/onion.jpg index 29a049a..ffea8d9 100644 Binary files a/static/images/charcoal/onion.jpg and b/content/crafts/charcoal/onion.jpg differ diff --git a/static/images/qtip/cube.jpg b/content/crafts/qtip-cube/cube.jpg similarity index 100% rename from static/images/qtip/cube.jpg rename to content/crafts/qtip-cube/cube.jpg diff --git a/content/crafts/qtip-cube.md b/content/crafts/qtip-cube/index.md similarity index 78% rename from content/crafts/qtip-cube.md rename to content/crafts/qtip-cube/index.md index add9b50..80de0be 100644 --- a/content/crafts/qtip-cube.md +++ b/content/crafts/qtip-cube/index.md @@ -9,13 +9,13 @@ tags = ["6-sided", "crafty"] As promised here is the cube. -{{image(src="images/qtip/cube.jpg", caption="A near cube made entirely out of QTips that is 10x10x11 (-2) in size. No glue added")}} +{{image(src="crafts/qtip-cube/cube.jpg", caption="A near cube made entirely out of QTips that is 10x10x11 (-2) in size. No glue added")}} You might wonder how to construct such an object yourself. What ended up working for me was laying out a bottom row of QTips with a width just slightly longer than the length of the QTips' shaft. -{{image(src="images/qtip/step.jpg", caption="A bottom layer of QTips showing the width compared to the shaft length of a QTip")}} +{{image(src="crafts/qtip-cube/step.jpg", caption="A bottom layer of QTips showing the width compared to the shaft length of a QTip")}} Continue alternating the direction in which you align the QTips until you have stacked enough layers to be slightly higher than the length of the QTips' shaft. diff --git a/static/images/qtip/step.jpg b/content/crafts/qtip-cube/step.jpg similarity index 100% rename from static/images/qtip/step.jpg rename to content/crafts/qtip-cube/step.jpg diff --git a/content/crafts/spoon.md b/content/crafts/spoon.md deleted file mode 100644 index 4092a9a..0000000 --- a/content/crafts/spoon.md +++ /dev/null @@ -1,22 +0,0 @@ -+++ -title = "Spoon" -description = "I went from a tree all the way to a spoon in a few weeks" -date = 2026-01-16 - -[taxonomies] -tags = ["wooden", "crafty"] -+++ - - - -Unfortunately I do not have a picture of the tree nor a picture of the un stripped log. - - -{{image(src="images/spoon/log.jpg", caption="A stripped and dried log with a huge split down the middle from drying too fast")}} - - -{{image(src="images/spoon/split.jpg", caption="A extremely rough cutting of the spon.")}} -{{image(src="images/spoon/roughin.jpg", caption="")}} -{{image(src="images/spoon/refined.jpg", caption="")}} -{{image(src="images/spoon/shape_finished.jpg", caption="")}} -{{image(src="images/spoon/charred.jpg", caption="")}} \ No newline at end of file diff --git a/static/images/spoon/charred.jpg b/content/crafts/spoon/charred.jpg similarity index 100% rename from static/images/spoon/charred.jpg rename to content/crafts/spoon/charred.jpg diff --git a/content/crafts/spoon/index.md b/content/crafts/spoon/index.md new file mode 100644 index 0000000..f11b35f --- /dev/null +++ b/content/crafts/spoon/index.md @@ -0,0 +1,22 @@ ++++ +title = "Spoon" +description = "I went from a tree all the way to a spoon in a few weeks" +date = 2026-01-16 + +[taxonomies] +tags = ["wooden", "crafty"] ++++ + + + +Unfortunately I do not have a picture of the tree nor a picture of the un stripped log. + + +{{image(src="crafts/spoon/log.jpg", caption="A stripped and dried log with a huge split down the middle from drying too fast")}} + + +{{image(src="crafts/spoon/split.jpg", caption="A extremely rough cutting of the spon.")}} +{{image(src="crafts/spoon/roughin.jpg", caption="")}} +{{image(src="crafts/spoon/refined.jpg", caption="")}} +{{image(src="crafts/spoon/shape_finished.jpg", caption="")}} +{{image(src="crafts/spoon/charred.jpg", caption="")}} \ No newline at end of file diff --git a/static/images/spoon/log.jpg b/content/crafts/spoon/log.jpg similarity index 100% rename from static/images/spoon/log.jpg rename to content/crafts/spoon/log.jpg diff --git a/static/images/spoon/refined.jpg b/content/crafts/spoon/refined.jpg similarity index 100% rename from static/images/spoon/refined.jpg rename to content/crafts/spoon/refined.jpg diff --git a/static/images/spoon/roughin.jpg b/content/crafts/spoon/roughin.jpg similarity index 100% rename from static/images/spoon/roughin.jpg rename to content/crafts/spoon/roughin.jpg diff --git a/static/images/spoon/shape_finished.jpg b/content/crafts/spoon/shape_finished.jpg similarity index 100% rename from static/images/spoon/shape_finished.jpg rename to content/crafts/spoon/shape_finished.jpg diff --git a/static/images/spoon/split.jpg b/content/crafts/spoon/split.jpg similarity index 100% rename from static/images/spoon/split.jpg rename to content/crafts/spoon/split.jpg diff --git a/static/images/photos/711.jpg b/content/pictures/711.jpg similarity index 100% rename from static/images/photos/711.jpg rename to content/pictures/711.jpg diff --git a/content/pictures/711.md b/content/pictures/711.md new file mode 100644 index 0000000..7dff608 --- /dev/null +++ b/content/pictures/711.md @@ -0,0 +1,11 @@ ++++ +title = "711" +description = "The back of 7-11 lit up from behind the camera by a high-pressure sodium vapour lamp. To the left, a faded sign says **CARBON DIOXIDE filling station** with two metal barrels below. In the center of the frame, white graffiti saying 'Haiii :3' is seen alongside an area which has been cleaned, presumably of previous graffiti. " +date = 2023-08-08 + +[taxonomies] +tags = ["photo", "sodium vapour", "industrial"] + +[extra] +picture_src = "/pictures/711.jpg" ++++ \ No newline at end of file diff --git a/content/pictures/_index.md b/content/pictures/_index.md index 7d2daae..d5d507e 100644 --- a/content/pictures/_index.md +++ b/content/pictures/_index.md @@ -1,6 +1,6 @@ +++ title = "Pictures" sort_by = "date" -template = "blog.html" -page_template = "blog-page.html" +template = "gallery.html" +page_template = "picture.html" +++ \ No newline at end of file diff --git a/content/pictures/britannia.jpg b/content/pictures/britannia.jpg new file mode 100644 index 0000000..5edf799 Binary files /dev/null and b/content/pictures/britannia.jpg differ diff --git a/content/pictures/britannia.md b/content/pictures/britannia.md new file mode 100644 index 0000000..b0edf8e --- /dev/null +++ b/content/pictures/britannia.md @@ -0,0 +1,14 @@ ++++ +title = "Britannia" +description = """Old and decaying industrial sprawl built atop a rocky mountainside. +Stalactites growing from overhangs, taking on bright blue and white colours. +Bright green moss growing on rock faces and eroding concrete. + Inside the Britannia Mines Concentrator.""" +date = 2024-06-14 + +[taxonomies] +tags = ["photo", "industrial", "nature"] + +[extra] +picture_src = "/pictures/britannia.jpg" ++++ \ No newline at end of file diff --git a/static/images/photos/chatterbox.JPG b/content/pictures/chatterbox.jpg similarity index 100% rename from static/images/photos/chatterbox.JPG rename to content/pictures/chatterbox.jpg diff --git a/content/pictures/chatterbox.md b/content/pictures/chatterbox.md new file mode 100644 index 0000000..ac292ac --- /dev/null +++ b/content/pictures/chatterbox.md @@ -0,0 +1,11 @@ ++++ +title = "Chatterbox" +description = "A close-up of my childhood cat Chatterbox Pumpkin TenBroeck, an orange tabby with a white nose, chin, and paws, who, despite the name, never really meowed. Lying in my bed, looking directly into the camera." +date = 2015-10-08 + +[taxonomies] +tags = ["photo", "cat"] + +[extra] +picture_src = "/pictures/chatterbox.jpg" ++++ \ No newline at end of file diff --git a/content/pictures/globe_thistle.jpg b/content/pictures/globe_thistle.jpg new file mode 100644 index 0000000..616a650 Binary files /dev/null and b/content/pictures/globe_thistle.jpg differ diff --git a/content/pictures/globe_thistle.md b/content/pictures/globe_thistle.md new file mode 100644 index 0000000..0f025d5 --- /dev/null +++ b/content/pictures/globe_thistle.md @@ -0,0 +1,11 @@ ++++ +title = "Globe Thistle" +description = "A close-up of a purple globe thistle flower with the background blurred." +date = 2017-06-26 + +[taxonomies] +tags = ["photo", "nature"] + +[extra] +picture_src = "/pictures/globe_thistle.jpg" ++++ \ No newline at end of file diff --git a/content/pictures/hs_water_1.jpg b/content/pictures/hs_water_1.jpg new file mode 100644 index 0000000..ab6bc14 Binary files /dev/null and b/content/pictures/hs_water_1.jpg differ diff --git a/content/pictures/hs_water_1.md b/content/pictures/hs_water_1.md new file mode 100644 index 0000000..0b481c5 --- /dev/null +++ b/content/pictures/hs_water_1.md @@ -0,0 +1,11 @@ ++++ +title = "High Speed Water 1" +description = "Water spraying from the side of a broken bathroom faucet. Two streams of larger droplets flow to the left." +date = 2017-04-05 + +[taxonomies] +tags = ["photo", "high speed", "water"] + +[extra] +picture_src = "/pictures/hs_water_1.jpg" ++++ \ No newline at end of file diff --git a/content/pictures/hs_water_2.jpg b/content/pictures/hs_water_2.jpg new file mode 100644 index 0000000..b9ec3bc Binary files /dev/null and b/content/pictures/hs_water_2.jpg differ diff --git a/content/pictures/hs_water_2.md b/content/pictures/hs_water_2.md new file mode 100644 index 0000000..78fdd2e --- /dev/null +++ b/content/pictures/hs_water_2.md @@ -0,0 +1,11 @@ ++++ +title = "High Speed Water 2" +description = "Water spraying from the side of a broken bathroom faucet. Small droplets spraying in many directions." +date = 2017-04-05 + +[taxonomies] +tags = ["photo", "high speed", "water"] + +[extra] +picture_src = "/pictures/hs_water_2.jpg" ++++ \ No newline at end of file diff --git a/content/pictures/hs_water_3.jpg b/content/pictures/hs_water_3.jpg new file mode 100644 index 0000000..bd7085b Binary files /dev/null and b/content/pictures/hs_water_3.jpg differ diff --git a/content/pictures/hs_water_3.md b/content/pictures/hs_water_3.md new file mode 100644 index 0000000..5ffc773 --- /dev/null +++ b/content/pictures/hs_water_3.md @@ -0,0 +1,11 @@ ++++ +title = "High Speed Water 3" +description = "Water spraying out of a kitchen faucet captured at a high shutter speed. Two sheet-like streams, one flat and thin, and the other uneven and wavy, caught in the center of the frame. A purpleish light is seen on the right edge of the center stream reflecting into the camera." +date = 2017-04-06 + +[taxonomies] +tags = ["photo", "high speed", "water"] + +[extra] +picture_src = "/pictures/hs_water_3.jpg" ++++ \ No newline at end of file diff --git a/content/pictures/nairn_falls.jpg b/content/pictures/nairn_falls.jpg new file mode 100644 index 0000000..0cd2680 Binary files /dev/null and b/content/pictures/nairn_falls.jpg differ diff --git a/content/pictures/nairn_falls.md b/content/pictures/nairn_falls.md new file mode 100644 index 0000000..3acc23b --- /dev/null +++ b/content/pictures/nairn_falls.md @@ -0,0 +1,11 @@ ++++ +title = "Nairn Falls" +description = "A rocky formation with many holes and crevices with rapid flowing water running through a series of channels both above and underground, formed by rapid erosion." +date = 2024-06-16 + +[taxonomies] +tags = ["photo", "nature", "water"] + +[extra] +picture_src = "/pictures/nairn_falls.jpg" ++++ \ No newline at end of file diff --git a/static/images/photos/reflection.jpg b/content/pictures/reflection.jpg similarity index 100% rename from static/images/photos/reflection.jpg rename to content/pictures/reflection.jpg diff --git a/content/pictures/reflection.md b/content/pictures/reflection.md new file mode 100644 index 0000000..936cb62 --- /dev/null +++ b/content/pictures/reflection.md @@ -0,0 +1,11 @@ ++++ +title = "Reflection" +description = "The reflection of a local playground through a puddle under the swingset after heavy rainfall." +date = 2023-07-29 + +[taxonomies] +tags = ["photo", "nature", "water"] + +[extra] +picture_src = "/pictures/reflection.jpg" ++++ \ No newline at end of file diff --git a/content/pictures/seals.jpg b/content/pictures/seals.jpg new file mode 100644 index 0000000..2cd37b7 Binary files /dev/null and b/content/pictures/seals.jpg differ diff --git a/content/pictures/seals.md b/content/pictures/seals.md new file mode 100644 index 0000000..0bdbab2 --- /dev/null +++ b/content/pictures/seals.md @@ -0,0 +1,11 @@ ++++ +title = "Seals" +description = "A red and white buoy with over 10 seals and/or sealions all lying atop it." +date = 2024-01-02 + +[taxonomies] +tags = ["photo", "water", "nature"] + +[extra] +picture_src = "/pictures/seals.jpg" ++++ \ No newline at end of file diff --git a/static/images/photos/theodore.jpg b/content/pictures/theodore.jpg similarity index 100% rename from static/images/photos/theodore.jpg rename to content/pictures/theodore.jpg diff --git a/content/pictures/theodore.md b/content/pictures/theodore.md new file mode 100644 index 0000000..5a809cc --- /dev/null +++ b/content/pictures/theodore.md @@ -0,0 +1,11 @@ ++++ +title = "Theodore" +description = "A picture of Theodore the tug boat docked at Port Dalhousie" +date = 2023-08-31 + +[taxonomies] +tags = ["photo"] + +[extra] +picture_src = "/pictures/theodore.jpg" ++++ \ No newline at end of file diff --git a/static/images/photos/zack.JPG b/content/pictures/zack.jpg similarity index 100% rename from static/images/photos/zack.JPG rename to content/pictures/zack.jpg diff --git a/content/pictures/zack.md b/content/pictures/zack.md new file mode 100644 index 0000000..0a0a924 --- /dev/null +++ b/content/pictures/zack.md @@ -0,0 +1,11 @@ ++++ +title = "Zack" +description = "A close-up of my most beloved childhood cat Zack, an orange tabby with a white chin. Sitting on my desk looking directly into the camera with my computer lit up behind him glowing purple, red, and blue." +date = 2015-10-08 + +[taxonomies] +tags = ["photo", "cat"] + +[extra] +picture_src = "/pictures/zack.jpg" ++++ \ No newline at end of file diff --git a/content/projects/kernel.md b/content/projects/kernel/index.md similarity index 82% rename from content/projects/kernel.md rename to content/projects/kernel/index.md index 798e11a..1622464 100644 --- a/content/projects/kernel.md +++ b/content/projects/kernel/index.md @@ -9,4 +9,4 @@ tags = ["rust", "embedded", "risc-v"] https://github.com/ParkerTenBroeck/milkv-duos-rs -{{ video(src="/videos/kernel/os_demo.mp4", controls=true, caption="meow")}} \ No newline at end of file +{{ video(src="/projects/kernel/os_demo.mp4", controls=true, caption="meow")}} \ No newline at end of file diff --git a/static/videos/kernel/os_demo.mp4 b/content/projects/kernel/os_demo.mp4 similarity index 100% rename from static/videos/kernel/os_demo.mp4 rename to content/projects/kernel/os_demo.mp4 diff --git a/static/videos/rasterizer/bricks.mp4 b/content/projects/rasterizer/bricks.mp4 similarity index 100% rename from static/videos/rasterizer/bricks.mp4 rename to content/projects/rasterizer/bricks.mp4 diff --git a/static/videos/rasterizer/halo.mp4 b/content/projects/rasterizer/halo.mp4 similarity index 100% rename from static/videos/rasterizer/halo.mp4 rename to content/projects/rasterizer/halo.mp4 diff --git a/content/projects/software-renderer.md b/content/projects/rasterizer/index.md similarity index 62% rename from content/projects/software-renderer.md rename to content/projects/rasterizer/index.md index 18703e0..d05f970 100644 --- a/content/projects/software-renderer.md +++ b/content/projects/rasterizer/index.md @@ -11,6 +11,6 @@ tags = ["C++", "graphics"] [GitHub](https://github.com/ParkerTenBroeck/3P93) -{{ video(src="/videos/rasterizer/halo.mp4", controls=true, autoplay=true, loop=true, caption="meow")}} -{{ video(src="/videos/rasterizer/bricks.mp4", controls=true, autoplay=true, loop=true, caption="meow")}} -{{ video(src="/videos/rasterizer/wavy.mp4", controls=true, autoplay=true, loop=true, caption="meow")}} \ No newline at end of file +{{ video(src="projects/rasterizer/halo.mp4", controls=true, autoplay=true, loop=true, caption="meow")}} +{{ video(src="projects/rasterizer/bricks.mp4", controls=true, autoplay=true, loop=true, caption="meow")}} +{{ video(src="projects/rasterizer/wavy.mp4", controls=true, autoplay=true, loop=true, caption="meow")}} \ No newline at end of file diff --git a/static/videos/rasterizer/wavy.mp4 b/content/projects/rasterizer/wavy.mp4 similarity index 100% rename from static/videos/rasterizer/wavy.mp4 rename to content/projects/rasterizer/wavy.mp4 diff --git a/remove_metadata.sh b/remove_metadata.sh index 2aa449f..68fba00 100755 --- a/remove_metadata.sh +++ b/remove_metadata.sh @@ -1 +1 @@ -exiftool -all= -tagsfromfile @ -Orientation -overwrite_original -r ./static/images ./static/videos \ No newline at end of file +exiftool -q -all= -tagsfromfile @ -Orientation -overwrite_original -r ./static/ ./content/ \ No newline at end of file diff --git a/sass/blog.scss b/sass/blog.scss index 3a538cd..e00409c 100644 --- a/sass/blog.scss +++ b/sass/blog.scss @@ -1,8 +1,6 @@ -.blog-page { - .title { - h1 { - font-size: 2.2em; - } - padding-bottom: 2em; +.title { + h1 { + font-size: 2.2em; } + padding-bottom: 2em; } \ No newline at end of file diff --git a/sass/gallery.scss b/sass/gallery.scss new file mode 100644 index 0000000..593f534 --- /dev/null +++ b/sass/gallery.scss @@ -0,0 +1,17 @@ + + +.gallery { + gap: 0.5rem; + display: grid; + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); + + a { + flex: 1 1 10em; + img{ + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } + } +} \ No newline at end of file diff --git a/sass/style.scss b/sass/style.scss index 33f7725..c901e27 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -4,6 +4,7 @@ @use "blog.scss"; @use "fonts.scss"; @use "lightbox.scss"; +@use "gallery.scss"; .z-code{ overflow-x: auto; @@ -43,6 +44,11 @@ a { &:hover { text-decoration-color: var(--primary); } + + &:has(img), + &:has(video) { + text-decoration: none; + } } h1, @@ -105,14 +111,14 @@ figure { text-align: center; } -figure * { +figure > * { max-width: 100%; height: auto; border-radius: 6px; } @media screen and (min-width: 700px) { - figure * { + figure > * { max-width: 80%; height: auto; border-radius: 6px; diff --git a/static/.gitignore b/static/.gitignore new file mode 100644 index 0000000..83b9847 --- /dev/null +++ b/static/.gitignore @@ -0,0 +1 @@ +processed_images \ No newline at end of file diff --git a/static/resume.pdf b/static/resume.pdf index 84b7a38..0ea6faa 100644 Binary files a/static/resume.pdf and b/static/resume.pdf differ diff --git a/templates/blog-page.html b/templates/blog-page.html index d9f708c..6b9c58b 100644 --- a/templates/blog-page.html +++ b/templates/blog-page.html @@ -1,16 +1,11 @@ {% extends "base.html" %} +{% import "macros/post.html" as post %} + {% block main %}
-
-

{{ page.title }}

-

- {% if page.taxonomies %}{% if page.taxonomies.tags %} - {% for tag in page.taxonomies.tags %} • #{{tag}} {% endfor %} - {% endif %}{% endif %} -

-
+ {{ post::page_title(page=page) }} {{ page.content | safe }}
diff --git a/templates/blog.html b/templates/blog.html index 34ff1bf..d73adec 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -1,13 +1,13 @@ {% extends "base.html" %} -{% import "macros/post.html" as posts %} +{% import "macros/post.html" as post %} {% block main %}
{% for page in section.pages %} - {{ posts::excerpt(page=page) }} + {{ post::excerpt(page=page) }} {% endfor %}
diff --git a/templates/gallery.html b/templates/gallery.html new file mode 100644 index 0000000..20a9d32 --- /dev/null +++ b/templates/gallery.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + + +{% block main %} + +

+ + +{% endblock main %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index d8d494f..b2a3acb 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% import "macros/post.html" as posts %} +{% import "macros/post.html" as post %} {% block main %}

@@ -20,17 +20,15 @@
- -

Heres a list of stuff I'd like you to checkout:

{% endblock main %} \ No newline at end of file diff --git a/templates/macros/figures.html b/templates/macros/figures.html new file mode 100644 index 0000000..a07d9ef --- /dev/null +++ b/templates/macros/figures.html @@ -0,0 +1,31 @@ +{% macro image(src, caption, class="") %} +
+ {{caption | default(value='')}} + {% if caption != "" %} +
{{ caption | markdown() | safe }}
+ {% endif %} +
+{% endmacro %} + + + +{% macro video(src, caption, loop=false, controls=true, autoplay=false, poster="", class="") %} +
+ + {% if caption != "" %} +
{{ caption | markdown() | safe }}
+ {% endif %} +
+ +{% endmacro %} \ No newline at end of file diff --git a/templates/macros/image.html b/templates/macros/image.html deleted file mode 100644 index ccef6d2..0000000 --- a/templates/macros/image.html +++ /dev/null @@ -1,8 +0,0 @@ -{% macro figure(src, caption="", class="") %} -
- - {% if caption != "" %} -
{{ caption }}
- {% endif %} -
-{% endmacro %} \ No newline at end of file diff --git a/templates/macros/post.html b/templates/macros/post.html index 8463c85..9907c3f 100644 --- a/templates/macros/post.html +++ b/templates/macros/post.html @@ -1,29 +1,36 @@ -{%- macro excerpt(page) -%} +{% macro tags(page) %} + {% if page.taxonomies %}{% if page.taxonomies.tags %} + {% for tag in page.taxonomies.tags %} + {% set url = get_taxonomy_url(kind="tags", name=tag, lang=page.lang) %} + • #{{tag}} + {% endfor %} + {% endif %}{% endif %} +{% endmacro %} + + +{% macro excerpt(page) %}

{{ page.title }}

-

- {% if page.taxonomies %}{% if page.taxonomies.tags %} - - {% for tag in page.taxonomies.tags %} - {% set url = get_taxonomy_url(kind="tags", name=tag, lang=page.lang) %} - • #{{tag}} - {% endfor %} - {% endif %}{% endif %} -

+

{{self::tags(page=page)}}

{{page.description | markdown | safe}}
Read more ->
-{%- endmacro -%} +{% endmacro %} {% macro page_link(path) %} {% set p = get_page(path=path) %} {{ p.title }} {% if p.date %} - + {% endif %} +{% endmacro %} + +{% macro page_title(page) %} +
+

{{ page.title }}

+

{{self::tags(page=page)}}

+
{% endmacro %} \ No newline at end of file diff --git a/templates/picture.html b/templates/picture.html new file mode 100644 index 0000000..ac4b94c --- /dev/null +++ b/templates/picture.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% import "macros/post.html" as post %} +{% import "macros/figures.html" as figures %} + +{% block main %} +{{ post::page_title(page=page) }} +{{ figures::image(src=page.extra.picture_src, caption=page.description) }} +{% endblock main %} \ No newline at end of file diff --git a/templates/shortcodes/image.html b/templates/shortcodes/image.html index 770b2c2..21b9db8 100644 --- a/templates/shortcodes/image.html +++ b/templates/shortcodes/image.html @@ -1,6 +1,2 @@ -
- - {% if caption != "" %} -
{{ caption }}
- {% endif %} -
\ No newline at end of file +{% import "macros/figures.html" as figures %} +{{ figures::image(src=src, caption=caption) }} \ No newline at end of file diff --git a/templates/shortcodes/video.html b/templates/shortcodes/video.html index bf09071..143207e 100644 --- a/templates/shortcodes/video.html +++ b/templates/shortcodes/video.html @@ -1,17 +1,9 @@ -
- - {% if caption != "" %} -
{{ caption }}
- {% endif %} -
- +{% import "macros/figures.html" as figures %} +{{ figures::video( + src=src, + caption=caption, + loop=loop | default(value=false), + controls=controls | default(value=true), + autoplay=autoplay | default(value=false), + poster=poster | default(value="")) +}} \ No newline at end of file diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html index b589d19..c0551dd 100644 --- a/templates/taxonomy_single.html +++ b/templates/taxonomy_single.html @@ -1,6 +1,7 @@ {% extends "base.html" %} -{% import "macros/taxonomy.html" as macros %} -{% import "macros/post.html" as posts %} + +{% import "macros/post.html" as post %} +{% import "macros/taxonomy.html" as taxonomy %} {% import "macros/feed.html" as feed_macros %} {%- block title -%} @@ -27,10 +28,10 @@ {%- block main -%} -

{{ macros::prettify(term=term.name) }}

+

{{ taxonomy::prettify(term=term.name) }}

{%- for page in paginator.pages | default(value=term.pages) %} - {{ posts::excerpt(page=page) }} + {{ post::excerpt(page=page) }} {%- endfor %}