Browse Source

terms list with thumbnails

master
Chris 6 years ago
parent
commit
9c739fc0e5
  1. 2
      config.toml
  2. 4
      layouts/eventtypes/term.html
  3. 38
      layouts/partials/summary-with-thumbnail.html

2
config.toml

@ -51,7 +51,7 @@ archetypeDir = "../kollegen-posts/archetypes"
# choose a background color from any on this page: http://tachyons.io/docs/themes/skins/ and preface it with "bg-"
background_color_class = "bg-dark-blue"
featured_image = "/images/070830-schatten.jpg"
recent_posts_number = 999
recent_posts_number = 15
[[menu.main]]
name = "Über"

4
layouts/eventtypes/term.html

@ -25,8 +25,8 @@
<div class="mw8 center">
<section class="flex-ns flex-wrap justify-around mt5">
{{ range .Pages }}
<div class="relative w-100 mb4 bg-white">
{{ partial "summary.html" . }}
<div class="relative w-100 mb3 bg-white">
{{ partial "summary-with-thumbnail.html" . }}
</div>
{{ end }}

38
layouts/partials/summary-with-thumbnail.html

@ -0,0 +1,38 @@
{{ $image := partial "func/GetNamedImage.html" (dict "context" . "name" "featured_image") }}
{{ $image_link := ""}}
{{ with $image }}
{{ $image_link = $image.Permalink }}
{{ end }}
<article class="bb b--light-gray">
<div class="db no-underline dark-gray">
<div class="f6 pa1 small-caps b pa1 gray bg-light-gray">
<div class="flex justify-between">
<div>
{{- .Params.Sports -}}
</div>
{{ partial "formatted-date.html" . }}
</div>
</div>
<div class="flex flex-column flex-row-ns pl1 pr1">
{{ if $image_link }}
<div class="pr3-ns pt1 w-50 w-20-ns">
<a href="{{.Permalink}}" class="db grow">
<img src="{{ $image_link }}" class="img" loading="lazy" alt="image from {{ .Title }}">
</a>
</div>
{{ end }}
<div class="blah w-100{{ if $image_link }} w-60-ns {{ end }}">
<h1 class="f3 fw1 athelas mt3 lh-title">
<a href="{{.Permalink}}" class="color-inherit dim link">
{{ .Title }}
</a>
</h1>
<div class="f6 f5-l lh-copy nested-copy-line-height nested-links">
{{ .Summary }}
</div>
</div>
</div>
</div>
</article>
Loading…
Cancel
Save