acoeur/themes/acoeur/layouts/_default/summary-with-image.html

41 lines
1.5 KiB
HTML

{{ $featured_image := partial "func/GetFeaturedImage.html" . }}
<article class="relative w-100 bb b--black-10 db pv4 ph3 ph0-l no-underline dark-gray flex flex-column flex-row-ns">
{{ if $featured_image }}
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
<div class="mb4 mb0-ns w-100 w-40-ns {{ cond (eq $.Site.Language.LanguageDirection "rtl") "pl3-ns" "pr3-ns" }}">
<a href="{{.RelPermalink}}" class="db grow">
<img src="{{ $featured_image }}" class="img" alt="image from {{ .Title }}">
</a>
</div>
{{ else }}
<a class="hero-pill fl w-10-ns bg-black mr3" href="{{.RelPermalink}}"></a>
{{ end }}
<div class="blah w-100{{ if $featured_image }} w-60-ns{{ else }} w-90-ns{{ end }}">
<header>
<time class="db f6 fr" datetime="{{ .Date }}">
{{ .Date | time.Format .Site.Params.date_format }}
</time>
<ol class="breadcrumb nav navbar-nav">
{{ partial "breadcrumb" .Parent }}
</ol>
</header>
<h1 class="f3 fw1 athelas mt0 lh-title">
<a href="{{.RelPermalink}}" class="color-inherit dim link">
{{ .Title }}
</a>
</h1>
<p class="f6 f5-l lh-copy nested-copy-line-height nested-links summary">
{{ .Summary }}
</p>
<a href="{{.RelPermalink}}" class="ba b--moon-gray bg-light-gray br2 color-inherit dib f7 hover-bg-moon-gray link mt2 ph2 pv1">
{{ $.Param "read_more_copy" | default (i18n "readMore") | humanize }}
</a>
</div>
{{ partial "ac_notation" .Parent }}
</article>