Skip to content

Commit

Permalink
Merge pull request #300 from owaspsamm/codific-gold-sponsor
Browse files Browse the repository at this point in the history
Resolves #299
  • Loading branch information
SebaDele authored Dec 3, 2024
2 parents daf879f + 007d992 commit ca9cb70
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
3 changes: 3 additions & 0 deletions content/en/supporters.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ These are companies and organizations who support and have supported SAMM in a v
For details on how to sponsor SAMM and the benefits of the different levels, see the <b>[Sponsor](/sponsor)</b> page.

---
## Gold

{{< sponsors "Gold" >}}

## Silver

Expand Down
2 changes: 1 addition & 1 deletion data/sponsors/codific.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: "codific"
image180: "/img/sponsors/codific_180.png"
image200: "/img/sponsors/codific_200.png"
url: "https://codific.com/"
tier: "Silver"
tier: "Gold"
31 changes: 11 additions & 20 deletions layouts/partials/sponsors.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ <h2>{{ .Site.Params.sponsors.title }}</h2>
{{ end }}
</p>

{{ $platinum := where .Site.Data.sponsors "tier" "Platinum"}}


{{ $sponsors := slice }}
{{ range site.Data.sponsors }}
{{ $sponsors = $sponsors | append . }}
{{ end }}


{{ $platinum := where $sponsors "tier" "Platinum"}}
{{ if $platinum }}
{{ if gt (len $platinum) 0 }}
<h3 class="text-center">PLATINUM SPONSORS</h3>
Expand All @@ -35,7 +43,7 @@ <h3 class="text-center">PLATINUM SPONSORS</h3>
{{ end }}
{{ end }}

{{ $gold := where .Site.Data.sponsors "tier" "Gold"}}
{{ $gold := where $sponsors "tier" "Gold"}}
{{ if $gold }}
{{ if gt (len $gold) 0 }}
<h3 class="text-center">GOLD SPONSORS</h3>
Expand All @@ -54,8 +62,7 @@ <h3 class="text-center">GOLD SPONSORS</h3>
{{ end }}

<!-- where clause isn't working - fix this later -->
{{ $silver := where .Site.Data.sponsors "tier" "Silver"}}
{{ if $silver }}
{{ $silver := where $sponsors "tier" "Silver"}}
{{ if gt (len $silver) 0 }}
<h3 class="text-center">SILVER SPONSORS</h3>
<div class="flex-container">
Expand All @@ -70,22 +77,6 @@ <h3 class="text-center">SILVER SPONSORS</h3>
{{ end }}
</div>
{{ end }}
{{ else }}
<h3 class="text-center">SILVER SPONSORS</h3>
<div class="flex-container">
{{ range .Site.Data.sponsors }}
{{ if eq .tier "Silver" }}
{{ if .url }}
<a href="{{ .url }}" target="_blank">
<img src="{{ $.Site.BaseURL}}{{ .image180 }}" alt="{{ .name }}" class="img-responsive" />
</a>
{{ else }}
<img src="{{ $.Site.BaseURL}}{{ .image180 }}" alt="{{ .name }}" class="img-responsive" />
{{ end }}
{{ end }}
{{ end }}
</div>
{{ end }}


<p class="text-center">
Expand Down

0 comments on commit ca9cb70

Please sign in to comment.