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

github.com/joway/hugo-theme-yinyang.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoway.CI <joway.w@gmail.com>2019-09-07 11:43:38 +0300
committerJoway.CI <joway.w@gmail.com>2019-09-07 11:43:38 +0300
commit4275e6bd4ec3ee65df85769d845717a37727140f (patch)
tree964f863a8dd0c2b06e62b26b8273526af89dab73
parentcacd2b7d2f64e5396fa3ded98d4316d552ba55e3 (diff)
feat: refactor gallery
-rw-r--r--layouts/gallery/single.html12
-rw-r--r--static/css/index.css14
2 files changed, 22 insertions, 4 deletions
diff --git a/layouts/gallery/single.html b/layouts/gallery/single.html
index ffed743..479e482 100644
--- a/layouts/gallery/single.html
+++ b/layouts/gallery/single.html
@@ -14,10 +14,14 @@
</header>
<div class="post-content markdown-body">
- {{ range .Params.gallery }}
- {{ .name }}
- <img src="{{ . }}" alt="">
- {{ end }}
+ <div class="row gallery">
+ {{ range .Params.gallery }}
+ <div class="col-xs-6 gallery-img">
+ <img src="{{ .url }}" alt="{{ .name }}">
+ <span class="gallery-img-desc">{{ .name }}</span>
+ </div>
+ {{ end }}
+ </div>
</div>
{{ if .Site.Params.disqus }}
diff --git a/static/css/index.css b/static/css/index.css
index 2a3c2e6..0ea93bb 100644
--- a/static/css/index.css
+++ b/static/css/index.css
@@ -158,6 +158,20 @@ a:hover {
margin: 5px 0;
}
+/* gallery */
+
+.gallery-img {
+ text-align: center;
+}
+
+.gallery-img span {
+ text-align: center;
+}
+.gallery-img-desc {
+ font-size: 0.8em;
+ font-weight: 800;
+}
+
/* disqus */
#disqus_thread {