Skip to content
Snippets Groups Projects
Unverified Commit f8fbce46 authored by Alexis BENOIT's avatar Alexis BENOIT Committed by GitHub
Browse files

Merge pull request #91 from noesya/fix/block-page-legacy

Fix/block page legacy
parents 5366d4a8 08eb3d3e
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,4 @@ ...@@ -32,6 +32,4 @@
</section> </section>
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}
{{/* TODO: refacto avec pages/list.html */}}
\ No newline at end of file
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
<div class="cards"> <div class="cards">
{{ range .pages }} {{ range .pages }}
{{- $page := partial "GetPageByUrl" .page -}} {{- $page := partial "GetPageByUrl" .page -}}
{{- if .slug -}}
{{/* LEGACY */}}
{{- $page = partial "GetPageByUrl" .slug -}}
{{- end -}}
{{ with $page }} {{ with $page }}
<article class="card"> <article class="card">
<h3> <h3>
......
...@@ -4,15 +4,9 @@ ...@@ -4,15 +4,9 @@
<div class="grid"> <div class="grid">
{{ range .pages }} {{ range .pages }}
{{- $page := false -}} {{- $page := false -}}
{{/* Check if . is a map or page url, necessary when pages/grid is called outside block context */}}
{{/* Check if . is a map or page url */}}
{{ if reflect.IsMap . }} {{ if reflect.IsMap . }}
{{- if .page -}} {{- $page = partial "GetPageByUrl" .page -}}
{{- $page = partial "GetPageByUrl" .page -}}
{{- else if .slug -}}
{{/* LEGACY */}}
{{- $page = partial "GetPageByUrl" .slug -}}
{{ end }}
{{ else }} {{ else }}
{{- $page = partial "GetPageByUrl" . -}} {{- $page = partial "GetPageByUrl" . -}}
{{ end }} {{ end }}
......
<ul> <ul>
{{ range .pages }} {{ range .pages }}
{{- $page := partial "GetPageByUrl" .page -}} {{- $page := partial "GetPageByUrl" .page -}}
{{- if .slug -}}
{{/* LEGACY */}}
{{- $page = partial "GetPageByUrl" .slug -}}
{{- end -}}
{{ with $page }} {{ with $page }}
<li> <li>
<a href="{{- .Permalink -}}"> <a href="{{- .Permalink -}}">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment