casper3 | new theme!
This commit is contained in:
parent
afc968f2fd
commit
79bd0dfa77
27 changed files with 1989 additions and 0 deletions
49
themes/casper3/layouts/partials/post-card.html
Normal file
49
themes/casper3/layouts/partials/post-card.html
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<article class="post-card post
|
||||
{{ if not (.context.Param "featured_image") }} no-image
|
||||
{{ else }}
|
||||
{{ if (eq (mod .index 6) 0) }} post-card-large {{ end }}
|
||||
{{ end }} ">
|
||||
|
||||
{{ if .context.Param "featured_image" }}
|
||||
<a class="post-card-image-link" href="{{ .context.Permalink }}">
|
||||
<img class="post-card-image"src="{{ .context.Param "featured_image" }}" alt="{{ .context.Title }}"/>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
<div class="post-card-content">
|
||||
|
||||
<a class="post-card-content-link" href="{{ .context.Permalink }}">
|
||||
|
||||
<header class="post-card-header">
|
||||
{{ with .context.Params.tags }}
|
||||
{{ $primaryTag := (index . 0) }}
|
||||
<div class="post-card-primary-tag">{{ $primaryTag }}</div>
|
||||
{{ end }}
|
||||
|
||||
<h2 class="post-card-title">{{ .context.Title }}</h2>
|
||||
</header>
|
||||
|
||||
<section class="post-card-excerpt">
|
||||
<p>{{ .context.Summary }}</p>
|
||||
</section>
|
||||
|
||||
</a>
|
||||
|
||||
<footer class="post-card-meta">
|
||||
<ul class="author-list">
|
||||
<li class="author-list-item">
|
||||
<div class="author-name-tooltip">{{ .context.Param "author" }}</div>
|
||||
<a href="#" class="static-avatar author-profile-image">{{- partial "icons/avatar.html" -}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="post-card-byline-content">
|
||||
<span>{{ .context.Param "author" }}</span>
|
||||
<span class="post-card-byline-date"><time datetime="{{ .context.Date.Format "2006-31-01" }}">{{ .context.Date.Format "2 January 2006" }}</time>
|
||||
<span class="bull">•</span> {{ .context.ReadingTime }} min read</span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue