Skip to content

Commit

Permalink
add responsivity-related fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstrojil committed Sep 9, 2024
1 parent c13ee7b commit 0629072
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/app/components/DateRange/DateRange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export const DateRange = ({
const duration = calculateMonthDifference(sinceRawValue, untilRawValue);

return (
<div className="text-neutral-400 uppercase font-mono flex gap-2">
<div className="text-neutral-400 uppercase font-mono flex flex-wrap gap-2">
{since}
{until && '-'}
{until}
{isDurationVisible && `(${duration})`}
{isDurationVisible && <span className='text-nowrap'>({duration})</span>}
</div>
);
};
3 changes: 2 additions & 1 deletion src/app/components/DateRange/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ReactNode } from 'react';

const YEAR_AND_MONTH_REGEX = /^\d{4}-\d{2}$/; //e.g. "2023-12"
const NON_BREAKING_SPACE = '\xa0';

const parseDate = (dateString: string) => {
const [year, month] = dateString.split('-').map(Number);
Expand All @@ -21,7 +22,7 @@ const formatMonthYear = (dateString: string) => {
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];

const monthName = months[parseInt(month, 10) - 1];
const formattedDate = `${monthName} ${year}`;
const formattedDate = `${monthName}${NON_BREAKING_SPACE}${year}`;

return formattedDate;
};
Expand Down
8 changes: 4 additions & 4 deletions src/app/data/AdamStrojilEnglish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ export const DATA: PersonData = {
skills: [
'flexibility',
'responsibility',
'dedication',
'open-minded',
'independence',
'fairplay',
'teamwork',
'independence',
'humour',
'curiousity',
'dedication',
'curiosity',
'open-mindedness',
],
},
{
Expand Down

0 comments on commit 0629072

Please sign in to comment.