mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 11:46:41 +02:00
Merge for v0.9.0
This commit is contained in:
@@ -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))
|
||||
|
@@ -1,2 +0,0 @@
|
||||
+++
|
||||
+++
|
@@ -13,7 +13,7 @@ best: true
|
||||
|
||||
**This theme includes a tranparent way to defer images. This can be enabled/disabled in the `config.toml`.**
|
||||
|
||||

|
||||

|
||||
|
||||
**You will just have to do two images : the normal, and a low resolution one.**
|
||||
|
||||
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
@@ -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>
|
||||
|
@@ -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>
|
||||
|
6
layouts/partials/content.html
Normal file
6
layouts/partials/content.html
Normal 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 }}
|
@@ -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 }}
|
||||
|
Reference in New Issue
Block a user