diff --git a/layouts/diplomas/list.html b/layouts/diplomas/list.html index 549c0d595b7fea69d9333c8fd0c0d866be5e5ea1..242efe4d103d9d448f8a1c8dcdc1e5f38ea6eed0 100644 --- a/layouts/diplomas/list.html +++ b/layouts/diplomas/list.html @@ -11,7 +11,7 @@ {{ partial "contents/list.html" . }} <div class="container"> - {{ partial "diplomas/diplomas.html" . }} + {{ partial "diplomas/diplomas.html" ( dict "diplomas" .Paginator.Pages ) }} </div> </div> diff --git a/layouts/locations/term.html b/layouts/locations/term.html index 6282a36d3c1633488d1eb2a1456fcce45c54f050..647b1bfffcfd6d5192e695d639290205be76b875 100644 --- a/layouts/locations/term.html +++ b/layouts/locations/term.html @@ -14,22 +14,19 @@ {{ partial "contents/list.html" . }} <div class="container"> - <ol class="programs"> - {{- range .Pages -}} - <li> - {{- $title := partial "PrepareHTML" .Title -}} - <a href="{{ .Permalink }}" class="title" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}"> - {{- $title -}} - </a> - {{ if .Params.summary }} - <p class="description"> - {{- partial "PrepareHTML" .Params.summary -}} - </p> - {{ end }} - </li> - {{- end -}} - </ol> + {{ with .Params.diplomas }} + + {{/* Get diplomas collection from diploma's paths */}} + {{ $diplomas := slice }} + {{ range . }} + {{ with site.GetPage (printf "/diplomas/%s" .path) }} + {{ $diplomas = $diplomas | append . }} + {{ end }} + {{ end }} + + {{ partial "diplomas/diplomas.html" ( dict "diplomas" $diplomas ) }} + {{ end }} {{ partial "commons/pagination.html" . }} </div> </div> diff --git a/layouts/partials/H2Extract b/layouts/partials/H2Extract deleted file mode 100644 index fdf28d8e83e8909c2787a109facdd5fd331cdee0..0000000000000000000000000000000000000000 --- a/layouts/partials/H2Extract +++ /dev/null @@ -1,2 +0,0 @@ -{{ $list := findRE "<h2.*?>(.|\n)*?</h2>" . }} -{{ return $list }} diff --git a/layouts/partials/diplomas/diplomas.html b/layouts/partials/diplomas/diplomas.html index 0c15a8d06e4c969510d6100de26fdc6a3230a16d..e15146e49d719a4925560bcce729babe74d590cd 100644 --- a/layouts/partials/diplomas/diplomas.html +++ b/layouts/partials/diplomas/diplomas.html @@ -1,5 +1,7 @@ +{{ $diplomas := .diplomas }} + <ul class="diplomas"> - {{ range .Paginator.Pages }} + {{ range $diplomas }} <li> <a href="{{ .Permalink }}" aria-label="{{ i18n "commons.more_aria" (dict "Title" .Title) }}"> {{- partial "PrepareHTML" .Title -}} @@ -21,6 +23,7 @@ </ol> </div> </li> + {{ end }} </ul> diff --git a/layouts/partials/pages/body.html b/layouts/partials/pages/body.html deleted file mode 100644 index b0cd31be797ee21e7c7e69cb1f823cc58b4b3d52..0000000000000000000000000000000000000000 --- a/layouts/partials/pages/body.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ if (partial "GetTextFromHTML" .) }} - <section> - <div class="container"> - <div itemprop="articleBody" id="page-informations"> - {{ - partial "PrepareHTML" ( - partial "H2AddId" . - ) - }} - </div> - </div> - </section> -{{ end }} diff --git a/layouts/partials/posts/body.html b/layouts/partials/posts/body.html deleted file mode 100644 index 081e75e35be1a8dcb5530dfe5350df14dae84706..0000000000000000000000000000000000000000 --- a/layouts/partials/posts/body.html +++ /dev/null @@ -1,8 +0,0 @@ -<div itemprop="articleBody"> - {{ - partial "PrepareHTML" ( - partial "H2AddId" .Content - ) - }} - {{ partial "PrepareHTML" .Params.text }} -</div>