mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
99 lines
3.4 KiB
Plaintext
99 lines
3.4 KiB
Plaintext
---
|
|
// Cspell:words astro imhoff fullsize webp pagefind
|
|
import type { CollectionEntry } from 'astro:content';
|
|
type JournalType = CollectionEntry<'journal'>;
|
|
import { getCollection } from 'astro:content';
|
|
|
|
import { formatPosts, isProduction, sortMarkdownByDate } from '../utils';
|
|
|
|
import { site } from '../data/site';
|
|
|
|
import GridLayout from '../layouts/GridLayout.astro';
|
|
|
|
import PageTitle from '../components/PageTitle.astro';
|
|
import Image from '../components/Image.astro';
|
|
import JournalList from '../components/JournalList.astro';
|
|
|
|
/* FIXME: Remove hack as soon as this issue is resolved:
|
|
* Issue: https://github.com/withastro/roadmap/issues/533
|
|
* Proposal: https://github.com/withastro/roadmap/discussions/419
|
|
*/
|
|
import WriteFile from '../components/WriteFile.astro';
|
|
import RssXml from '../components/RssXml.astro';
|
|
|
|
import Headline from '../components/Headline.astro';
|
|
import MoreLink from '../components/MoreLink.astro';
|
|
|
|
import { Content as AboutMe } from '../text/homepage/about-me.mdx';
|
|
import { Content as WhatIDo } from '../text/homepage/what-i-do.mdx';
|
|
import { Content as Journal } from '../text/homepage/journal.mdx';
|
|
|
|
import { mapping } from '../mdx-components';
|
|
|
|
const allPosts = await getCollection('journal', ({ data }: JournalType) => !data.draft);
|
|
const formattedLatest = formatPosts(allPosts, { limit: 6 });
|
|
|
|
const title = 'Stefan Imhoff';
|
|
const description = 'Web UI Engineer from Hamburg, Germany';
|
|
|
|
const rssPosts = await Astro.glob('../content/journal/**/*.mdx');
|
|
rssPosts.sort(sortMarkdownByDate);
|
|
---
|
|
|
|
<GridLayout title={title} description={description} grid="fullsize" class="grid" innerGrid>
|
|
<PageTitle class="!text-6 sm:!text-7">
|
|
{site.title}
|
|
<small class="block text-[0.235em] font-light tracking-normal dark:text-[0.19em]"
|
|
>{site.tagline}</small
|
|
>
|
|
</PageTitle>
|
|
<div
|
|
class="col-start-1 col-end-19 md:col-start-1 md:col-end-11 xl:col-end-11 [&_div]:!border-x-0 [&_div]:!mbe-0 [&_div]:md:!border-s-0"
|
|
>
|
|
<Image
|
|
alt="Bonsai"
|
|
loading="eager"
|
|
role="presentation"
|
|
src="/assets/images/cover/bonsai.webp"
|
|
/>
|
|
</div>
|
|
|
|
<article
|
|
class="col-start-2 col-end-18 row-start-3 self-center md:col-start-12 md:row-start-2 xl:col-start-13 xl:col-end-17"
|
|
>
|
|
<Headline>About Me</Headline>
|
|
<AboutMe components={mapping} />
|
|
<MoreLink href="/about/" text="Read more about me" />
|
|
</article>
|
|
|
|
<article
|
|
class="col-start-2 col-end-18 row-start-4 md:col-start-3 md:col-end-17 md:row-start-3 xl:col-start-5 xl:col-end-15"
|
|
>
|
|
<Headline>What I Do</Headline>
|
|
<div class="columns-1 gap-[2.775vw] mbe-10 md:columns-2 [&_p:last-of-type]:mbe-0">
|
|
<WhatIDo components={mapping} />
|
|
</div>
|
|
<MoreLink href="/projects/" text="See what I do" />
|
|
</article>
|
|
|
|
<article
|
|
class="col-start-2 col-end-18 md:col-start-6 md:col-end-14 xl:col-start-7 xl:col-end-13"
|
|
>
|
|
<Headline>Journal</Headline>
|
|
<Journal components={mapping} />
|
|
<MoreLink href="/journal/" text="See all Journal Entries" />
|
|
</article>
|
|
|
|
<article
|
|
class="min-[1794px]:[&_li:block col-start-2 col-end-18 grid w-full grid-cols-18 gap-y-gap mbe-12 min-[1097px]:[&_li:nth-child(n+5)]:hidden min-[1410px]:[&_li:nth-child(n+5)]:block min-[1411px]:[&_li:nth-child(n+6)]:hidden min-[1793px]:[&_li:nth-child(n+6)]:block"
|
|
data-pagefind-ignore
|
|
aria-label="Latest essays"
|
|
>
|
|
<JournalList entries={formattedLatest} />
|
|
</article>
|
|
</GridLayout>
|
|
|
|
<WriteFile slot="rss-writer">
|
|
<RssXml allPosts={isProduction ? rssPosts : []} slot="rss-writer" />
|
|
</WriteFile>
|