From a0beb99691b4bfa97f8d7ea67efd9f233e5be369 Mon Sep 17 00:00:00 2001
From: Lorenzo Balzani <balzanilo@gmail.com>
Date: Sat, 06 Apr 2024 04:56:44 +0000
Subject: [PATCH] feat: add descriptions to portfolio categories (#494)

---
 exampleSite/data/portfolio.yml |    2 ++
 layouts/portfolio/list.html    |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/exampleSite/data/portfolio.yml b/exampleSite/data/portfolio.yml
index 639708b..f1b54ce 100644
--- a/exampleSite/data/portfolio.yml
+++ b/exampleSite/data/portfolio.yml
@@ -1,6 +1,7 @@
 portfolioitems:
   # portfolio category
   - title: Coding Projects
+    description: 'All my coding projects'
     portfolioitem:
       - name: Project 1
         image: '/images/portfolio/code.jpg'
@@ -33,6 +34,7 @@
           - Tag 2
   # portfolio category
   - title: Research
+    description: 'All my research projects'
     portfolioitem:
       - name: Project 1
         image: '/images/portfolio/code.jpg'
diff --git a/layouts/portfolio/list.html b/layouts/portfolio/list.html
index f6e41e6..55ec4ea 100644
--- a/layouts/portfolio/list.html
+++ b/layouts/portfolio/list.html
@@ -8,7 +8,11 @@
       {{ end }}"
     >
       {{ $anchorTitle := delimit (split .title " ") "" }}
+     
       <h2 class="portfolio__title" id="{{ $anchorTitle | lower }}">{{ title .title }}</h2>
+      {{ if .description }}
+      <h4>{{ .description }}</h4>
+      {{ end }}
       {{ range $i, $p := .portfolioitem }}
         <div class="portfolio">
           {{ if .image }}

--
Gitblit v1.10.0