Merge for v0.9.0

This commit is contained in:
Alexis Tacnet
2017-03-07 16:51:13 +01:00
9 changed files with 16 additions and 14 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
> v0.9.0
- **Change the folder of high res images, now it's the root of the image folder.**
- Add a version to CSS to prevent bad caching
- Fix the images so absoluts paths are working even if the blog is in a subfolder
> v0.8.0
- Add a licensing page and a copyright in the footer if wanted (thx to [Hjdskes](https://github.com/Hjdskes))

View File

@@ -1,2 +0,0 @@
+++
+++

View File

@@ -13,7 +13,7 @@ best: true
**This theme includes a tranparent way to defer images. This can be enabled/disabled in the `config.toml`.**
![image](../../img/startup.jpg)
![image](/img/startup.jpg)
**You will just have to do two images : the normal, and a low resolution one.**

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -4,11 +4,7 @@
<div class="content">
{{ partial "page-heading.html" . }}
<div class="markdown">
{{ if .Site.Params.progressively }}
{{ .Content | replaceRE "<img src=(.*)\\/(.*) alt=(.*)>" "<figure class=\"progressive\"><img class=\"progressive__img progressive--not-loaded\" data-progressive=$1/high/$2 src=$1/low/$2 alt=$3></figure>" | safeHTML }}
{{ else }}
{{ .Content }}
{{ end }}
{{ partial "content" . }}
</div>
</div>
</div>

View File

@@ -13,11 +13,7 @@
</div>
</div>
<div class="markdown">
{{ if .Site.Params.progressively }}
{{ .Content | replaceRE "<img src=(.*)\\/(.*) alt=(.*)>" "<figure class=\"progressive\"><img class=\"progressive__img progressive--not-loaded\" data-progressive=$1/high/$2 src=$1/low/$2 alt=$3></figure>" | safeHTML }}
{{ else }}
{{ .Content }}
{{ end }}
{{ partial "content" . }}
<br>
<p><a href="{{ .Section | absURL }}">Back to posts</a></p>
</div>

View File

@@ -0,0 +1,6 @@
{{ if .Site.Params.progressively }}
{{ $newImage := (print "<figure class=\"progressive\"><img class=\"progressive__img progressive--not-loaded\" data-progressive=\"" .Site.BaseURL "$1/$2\" src=\"" .Site.BaseURL "$1/low/$2\" alt=$3></figure>") }}
{{ .Content | replaceRE "<img src=\"/(.*)\\/(.*)\" alt=(.*)>" $newImage | safeHTML }}
{{ else }}
{{ .Content }}
{{ end }}

View File

@@ -1,6 +1,6 @@
<!-- CSS -->
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.v0.9.0.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/ionicons.min.css">
{{ if .Site.Params.highlightjs }}