Improve image gallery css
This commit is contained in:
parent
fa91b0e262
commit
64259ef1ea
|
@ -211,6 +211,8 @@ nav {
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
|
background-color: #0f0f0f;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-row {
|
.gallery-row {
|
||||||
|
|
|
@ -31,9 +31,8 @@
|
||||||
#
|
#
|
||||||
#proc renderMediaGroup(tweet: Tweet): string =
|
#proc renderMediaGroup(tweet: Tweet): string =
|
||||||
#let groups = if tweet.photos.len > 2: tweet.photos.distribute(2) else: @[tweet.photos]
|
#let groups = if tweet.photos.len > 2: tweet.photos.distribute(2) else: @[tweet.photos]
|
||||||
#let groupStyle = if groups.len == 1 and groups[0].len < 2: "" else: "background-color: #0f0f0f;"
|
|
||||||
#var first = true
|
#var first = true
|
||||||
<div class="attachments media-body" style="${groupStyle}">
|
<div class="attachments media-body">
|
||||||
#for photos in groups:
|
#for photos in groups:
|
||||||
#let style = if first: "" else: "margin-top: .25em;"
|
#let style = if first: "" else: "margin-top: .25em;"
|
||||||
<div class="gallery-row cover-fit" style="${style}">
|
<div class="gallery-row cover-fit" style="${style}">
|
||||||
|
|
Loading…
Reference in New Issue