selfhostable, read-only reddit client

Make gallery nicer in card view

Changed files
+9 -2
src
mixins
public
+2 -2
src/mixins/post.pug
··· 47 47 div.gallery(class=`${query.view}`) 48 48 each item in postGalleryItems(p) 49 49 div.gallery-item(class=`${query.view}`) 50 + a(href=`/media/${item.url}`) 51 + img(src=item.url loading="lazy") 50 52 div.gallery-item-idx(class=`${query.view}`) 51 53 | #{`${item.idx}/${item.total}`} 52 - a(href=`/media/${item.url}`) 53 - img(src=item.url loading="lazy") 54 54 else 55 55 img(src=item.url onclick=onclick) 56 56 else if isPostImage(p)
+7
src/public/styles.css
··· 202 202 203 203 .gallery.card { 204 204 align-items: center; 205 + scroll-snap-type: both mandatory; 205 206 } 206 207 207 208 .gallery-item.card { 208 209 max-width: 100%; 210 + width: 100%; 211 + scroll-snap-align: center; 212 + } 213 + 214 + .gallery-item-idx.card { 215 + text-align: center; 209 216 } 210 217 211 218 .spoiler {