Added files of the theme
This commit is contained in:
23
layouts/_default/li.html
Normal file
23
layouts/_default/li.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<a
|
||||
href="{{ .Permalink }}" class="card blog-card" rel="bookmark" >
|
||||
<div class="card-img-container">
|
||||
{{ with .Resources.GetMatch "featuredImage" }}
|
||||
<picture>
|
||||
{{ with $.Resources.GetMatch (replace (.Title) (path.Ext (.Title)) ".webp") -}}
|
||||
<source srcset="{{ .Permalink }}" type="image/webp">
|
||||
{{- end }}
|
||||
{{ $thumbnail := .Fit "800x600 Lanczos" }}
|
||||
<source srcset="{{ $thumbnail.Permalink }}">
|
||||
<img src="{{ $thumbnail.Permalink }}" class="card-img" {{ with .Params.description -}} alt="{{ . }}" {{- end }}>
|
||||
</picture>
|
||||
{{- end }}
|
||||
</div>
|
||||
<article class="card-body">
|
||||
<h2 class="card-title">{{ .Title }}</h2>
|
||||
<p class="card-text">{{ if (isset .Params "description") }}{{ index .Params "description" | htmlUnescape }}{{ else }}{{ .Summary | plainify | htmlUnescape }}{{ end }}</p>
|
||||
<div class="card-subtext muted-text">
|
||||
<p>Posted <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>
|
||||
{{ if (isset .Params "categories") }}<p>{{ range .Params.categories }}#{{ . | urlize | title }} {{ end }}</p>{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
</a>
|
||||
Reference in New Issue
Block a user