From 281e0b86b32ab377f9bc66da92dfc54dc7b1fd07 Mon Sep 17 00:00:00 2001 From: Oliver Kinch Date: Thu, 18 Jul 2024 22:06:00 +0200 Subject: [PATCH] Take projects back --- _pages/projects.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 _pages/projects.md diff --git a/_pages/projects.md b/_pages/projects.md new file mode 100644 index 0000000..81db856 --- /dev/null +++ b/_pages/projects.md @@ -0,0 +1,65 @@ +--- +layout: page +title: projects +permalink: /projects/ +description: A growing collection of your cool projects. +nav: true +nav_order: 3 +display_categories: [work, fun] +horizontal: false +--- + + +
+{% if site.enable_project_categories and page.display_categories %} + + {% for category in page.display_categories %} + +

{{ category }}

+
+ {% assign categorized_projects = site.projects | where: "category", category %} + {% assign sorted_projects = categorized_projects | sort: "importance" %} + + {% if page.horizontal %} +
+
+ {% for project in sorted_projects %} + {% include projects_horizontal.liquid %} + {% endfor %} +
+
+ {% else %} +
+ {% for project in sorted_projects %} + {% include projects.liquid %} + {% endfor %} +
+ {% endif %} + {% endfor %} + +{% else %} + + + +{% assign sorted_projects = site.projects | sort: "importance" %} + + + +{% if page.horizontal %} + +
+
+ {% for project in sorted_projects %} + {% include projects_horizontal.liquid %} + {% endfor %} +
+
+ {% else %} +
+ {% for project in sorted_projects %} + {% include projects.liquid %} + {% endfor %} +
+ {% endif %} +{% endif %} +
\ No newline at end of file