Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-02-03 06:46:30 +0300
committerDillon <dillonzq@outlook.com>2020-02-03 06:46:30 +0300
commit8aba2262906628f38f114a9947783bc6c7fd7495 (patch)
tree445b65d993aa2e82c2e6c97c48fb23fd6d1bd053 /layouts/_default/_markup
parentb91ca3d61ac77d3bec257325682a82729e00890d (diff)
feat(partial): add hook and image partial
Diffstat (limited to 'layouts/_default/_markup')
-rw-r--r--layouts/_default/_markup/render-image.html13
-rw-r--r--layouts/_default/_markup/render-link.html9
2 files changed, 3 insertions, 19 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index 193374d..c143d1d 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -1,15 +1,6 @@
<figure>
- <img
- {{ $res := resources.Get "svg/loading.svg" | minify -}}
- src="{{ $res.RelPermalink }}"
- data-sizes="auto"
- data-src="{{ .Destination | safeURL }}"
- alt="{{ .Text }}"
- {{ with .Title -}}
- title="{{ . }}"
- {{ end -}}
- class="lazyload"
- >
+ {{- $loading := resources.Get "svg/loading.svg" | minify -}}
+ <img src="{{ $loading.RelPermalink }}" data-sizes="auto" data-src="{{ .Destination | safeURL }}" alt="{{ .Text }}"{{ with .Title }} title="{{ . }}"{{ end }} class="lazyload">
<figcaption class="image-caption">
{{- if .Title -}}
{{- .Title -}}
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index d3224c2..01f37d1 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -1,10 +1,3 @@
-<a href="{{ .Destination | safeURL }}"
- {{ with .Title -}}
- title="{{ . }}"
- {{ end -}}
- {{ if strings.HasPrefix .Destination "http" -}}
- target="_blank"
- {{ end -}}
- >
+<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>
{{- .Text | safeHTML -}}
</a> \ No newline at end of file