summaryrefslogtreecommitdiff
path: root/themes/flog/layouts/_default/single.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/_default/single.html
parent5d4d6b3b12149333eeb15a5a4114c025c06dfc20 (diff)
downloadpragblog-959f915c9e545a7fe8cafce9916eea377181201e.tar.gz
pragblog-959f915c9e545a7fe8cafce9916eea377181201e.zip
use webp for images, load icons offline
Diffstat (limited to 'themes/flog/layouts/_default/single.html')
-rw-r--r--themes/flog/layouts/_default/single.html16
1 files changed, 8 insertions, 8 deletions
diff --git a/themes/flog/layouts/_default/single.html b/themes/flog/layouts/_default/single.html
index 13b62d5..b3bdbbb 100644
--- a/themes/flog/layouts/_default/single.html
+++ b/themes/flog/layouts/_default/single.html
@@ -4,22 +4,22 @@
<main role="main" class="container">
<article itemscope itemtype="http://schema.org/BlogPosting" class="section">
{{ if .Params.image }}
- <img class="jsonly" src="/images/min/{{ .Params.image }}" style="width: 100%;" onload="this.src = '/images/{{ .Params.image }}'">
- <noscript>
- <img src="/images/{{ .Params.image }}" style="width: 100%;">
- <style>.jsonly { display: none }</style>
- </noscript>
+ <picture>
+ <source srcset="/images/min/{{ .Params.image }}.webp" type="image/webp">
+ <source srcset="/images/min/{{ .Params.image }}.jpg" type="image/jpeg">
+ <img width="100%" src="/images/min/{{ .Params.image }}.jpg">
+ </picture>
{{ end }}
<h1 itemprop="headline" class="header">{{ .Title }}</h1>
<span><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02" }}"></time></span>
{{ if .Params.rating }}
<div class="center right">
- <i class="material-icons">
+ <i>
{{ 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>
</div>