diff --git a/svelte-app/cypress/e2e/routes/blog.cy.ts b/svelte-app/cypress/e2e/routes/blog.cy.ts index 6d5b89837..fa8adf570 100644 --- a/svelte-app/cypress/e2e/routes/blog.cy.ts +++ b/svelte-app/cypress/e2e/routes/blog.cy.ts @@ -19,7 +19,7 @@ describe('E2E | Blog', () => { cy.visit('/blog'); cy.get('div.main', { timeout: 4000 }).should('exist'); - cy.get('div.main').should('contain', 'kio.dev | Blog'); + cy.get('div.main').should('contain', 'Recent posts'); }); // TODO: This should be a separate test diff --git a/svelte-app/cypress/e2e/routes/index.cy.ts b/svelte-app/cypress/e2e/routes/index.cy.ts index b3cf28abb..a1d2ebd57 100644 --- a/svelte-app/cypress/e2e/routes/index.cy.ts +++ b/svelte-app/cypress/e2e/routes/index.cy.ts @@ -3,12 +3,12 @@ describe('E2E | Index', () => { cy.intercept('GET', '/api/get/config'); cy.visit('/'); - cy.get('div.main', { timeout: 4000 }).should('contain', 'kio.dev | Index'); + cy.get('div.main', { timeout: 4000 }).should('contain', 'About me'); cy.get('[data-test-id="error-text"]').should('not.exist'); cy.reload(); - cy.get('div.main', { timeout: 4000 }).should('contain', 'kio.dev | Index'); + cy.get('div.main', { timeout: 4000 }).should('contain', 'About me'); cy.get('[data-test-id="error-text"]').should('not.exist'); }); }); 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..b8dc857c3 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} +