Commit 660b41a4 authored by Subin Siby's avatar Subin Siby 🚴

Fix duplicate event categories

parent 59c7114b
......@@ -8,8 +8,6 @@ new:
image: "img/blog/blog-post-1.jpg"
name: coming soon..
description: >
portfolio:
- category: GNOME
......@@ -26,7 +24,7 @@ portfolio:
description: >
FOSSers Club conducts Hacktoberfest 2018
- category: Linux
- category: LLL
url: "/blog/lllv2/"
image: "img/portfolio/work3.jpg"
name: Let’s Learn Linux-V2
......@@ -38,7 +36,7 @@ portfolio:
name: OpenStreetMap Mapathon
description: >
FOSSers of Vidya celebrates Software Freedom Day
- category: Install Fest
- category: Install-Fest
url: "/blog/install-fest-ubuntu/"
image: "img/portfolio/work6.jpg"
name: Install Fest Ubuntu 18.04
......
......@@ -6,7 +6,7 @@
<div class="row">
<div class="col-md-12">
<div class="block">
<div class="new-menu">
<div class="new-menu">
<h1> Upcoming Events </h1>
<ul>
<li class="filter" data-filter="all">Everything</li>
......@@ -27,7 +27,7 @@
<p>{{ .description }}</p>
</div>
</div>
</a>
</a>
</li>
{{ end }}
</ul>
......@@ -46,12 +46,16 @@
<div class="col-md-12">
<div class="block">
<div class="portfolio-menu">
<h1> Past Events </h1>
<ul>
<li class="filter" data-filter="all">Everything</li>
{{ $categories := slice }}
{{ range .Site.Data.events.portfolio }}
<li class="filter" data-filter=".{{ .category }}">{{ .category }}</li>
{{ $categories = $categories | append .category }}
{{ end }}
<li class="filter" data-filter="all">Everything</li>
{{ range ( $categories | uniq ) }}
<li class="filter" data-filter=".{{ . }}">{{ . }}</li>
{{ end }}
</ul>
</div>
......@@ -67,7 +71,7 @@
<p>{{ .description }}</p>
</div>
</div>
</a>
</a>
</li>
{{ end }}
</ul>
......@@ -100,4 +104,4 @@
{{ if isset .Site.Data.events "call" }}
{{ partial "call-to-action.html" .Site.Data.events.call }}
{{ end}}
\ No newline at end of file
{{ end}}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment