From 68d8f2f5744d36ac7ce8f8f6a0ffa17735eb4908 Mon Sep 17 00:00:00 2001 From: viktorstrate Date: Mon, 24 May 2021 00:02:19 +0200 Subject: [PATCH] Style timeline --- ui/src/components/albumGallery/AlbumBox.tsx | 5 +++-- .../timelineGallery/TimelineGallery.tsx | 17 ++++++++++++----- .../timelineGallery/TimelineGroupAlbum.tsx | 14 +++++++------- .../timelineGallery/TimelineGroupDate.tsx | 8 ++++---- ui/tailwind.config.js | 2 +- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/ui/src/components/albumGallery/AlbumBox.tsx b/ui/src/components/albumGallery/AlbumBox.tsx index 6bb0d864..32db6c8a 100644 --- a/ui/src/components/albumGallery/AlbumBox.tsx +++ b/ui/src/components/albumGallery/AlbumBox.tsx @@ -30,7 +30,7 @@ const AlbumBoxImage = ({ src, ...props }: AlbumBoxImageProps) => { } return ( -
+
{image} {placeholder}
@@ -43,7 +43,8 @@ type AlbumBoxProps = { } export const AlbumBox = ({ album, customLink, ...props }: AlbumBoxProps) => { - const wrapperClasses = 'inline-block text-center text-gray-900 mx-3 my-2 h-60' + const wrapperClasses = + 'inline-block text-center text-gray-900 mx-3 my-2 xs:h-60' if (album) { return ( diff --git a/ui/src/components/timelineGallery/TimelineGallery.tsx b/ui/src/components/timelineGallery/TimelineGallery.tsx index d226c047..f03f1cae 100644 --- a/ui/src/components/timelineGallery/TimelineGallery.tsx +++ b/ui/src/components/timelineGallery/TimelineGallery.tsx @@ -172,11 +172,18 @@ const TimelineGallery = () => { return ( <> - - {timelineGroups} +
+ +
+
+ {timelineGroups} +
- - {album.title} - - +
+ + {album.title} + +
{mediaElms} {itemsBubble} - - +
+
) } diff --git a/ui/src/components/timelineGallery/TimelineGroupDate.tsx b/ui/src/components/timelineGallery/TimelineGroupDate.tsx index 9925575a..18bd128f 100644 --- a/ui/src/components/timelineGallery/TimelineGroupDate.tsx +++ b/ui/src/components/timelineGallery/TimelineGroupDate.tsx @@ -60,10 +60,10 @@ const TimelineGroupDate = ({ const formattedDate = dateFormatter.format(new Date(group.date)) return ( - - {formattedDate} - {albumGroupElms} - +
+
{formattedDate}
+
{albumGroupElms}
+
) } diff --git a/ui/tailwind.config.js b/ui/tailwind.config.js index 5c072cd0..8aab9ac0 100644 --- a/ui/tailwind.config.js +++ b/ui/tailwind.config.js @@ -4,7 +4,7 @@ module.exports = { darkMode: false, // or 'media' or 'class' theme: { extend: { - screen: { + screens: { xs: '480px', }, boxShadow: {