Skip to content
Snippets Groups Projects
Commit 0ba46f26 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm hugo/layouts/shortcodes/examples-preview.html

parent d7f81610
No related branches found
No related tags found
1 merge request!1460Webdoc: fix various errors
Pipeline #92092 passed
......@@ -5,4 +5,4 @@ weight = 30
### Advanced examples
{{% examples-preview %}}
{{% children %}}
......@@ -5,4 +5,4 @@ weight = 20
### Basic examples
{{% examples-preview %}}
{{% children %}}
......@@ -5,4 +5,4 @@ weight = 40
### Extended examples
{{% examples-preview %}}
{{% children %}}
{{- .Scratch.Set "current" .Page }}
{{- if (.Get 0)}}
{{- with .Site.GetPage "section" (.Get 0) }}
{{- $.Scratch.Set "current" . }}
{{- end }}
{{- end }}
{{- $cpage := (.Scratch.Get "current") }}
<div class="d-flex flex-column mt-2 mb-4">
{{- range $cpage.Pages }}
<div class="card h-100 my-1">
<a href = "{{.Permalink}}" class="card-context">
<div class="card-body">
<div class="row">
{{- $resources := (.Resources.ByType "image") }}
{{- range first 2 $resources }}
{{- $original := . }}
{{- $image := ($original.Resize "256x") }}
<div class="col my-auto ">
<img class="img-fluid" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
</div>
{{- end }}
{{- if eq (len $resources) 1 }}
<div class="col"></div>
{{- end}}
{{- if eq (len $resources) 0 }}
<div class="col"></div>
<div class="col"></div>
{{- end}}
<div class="col-8 text-left ml-3 my-auto">
<h6 > {{- .Title }} </h6>
</div>
</div>
</div>
</a>
</div>
{{- end}}
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment