mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 12:05:28 +00:00
120 lines
3.2 KiB
Plaintext
120 lines
3.2 KiB
Plaintext
---
|
|
import type { CollectionEntry } from 'astro:content';
|
|
|
|
import ProjectContent from '../components/ProjectContent.astro';
|
|
import ProjectImage from '../components/ProjectImage.astro';
|
|
|
|
interface Props {
|
|
project: CollectionEntry<'projects'>;
|
|
}
|
|
|
|
const {
|
|
project: {
|
|
data: { format, class: className },
|
|
},
|
|
project,
|
|
} = Astro.props;
|
|
---
|
|
|
|
<article class:list={['col-start-1 col-end-19 grid grid-cols-18', className]}>
|
|
{
|
|
format === '50-start' && (
|
|
<figure class="col-start-1 col-end-19 m-0 grid grid-cols-2 items-center gap-x-gap gap-y-halfgap">
|
|
<div class="col-start-1 col-end-3 row-start-1 xl:col-start-1 xl:col-end-2 xl:row-start-1">
|
|
<ProjectImage project={project} />
|
|
</div>
|
|
<figcaption class="col-start-1 col-end-3 row-start-2 text-start xl:col-start-2 xl:row-start-1">
|
|
<ProjectContent project={project} />
|
|
</figcaption>
|
|
</figure>
|
|
)
|
|
}
|
|
{
|
|
format === '50-end' && (
|
|
<figure class="col-start-1 col-end-19 m-0 grid grid-cols-2 items-center gap-x-gap gap-y-halfgap">
|
|
<div class="col-start-1 col-end-3 row-start-1 xl:col-start-2 xl:row-start-1">
|
|
<ProjectImage project={project} />
|
|
</div>
|
|
<figcaption class="col-start-1 col-end-3 row-start-2 text-start xl:col-start-1 xl:col-end-2 xl:row-start-1">
|
|
<ProjectContent project={project} />
|
|
</figcaption>
|
|
</figure>
|
|
)
|
|
}
|
|
{
|
|
format === '70-start' && (
|
|
<figure class="col-start-1 col-end-19 grid grid-cols-18 items-center gap-y-halfgap">
|
|
<div class="col-start-1 col-end-19 xl:col-end-11">
|
|
<ProjectImage project={project} />
|
|
</div>
|
|
<figcaption class="col-start-1 col-end-19 xl:col-start-12">
|
|
<ProjectContent project={project} />
|
|
</figcaption>
|
|
</figure>
|
|
)
|
|
}
|
|
{
|
|
format === '70-end' && (
|
|
<figure class="col-start-1 col-end-19 grid grid-cols-18 items-center gap-y-halfgap">
|
|
<div class="col-start-1 col-end-19 grid xl:col-start-9">
|
|
<ProjectImage project={project} />
|
|
</div>
|
|
<figcaption class="col-start-1 col-end-19 xl:col-end-8 xl:row-start-1">
|
|
<ProjectContent project={project} />
|
|
</figcaption>
|
|
</figure>
|
|
)
|
|
}
|
|
{
|
|
format === '100-start' && (
|
|
<figure class="col-start-1 col-end-19 row-start-1 grid grid-cols-18 gap-y-halfgap">
|
|
<div class="col-start-1 col-end-19 row-start-1">
|
|
<ProjectImage project={project} />
|
|
</div>
|
|
<figcaption class="col-start-1 col-end-19 xl:col-end-13">
|
|
<ProjectContent project={project} />
|
|
</figcaption>
|
|
</figure>
|
|
)
|
|
}
|
|
{
|
|
format === '100-end' && (
|
|
<figure class="col-start-1 col-end-19 row-start-1 grid grid-cols-18 gap-y-halfgap">
|
|
<div class="col-start-1 col-end-19 row-start-1">
|
|
<ProjectImage project={project} />
|
|
</div>
|
|
<figcaption class="col-start-1 col-end-19 xl:col-start-7">
|
|
<ProjectContent project={project} />
|
|
</figcaption>
|
|
</figure>
|
|
)
|
|
}
|
|
</article>
|
|
|
|
<style is:global>
|
|
/* Extra spacing and background for the Bamboo */
|
|
.bamboo-illustration {
|
|
& img {
|
|
@apply bg-black/5 pbe-10 pie-gap dark:bg-white/5;
|
|
}
|
|
}
|
|
|
|
.traditional-colors-of-japan {
|
|
& img {
|
|
@apply border-0 bg-transparent shadow-none duration-500 ease-in-out dark:bg-transparent;
|
|
transition-property: filter;
|
|
}
|
|
|
|
& .image-shadow:focus,
|
|
& .image-shadow:hover {
|
|
& img {
|
|
@apply drop-shadow-subtle;
|
|
}
|
|
|
|
&::after {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
</style>
|