Skip to content

Commit

Permalink
FIx blog linking and taxonomies , fix #215 fix #239 (#244)
Browse files Browse the repository at this point in the history
* fix #215

* fix #239

* remove uneccesary definitions, inherited from _default

* make terms a wordcloud

* simplify terms

---------

Co-authored-by: Cosima Meyer <[email protected]>
  • Loading branch information
drmowinckels and cosimameyer authored Oct 30, 2023
1 parent b4d3fba commit fce2689
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 39 deletions.
13 changes: 0 additions & 13 deletions themes/hugo-rladies/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
{{ define "title" }}
<header class="entry-header">
<div class="entry-meta">
<span class="posted-on">
<time class="entry-date published" datetime="{{ .Date.Format .Site.Params.DateForm }}">
{{if isset .Params "date"}}{{- .Date.Format "January 2, 2006" -}}{{end}}
</time>
</span>
</div>

<h1 class="section-title">{{ .Title }}</h1>
</header>
{{ end }}

{{ define "main" }}
{{ range .Paginator.Pages }}
Expand Down
25 changes: 0 additions & 25 deletions themes/hugo-rladies/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
{{ define "translation"}}
{{ if eq .Params.translated false }}
<div class="not-translated">
{{ i18n "missing_translation" }}
</div>
{{ end }}
{{ end }}


{{ define "title" }}
<header class="entry-header">
<div class="entry-meta">
<span class="posted-on">
{{if isset .Params "date"}}
<time class="entry-date published" datetime="{{ .Date.Format .Site.Params.DateForm }}">
{{- .Date.Format "January 2, 2006" -}}
</time>
{{end}}
</span>
</div>

<h1 class="section-title">{{ .Title }}</h1>
</header>
{{ end }}


{{ define "main" }}
<div class="entry-content">
Expand Down
15 changes: 15 additions & 0 deletions themes/hugo-rladies/layouts/_default/terms.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{ define "main" }}
<div class="d-flex justify-content-center align-items-center flex-wrap m-1">
{{- range $key, $value:= .Data.Terms -}}
<button class="btn btn-md list-group-item m-2 b-0">
<a
href="{{ "" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}"
> {{ $key }}
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-primary text-white">
{{ $value.Count }}
</span>
</a>
</button>
{{- end -}}
</div>
{{ end }}
2 changes: 2 additions & 0 deletions themes/hugo-rladies/layouts/partials/funcs/card-expand.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
{{ with .category }}
<div class="card-expand-category rounded-right">{{ . | safeHTML }}</div>
{{ end }}
{{ with .url }}<a href="{{.}}" target="_blank">{{end}}
<h4 class="card-expand-title">
{{ with .id }} <a href="#{{ . }}" class="name">{{ end }}
{{ .title | safeHTML }}
{{ with .id }} </a> {{ end }}
</h4>
{{ with .url }}</a>{{end}}
{{ with .subtitle }}
<h5 class="card-expand-subtitle">
{{ . | safeHTML }}
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-rladies/layouts/rladies-blogs/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{{ end }}

{{ $subtitle := $rb.subtitle | default "" }}
{{ partial "funcs/card-expand.html" (dict "title" $rb.title "img" ($data.Get "photo") "subtitle" $subtitle "descr" $descr "category" $rb.type ) }}
{{ partial "funcs/card-expand.html" (dict "title" $rb.title "img" ($data.Get "photo") "subtitle" $subtitle "descr" $descr "category" $rb.type "url" $rb.url) }}
{{ end }}
</ul>
</div>
Expand Down

0 comments on commit fce2689

Please sign in to comment.