Welcome to mirror list, hosted at ThFree Co, Russian Federation.

featured.html « post « layouts - github.com/jpescador/hugo-future-imperfect.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5aa9d5f3605a791f4a84120cfe42e69b08b64d95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{{ if and (isset .Params "featuredpath") (ne .Params.featuredpath "") }}
    {{ $.Scratch.Set "path" .Params.featuredpath }}

    {{ if and (isset .Params "featured") (ne .Params.featuredpath "") }}
        {{ $.Scratch.Set "structType" "page" }}
        {{ partial "img-path" . }}
        {{ $path := $.Scratch.Get "path" }}

        <div>
            <a href="{{ .Permalink }}" class="image featured">
                <img src="{{ $path }}/{{ .Params.featured }}" alt="{{ .Params.featuredalt }}" />
            </a>
        </div>
    {{ end }}
{{ end }}