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

github.com/kdevo/osprey-delight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdevo <kdevo@users.noreply.github.com>2020-06-11 22:34:52 +0300
committerkdevo <kdevo@users.noreply.github.com>2020-06-11 22:34:52 +0300
commit7e0228cfa48d9d2b0762a67bc46ebe003bb231cb (patch)
tree0952f97b2dd18c218bb1fae2b7f8adffc1ac319c /layouts
parentcf20d19326420ab5b10cff5d288f86096fd75f5b (diff)
:recycle: Refactor to gallery-box partial
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/gallery-box.html10
-rw-r--r--layouts/partials/gallery.html24
2 files changed, 14 insertions, 20 deletions
diff --git a/layouts/partials/gallery-box.html b/layouts/partials/gallery-box.html
new file mode 100644
index 0000000..b6326b8
--- /dev/null
+++ b/layouts/partials/gallery-box.html
@@ -0,0 +1,10 @@
+<div class="gallery-img-container">{{ partial "gallery-img" . }}</div>
+ <div class="row middle-xs center-xs overlay">
+ {{ partial "gallery-link.html" . }}
+ <h2>{{ .Title }}
+ {{ with .Params.subtitle }}
+ <br>
+ <small>{{ . }}</small>
+ {{- end }}
+ </h2>
+ </div> \ No newline at end of file
diff --git a/layouts/partials/gallery.html b/layouts/partials/gallery.html
index d431e40..c775f72 100644
--- a/layouts/partials/gallery.html
+++ b/layouts/partials/gallery.html
@@ -19,11 +19,7 @@
{{ if eq $galleryTotal 1 }}
{{ range first 3 $galleryReverse }}
<div class="gallery-item col-xs-12" onclick {{ if .Params.color }}style="background-color:{{ .Params.color }}"{{ end }}>
- <div class= "gallery-img-container">{{ partial "gallery-img" . }}</div>
- <div class="row middle-xs center-xs overlay">
- {{ partial "gallery-link.html" . }}
- <h2>{{ .Title }}</h2>
- </div>
+ {{ partial "gallery-box.html" . }}
</div>
{{ end }}
{{ end }}
@@ -32,11 +28,7 @@
{{ if gt $galleryTotal 2 }}
{{ range first 3 $galleryReverse }}
<div class="gallery-item col-xs-12 col-md-4" onclick {{ if .Params.color }}style="background-color:{{ .Params.color }}"{{ end }}>
- <div class= "gallery-img-container">{{ partial "gallery-img" . }}</div>
- <div class="row middle-xs center-xs overlay">
- {{ partial "gallery-link.html" . }}
- <h2>{{ .Title }}</h2>
- </div>
+ {{ partial "gallery-box.html" . }}
</div>
{{ end }}
{{ end }}
@@ -53,11 +45,7 @@
{{- else }} col-lg-3
{{- end }}
{{- end }}" onclick {{ if .Params.color }}style="background-color:{{ .Params.color }}"{{ end }}>
- <div class= "gallery-img-container">{{ partial "gallery-img" . }}</div>
- <div class="row middle-xs center-xs overlay">
- {{ partial "gallery-link.html" . }}
- <h2>{{ .Title }}</h2>
- </div>
+ {{ partial "gallery-box.html" . }}
</div>
{{ end }}
@@ -78,11 +66,7 @@
{{- end }}
{{- end }}
{{- end }}" onclick {{ if .Params.color }}style="background-color:{{ .Params.color }}"{{ end }}>
- <div class= "gallery-img-container">{{ partial "gallery-img" . }}</div>
- <div class="row middle-xs center-xs overlay">
- {{ partial "gallery-link.html" . }}
- <h2>{{ .Title }}</h2>
- </div>
+ {{ partial "gallery-box.html" . }}
</div>
{{ end }}