From 647d2fad5ce69b84b29ea75dffe29315ef966c03 Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Tue, 7 Feb 2017 01:38:05 +0100 Subject: [PATCH] Add choice for progressive images --- layouts/_default/single.html | 6 +++++- layouts/blog/single.html | 6 +++++- layouts/partials/footer_scripts.html | 8 +++++--- layouts/partials/head_includes.html | 4 +++- static/css/main.css | 8 +++++--- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index dda9065..bd4d8a1 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,7 +4,11 @@
{{ partial "page-heading.html" . }}
- {{ .Content }} + {{ if .Site.Params.progressively }} + {{ .Content | replaceRE "(.*)" "
$3
" | safeHTML }} + {{ else }} + {{ .Content }} + {{ end }}
diff --git a/layouts/blog/single.html b/layouts/blog/single.html index cc92388..72fe358 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -13,7 +13,11 @@
- {{ .Content | replaceRE "(.*)" "
$3
" | safeHTML }} + {{ if .Site.Params.progressively }} + {{ .Content | replaceRE "(.*)" "
$3
" | safeHTML }} + {{ else }} + {{ .Content }} + {{ end }}

Back to posts

diff --git a/layouts/partials/footer_scripts.html b/layouts/partials/footer_scripts.html index 9ba77f4..940c311 100644 --- a/layouts/partials/footer_scripts.html +++ b/layouts/partials/footer_scripts.html @@ -9,7 +9,9 @@ {{ end }} - - + \ No newline at end of file + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/head_includes.html b/layouts/partials/head_includes.html index c5faf9e..cbd4ac7 100644 --- a/layouts/partials/head_includes.html +++ b/layouts/partials/head_includes.html @@ -7,7 +7,9 @@ - +{{ if .Site.Params.progressively }} + +{{ end }} {{range .Site.Params.extracssfiles}} diff --git a/static/css/main.css b/static/css/main.css index de0416f..75923fa 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -583,9 +583,6 @@ a { a:hover { color: #2a6496; } -img { - max-width: 100%; -} img.profile { min-width: 100%; } @@ -747,6 +744,7 @@ section.main .content .markdown figure { section.main .content .markdown figure img { height: 100%; width: auto; + max-width: 100%; display: block; position: static; margin: auto; @@ -772,6 +770,10 @@ section.main .content .markdown figure img { width: 110%; margin-left: -5%; } + section.main .content .markdown img { + width: 110%; + margin-left: -5%; + } } section.main .content .markdown table { margin-bottom: 1rem;