Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: css alignment of calendar component on the home page #3276

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions components/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function Calendar({ className = '', size }: ICalendarProps) {
const eventsExist = eventsData.length > 0;

return (
<div className={twMerge('overflow-hidden rounded-md border border-gray-200 bg-white p-4', className)}>
<div className={twMerge('overflow-hidden rounded-md border border-gray-200 bg-white p-4 h-full', className)}>
<Heading level={HeadingLevel.h2} typeStyle={HeadingTypeStyle.mdSemibold}>
{t('calendar.title')}
</Heading>
Expand All @@ -52,13 +52,12 @@ export default function Calendar({ className = '', size }: ICalendarProps) {
</li>
))}
</ul>
{eventsExist ? (
<div className='pt-4' data-testid='Calendar-button'>
<div className='h-full content-center'>
{!eventsExist && <div className='font-bold text-gray-700 lg:pb-8'>{t('calendar.noMeetingsMessage')}</div>}
<div className='sm:pt-0 md:pt-2 lg:pb-8 lg:pt-0' data-testid='Calendar-button'>
<GoogleCalendarButton href={CALENDAR_URL} text={t('calendar.viewCalendarBtn')} />
</div>
) : (
<div className='mt-2 text-gray-700'>{t('calendar.noMeetingsMessage')}</div>
)}
</div>
</div>
);
}
2 changes: 1 addition & 1 deletion pages/[lang]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default function HomePage() {

<div className='mt-12 lg:flex lg:flex-row-reverse'>
<section className='mt-10 lg:mt-0 lg:flex-1'>
<Calendar size={2} className='float-left' />
<Calendar size={2} />
</section>
<section className='lg:mr-12 lg:max-w-xl lg:text-left'>
<div className='mt-5 lg:mr-12'>
Expand Down
2 changes: 1 addition & 1 deletion public/locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"calendar": {
"title": "Kommende Veranstaltungen",
"viewCalendarBtn": "Kalender ansehen",
"noMettingsMessage": "In den nächsten Tagen sind keine Sitzungen geplant."
"noMeetingsMessage": "In den nächsten Tagen sind keine Sitzungen geplant."
}
}
2 changes: 1 addition & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"calendar": {
"title": "Upcoming events",
"viewCalendarBtn": "View Calendar",
"noMettingsMessage": "There are no meetings scheduled for next few days."
"noMeetingsMessage": "There are no meetings scheduled for next few days."
}
}
Loading