summaryrefslogtreecommitdiff
path: root/themes/flog/layouts/partials/listing.html
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-11-08 11:27:37 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2016-11-08 11:27:37 +0100
commit959f915c9e545a7fe8cafce9916eea377181201e (patch)
treec47337abfbbceee25b25443d2e57f47dd039d0d6 /themes/flog/layouts/partials/listing.html
parent5d4d6b3b12149333eeb15a5a4114c025c06dfc20 (diff)
downloadpragblog-959f915c9e545a7fe8cafce9916eea377181201e.tar.gz
pragblog-959f915c9e545a7fe8cafce9916eea377181201e.zip
use webp for images, load icons offline
Diffstat (limited to 'themes/flog/layouts/partials/listing.html')
-rw-r--r--themes/flog/layouts/partials/listing.html20
1 files changed, 11 insertions, 9 deletions
diff --git a/themes/flog/layouts/partials/listing.html b/themes/flog/layouts/partials/listing.html
index cefede4..a826617 100644
--- a/themes/flog/layouts/partials/listing.html
+++ b/themes/flog/layouts/partials/listing.html
@@ -11,11 +11,13 @@
<div class="card">
{{ if .Params.image }}
<div class="card-image">
- <a class="jsonly" href="{{ .RelPermalink }}"><img src="/images/min/{{ .Params.image }}" onload="this.src = '/images/max/{{ .Params.image }}'"></a>
- <noscript>
- <a href="{{ .RelPermalink }}"><img src="/images/max/{{ .Params.image }}"></a>
- <style>.jsonly { display: none }</style>
- </noscript>
+ <a href="{{ .RelPermalink }}">
+ <picture>
+ <source srcset="/images/min/{{ .Params.image }}.webp" type="image/webp">
+ <source srcset="/images/min/{{ .Params.image }}.jpg" type="image/jpg">
+ <img src="/images/min/{{ .Params.image }}.jpg">
+ </picture>
+ </a>
</div>
{{ end }}
<section class="card-content" itemprop="text">
@@ -28,14 +30,14 @@
<a href="{{ .RelPermalink }}">
Weiterlesen…
{{ if .Params.rating }}
- <i class="material-icons right">
+ <span class="right">
{{ range seq .Params.rating }}
- star
+ <img src="/fonts/icons/ic_star_black_24px.svg">
{{ end }}
{{ range seq (sub 5 (int .Params.rating)) }}
- star_border
+ <img src="/fonts/icons/ic_star_border_black_24px.svg">
{{ end }}
- </i>
+ </span>
{{ end }}
</a>
</div>