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

github.com/jesselau76/hugo-w3-simple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjesselau76 <jesselau76@gmail.com>2018-11-27 07:48:28 +0300
committerjesselau76 <jesselau76@gmail.com>2018-11-27 07:48:28 +0300
commit834565b205efcac634223b0e39a2ba7ae6c94ec4 (patch)
treeed5912e28db8a256110f7e0afc674e467d49417e /layouts
parentc3c4bfffe51fff26de8e0bcf2558455bbbb68c82 (diff)
change quote shortcodes
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/list.html2
-rw-r--r--layouts/post/single.html2
-rw-r--r--layouts/shortcodes/quote.html8
3 files changed, 9 insertions, 3 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 315b728..c128195 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -32,7 +32,7 @@
{{ else }}
{{ if .Site.Params.firstpic}}
- {{ $img := findRE "(?i)<img .*?src=\"[^\"]*(png|jpg|jpeg|gif|bmp|svg)\".*?>" .Content 1 }}
+ {{ $img := findRE "(?i)<img .*?src\\s*=\\s*\"([^\"]*(png|jpg|jpeg|gif|bmp|svg))\".*?>" .Content 1 }}
{{ range $img }}
<div class="w3-hover-opacity thumb ">
diff --git a/layouts/post/single.html b/layouts/post/single.html
index 5307ec5..c596a69 100644
--- a/layouts/post/single.html
+++ b/layouts/post/single.html
@@ -49,7 +49,7 @@
{{ if .Site.Params.lazyload }}
- {{ $regex := "(?i)src=\"([^\"]*(png|jpg|jpeg|gif|bmp|svg))\"" }}
+ {{ $regex := "(?i)src\\s*=\\s*\"([^\"]*(png|jpg|jpeg|gif|bmp|svg))\"" }}
{{ $img := findRE $regex .Content }}
{{ if gt (len $img) 0 }}
diff --git a/layouts/shortcodes/quote.html b/layouts/shortcodes/quote.html
index 62892db..beb3355 100644
--- a/layouts/shortcodes/quote.html
+++ b/layouts/shortcodes/quote.html
@@ -1,4 +1,10 @@
<div class="w3-panel w3-card-4 w3-light-grey"{{ with .Get "width"}} style="width:{{.}}"{{ end }}>
<i class="fa fa-quote-right w3-xxlarge w3-text-red"></i><br>
- {{ .Inner | safeHTML }}
+ <p class=" w3-xxlarge">
+ {{ .Inner }}
+ </p>
+ {{ with .Get "author"}}
+ <p class="w3-right">--- {{.}}</p>
+ {{ end }}
+
</div> \ No newline at end of file