personal-website/_pages/projects.md

53 lines
1.4 KiB
Markdown

---
layout: page
title: projects
permalink: /projects/
description: University and personal projects.
nav: true
display_categories: [university, personal]
horizontal: true
---
<div class="projects">
{%- if site.enable_project_categories and page.display_categories %}
{%- for category in page.display_categories %}
<h2 class="category">{{ category }}</h2>
{%- assign categorized_projects = site.projects | where: "category", category -%}
{%- assign sorted_projects = categorized_projects | sort: "importance" %}
{% if page.horizontal -%}
<div class="container">
<div class="row row-cols-1 row-cols-xs-1 row-cols-sm-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-3">
{%- for project in sorted_projects -%}
{% include projects_horizontal.html %}
{%- endfor %}
</div>
</div>
{%- else -%}
<div class="grid">
{%- for project in sorted_projects -%}
{% include projects.html %}
{%- endfor %}
</div>
{%- endif -%}
{% endfor %}
{%- else -%}
{%- assign sorted_projects = site.projects | sort: "importance" -%}
{% if page.horizontal -%}
<div class="container">
<div class="row row-cols-2">
{%- for project in sorted_projects -%}
{% include projects_horizontal.html %}
{%- endfor %}
</div>
</div>
{%- else -%}
<div class="grid">
{%- for project in sorted_projects -%}
{% include projects.html %}
{%- endfor %}
</div>
{%- endif -%}
{%- endif -%}
</div>