diff options
author | puresyntax71 <34715246+puresyntax71@users.noreply.github.com> | 2020-01-04 05:14:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-04 05:14:57 +0300 |
commit | 9cdde6cf9c49399c78cc3d33a3d7be340261db33 (patch) | |
tree | d9e1e5b269d9b9f30d0e3d3059555d026bfadd70 | |
parent | fdc9085c6abfef194359bdb4ae368dc929c496b0 (diff) | |
parent | 9708f7be048bb42a075645401020f4b06257eb0d (diff) |
Merge pull request #27 from lukerogers/master
Centering images
-rw-r--r-- | layouts/_default/card.html | 4 | ||||
-rw-r--r-- | layouts/post/single.html | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_default/card.html b/layouts/_default/card.html index 369b3fb..e92e7ed 100644 --- a/layouts/_default/card.html +++ b/layouts/_default/card.html @@ -5,8 +5,8 @@ {{- $images := . -}} {{- with $page.Site.GetPage "section" "images" -}} {{- with .Resources.GetMatch (strings.TrimPrefix "/images/" (index $images 0)) -}} - {{- $image := .Fill "700x350" -}} - <img data-src="{{ $image.RelPermalink }}" class="card-img-top" alt="{{ $page.Title }}"> + {{- $image := .Fit "700x350" -}} + <img data-src="{{ $image.RelPermalink }}" class="card-img-top mx-auto d-block" alt="{{ $page.Title }}"> {{- end -}} {{- end -}} {{- end -}} diff --git a/layouts/post/single.html b/layouts/post/single.html index 5c0d714..e425da4 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -22,10 +22,10 @@ {{- $images := . -}} {{- with $page.Site.GetPage "section" "images" -}} {{- with .Resources.GetMatch (strings.TrimPrefix "/images/" (index $images 0)) -}} - {{- $image := .Fill "900x500" -}} + {{- $image := .Fit "900x500" -}} <div class="row justify-content-center mb-3"> <div class="col-lg-10"> - <img data-src="{{ $image.RelPermalink }}" class="img-fluid rounded" alt="{{ $page.Title }}"> + <img data-src="{{ $image.RelPermalink }}" class="img-fluid rounded mx-auto d-block" alt="{{ $page.Title }}"> </div> </div> {{- end -}} |