mirror of https://github.com/lxndrblz/anatole.git

Lorenzo Balzani
06.56.2024 a0beb99691b4bfa97f8d7ea67efd9f233e5be369
feat: add descriptions to portfolio categories (#494)

2 files modified
6 ■■■■■ changed files
exampleSite/data/portfolio.yml 2 ●●●●● patch | view | raw | blame | history
layouts/portfolio/list.html 4 ●●●● patch | view | raw | blame | history
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'
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 }}