Improve image gallery css

This commit is contained in:
Zed 2019-06-23 02:37:25 +02:00
parent fa91b0e262
commit 64259ef1ea
2 changed files with 3 additions and 2 deletions

View File

@ -211,6 +211,8 @@ nav {
border-radius: 7px;
overflow: hidden;
flex-flow: column;
background-color: #0f0f0f;
align-items: center;
}
.gallery-row {

View File

@ -31,9 +31,8 @@
#
#proc renderMediaGroup(tweet: Tweet): string =
#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
<div class="attachments media-body" style="${groupStyle}">
<div class="attachments media-body">
#for photos in groups:
#let style = if first: "" else: "margin-top: .25em;"
<div class="gallery-row cover-fit" style="${style}">