diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-10-23 19:03:43 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-10-23 19:03:43 +0200 |
| commit | 464cce29a2e04e508a39cf9e68da4458d53873f8 (patch) | |
| tree | 9d62f919b2f0a4572c50066772aec6c4b052c9a7 /themes/flog/layouts/_default/single.html | |
| parent | d642e1328a70e9763379dd91f342dd499439c13d (diff) | |
| download | pragblog-464cce29a2e04e508a39cf9e68da4458d53873f8.tar.gz pragblog-464cce29a2e04e508a39cf9e68da4458d53873f8.zip | |
load low-res images first
Diffstat (limited to 'themes/flog/layouts/_default/single.html')
| -rw-r--r-- | themes/flog/layouts/_default/single.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/themes/flog/layouts/_default/single.html b/themes/flog/layouts/_default/single.html index 44bdae9..bae38f8 100644 --- a/themes/flog/layouts/_default/single.html +++ b/themes/flog/layouts/_default/single.html @@ -4,7 +4,11 @@ <main role="main" class="container"> <article itemscope itemtype="http://schema.org/BlogPosting" class="section"> {{ if .Params.image }} - <img src="/images/{{ .Params.image }}" style="width: 100%;"> + <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> {{ end }} <h1 itemprop="headline" class="header">{{ .Title }}</h1> <span><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time></span> |
