Browse Source

article partials use new css classes

Alexander Avery 3 months ago
parent
commit
fd491f7b20
  1. 10
      layouts/partials/article-alternate.html
  2. 45
      layouts/partials/article.html

10
layouts/partials/article-alternate.html

@ -1,9 +1,9 @@
<a class="article-link" href={{ printf "/%s/%s" "authors" (.Params.name | urlize) }}> <a href={{ printf "/%s/%s" "authors" (.Params.name | urlize) }}>
<article class="card-alternate shadow float-on-hover"> <article class="alternate shadow left-to-right float-on-hover">
<div> <div>
{{ with .Resources.GetMatch "avatar" }} {{ with .Resources.GetMatch "avatar" }}
<img class="shadow" src="{{ .RelPermalink }}" alt="{{ .Params.alt }}"/> <img class="shadow small-circle" src="{{ .RelPermalink }}" alt="{{ .Params.alt }}"/>
{{ end }} {{ end }}
</div> </div>
<div> <div>
<h2>{{ .Params.name }}</h2> <h2>{{ .Params.name }}</h2>

45
layouts/partials/article.html

@ -1,27 +1,22 @@
<article class="shadow float-on-hover card"> <article class="shadow float-on-hover">
<div class="article-image">
<a href=" {{ .Permalink }}"> <a href=" {{.Permalink }}">
{{ $image := .Resources.GetMatch "featured" }} {{ $image := .Resources.GetMatch "featured" }}
{{ partial "image.html" (dict "image" $image "alt" .Params.featured.alt "class" "fill-wh")}} {{ partial "image.html" (dict "image" $image "alt" .Params.featured.alt) }}
</a> </a>
</div>
<div class="article-info-container"> <div>
<div class="article-info">
{{ range first 1 (.GetTerms "tags") }} <h2 class="title">{{ .Title | markdownify }}</h2>
<a class="small-text" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
{{ end }} {{ with .Date }}
<a href="{{ .Permalink }}" class="article-title fill-wh"> <p>{{ .Format "2006/01/02" }}</p>
<h2>{{ .Title | markdownify }}</h2> {{ end }}
{{ if ne .Kind "term"}}
<span class="date"> {{ with index (.GetTerms "tags") 0 }}
{{ if .Date }} <a class="small-text" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
{{ .Date.Format "2006/01/02" }} {{ end }}
{{ else }}
TBD
{{ end }}
</span>
{{ end }}
</a>
</div>
</div> </div>
</article> </article>

Loading…
Cancel
Save