Skip to content

Commit

Permalink
fix directory
Browse files Browse the repository at this point in the history
  • Loading branch information
drmowinckels committed Jul 15, 2023
1 parent 19eab76 commit 94515ee
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions themes/hugo-rladies/layouts/directory/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
{{ end }}
</select>
</div>

</div>

<div class="container expand-grid" id="directory-cards">
Expand Down
17 changes: 7 additions & 10 deletions themes/hugo-rladies/layouts/partials/funcs/card-expand.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
{{ $footcol := .footcol | default 1 }}
{{ $anim := .anim | default true }}

{{ $dir := newScratch }}
{{ $dir.Set "tags" slice }}
{{ $tags := slice }}
{{ range $index, $item := . }}
{{ $replaced := replaceRE "[[:punct:]]" "," ($item | urlize) }}
{{ $split := split $replaced "," }}
{{ $tags = $tags | append $split }}
{{ end }}

{{ with .shuffle }}
{{range $index, $tags := . }}
{{ $t := $tags | urlize | printf "\"%s\"" }}
{{ $dir.Add "tags" $t }}
{{ end }}
{{ end}}

<li class="shuffle-item card-expand rounded card-{{ $size }} card" {{ with .id }} id="{{ . | htmlUnescape | urlize }}" {{ end }} data-groups="[{{delimit ($dir.Get "tags") "," }}]">
<li class="shuffle-item card-expand rounded card-{{ $size }} card" {{ with .id }} id="{{ . | htmlUnescape | urlize }}" {{ end }} {{ with .shuffle }} data-groups="[{{range $index, $tags := . }}{{if ne $index 0}},{{end}}&quot;{{$tags | urlize}}&quot;{{ end }}]" {{ end}} >
<div class="card-expand-img rounded-top">
<img src="{{ $image }}"/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{{ $dir.Set "subtitle" (printf "<p class=\"text-hide directory-id\">%s</p>" .name) }}
{{ with .data.work.title }}
{{ $dir.Add "subtitle" . }}
{{ $dir.Add "shuffle" . }}
{{ end }}

{{ $grav := md5 ( .data.name | printf "%s-%s" .name ) }}
Expand Down
7 changes: 4 additions & 3 deletions themes/hugo-rladies/layouts/partials/home/counters.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ $stats := .Site.Data.chapter_stats }}
{{ $countries := where ($.Scratch.Get "chpt_countries") "n" "gt" 1 }}
{{ $chapters := where .Site.Data.chapters_meetup "status" "active" }}
{{ $events := where .Site.Data.meetup.events "type" "PAST" }}

<!-- Start Counter Section -->
Expand All @@ -9,7 +10,7 @@ <h2 class="section-title"><span>Our activity</span></h2>
<div class="icon-box">
<h3>{{ i18n "counter_countries" | markdownify }}</h3>
<i class="fa-solid fa-globe"></i>
<p class="count" data-count="{{ $stats.countries }}">0</p>
<p class="count" data-count="{{ $countries | len}}">0</p>
</div>
</div>
</div>
Expand All @@ -19,7 +20,7 @@ <h3>{{ i18n "counter_countries" | markdownify }}</h3>
<div class="icon-box">
<h3>{{ i18n "counter_chapters" | markdownify }}</h3>
<i class="fa-solid fa-map-location-dot"></i>
<p class="count" data-count="{{ $stats.chapters }}">0</p>
<p class="count" data-count="{{ $chapters | len }}">0</p>
</div>
</div>
</div>
Expand Down

0 comments on commit 94515ee

Please sign in to comment.