oxil-net1
Version:
Oxford Information Labs Netistrar Theme
113 lines (77 loc) • 2.88 kB
HTML
{{define "schema"}}
<script type="application/ld+json">
{
"@context":"https://schema.org",
"@type":"ItemList",
"itemListElement":[
{{ range $pos, $value := first 3 (after 1 .Pages.ByDate.Reverse) }}{{ if $pos }},{{ end }}{
"@type":"ListItem",
"position":{{ add $pos 1}},
"url":"{{$value.Permalink}}"
}{{ end }}
]
}
</script>
{{ end }}
{{ define "bodytag"}}
<body id="body" class="blog">
{{ end }}
{{ define "main" }}
<div class="gf9">
<div class="grid px1 px2l py2 flex " >
<div class="breadcrumb">
{{partial "breadcrumb" (dict "p1" . "p2" .) }}
</div>
</div>
</div>
<div class="grid px1 py2 p4l">
<h1 class="w-60 ">{{.Title}}</h1>
</div>
{{ range first 1 .Pages.ByLastmod.Reverse }}
<div class=" pb3">
<div class="snap-hero px1 px2l">
{{ partial "blog/hero" .}}
</div>
</div>
{{ end }}
<div class=" pb5">
<div class="px1 px2l grid flex flex-grid flex-wrap flex-gutter-3">
{{ range after 1 (where .Pages.ByLastmod.Reverse "Params.frontpageonly" "!=" "true") }}
{{$link := .Permalink}}
<div class="w-33 flex flex-col-md mb2" >
{{- with .Params.youtubeid -}}
<div class="thumb w with-link">
<amp-youtube width="480"
height="270"
layout="responsive"
data-videoid="{{.}}">
</amp-youtube>
<a href="{{$link}}"></a>
</div>
{{- else -}}
<div class="with-link w thumb gf9" >
{{ $img := .Resources.GetMatch "*featured*" }}
{{ with $img }}
{{ $small := .Resize "600x" }}
<amp-img src="{{ $small.RelPermalink }}" alt="{{ $img.Title }}" width="16" height="9" layout="responsive" ></amp-img>
{{ end }}
<a href="{{.Permalink}}"></a>
</div>
{{- end -}}
<div class="gf9 p1l px1 py050 flex flex-col justify-between flex1" >
<div class="mb1">
<h5 class="m0 lh13"><a class="inv font-color bold" href="{{$link}}">{{- with .Params.channel }}<b>{{.}}:</b> {{ end }}{{.Title}}</a></h5>
<time class="vsmall g8-text" datetime="{{ dateFormat " 2006-01-02T15:04:05-07:00" .Lastmod }}">
{{ dateFormat "2 Jan, 2006" .Lastmod }}
</time>
</div>
<div class="small">{{ range .Params.categories }}<a href="/categories/{{- . | urlize -}}/" class="pipe uppercase text-colour inv normal">{{ . }}</a>{{ end }}: {{ range .Params.tags }}<a href="/tags/{{- . | urlize -}}/" class="com text-colour inv normal">{{ . }}</a>{{ end }}</div>
</div>
</div>
{{ end }}
</div>
</div>
{{ end }}
{{ define "bodyclose" }}
</body>
{{ end }}