diff --git a/svelte-app/src/app.scss b/svelte-app/src/app.scss index ee462f91c..1fb935fa3 100644 --- a/svelte-app/src/app.scss +++ b/svelte-app/src/app.scss @@ -33,7 +33,7 @@ body { @media (min-width: 0px) { background-color: $dark; } - @media (min-width: 1024px) { + @media (min-width: 768px) { background-color: $black; } @@ -43,7 +43,7 @@ body { @media (min-width: 0px) { background-color: $white; } - @media (min-width: 1024px) { + @media (min-width: 768px) { background-color: $light; } diff --git a/svelte-app/src/components/about/timeline.svelte b/svelte-app/src/components/about/timeline.svelte index 8656aeec7..6665f9d9e 100644 --- a/svelte-app/src/components/about/timeline.svelte +++ b/svelte-app/src/components/about/timeline.svelte @@ -6,7 +6,7 @@ import { currentLang, t } from '$i18n'; import Settings from '$stores/settings'; - import EmptyContent from '$components/empty-content.svelte'; + import BulletPoint from '$components/bullet-point.svelte'; import Hoverable from '$components/hoverable.svelte'; import Icon from '$components/icon.svelte'; import PortableText from '$components/portable-text/portable-text.svelte'; @@ -17,7 +17,7 @@ let selected: number | null = null; - export let data: AuthorTimelineItem[] | undefined; + export let data: AuthorTimelineItem[]; const dateDisplay = (start: string, end: string | undefined) => { try { @@ -26,33 +26,16 @@ if (!endDate) { return `${new Intl.DateTimeFormat($currentLang, { - month: 'long', + month: 'short', year: 'numeric' - }).format(startDate)} ${$t('to')} ${$t('now')}`; - } - - if (startDate.getFullYear() === endDate.getFullYear()) { - if (startDate.getMonth() === endDate.getMonth()) { - return `${new Intl.DateTimeFormat($currentLang, { - month: 'long', - day: 'numeric' - }).format(startDate)} ${$t('to')} ${new Intl.DateTimeFormat($currentLang, { - day: 'numeric', - year: 'numeric' - }).format(endDate)}`; - } - return `${new Intl.DateTimeFormat($currentLang, { - month: 'long' - }).format(startDate)} ${$t('to')} ${new Intl.DateTimeFormat($currentLang, { - month: 'long' - }).format(endDate)} ${endDate.getFullYear()}`; + }).format(startDate)} - ${$t('present')}`; } return `${new Intl.DateTimeFormat($currentLang, { - month: 'long', + month: 'short', year: 'numeric' - }).format(startDate)} ${$t('to')} ${new Intl.DateTimeFormat($currentLang, { - month: 'long', + }).format(startDate)} - ${new Intl.DateTimeFormat($currentLang, { + month: 'short', year: 'numeric' }).format(endDate)}`; } catch (_) { @@ -63,104 +46,79 @@ const { reduce_motion } = Settings; -
{dateDisplay(item.range.start, item.range.end)}
-
- {item.subtitle}
-
+ {#if item.subtitle}
+
+ {formatDate(document.date || document._createdAt, 'med', $currentLang)} +
++ {document.title} +
+ + {:else} + ++ {formatDate(document.date || document._createdAt, 'dayMonth', $currentLang)} +
+{document.desc}
+ {/if} +{$t('No content')}
+ {/if} +{$t('No content')}
+ {/if} +