display article description after title (#4)
inspired by https://p.atrick.org
This commit is contained in:
parent
3aa7ca486b
commit
a886bfaa5a
16 changed files with 149 additions and 133 deletions
25
package-lock.json
generated
25
package-lock.json
generated
|
@ -2818,9 +2818,9 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/consola": {
|
"node_modules/consola": {
|
||||||
"version": "3.3.2",
|
"version": "3.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/consola/-/consola-3.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/consola/-/consola-3.3.3.tgz",
|
||||||
"integrity": "sha512-X3dcWPU+QeEaPrdtX3zBRQ0P0kIeEnmJV49uNtpy4N/TPnzA3grJvHftKjHuFIQNLrqBPzzykmc3fNrkQDl5yA==",
|
"integrity": "sha512-Qil5KwghMzlqd51UXM0b6fyaGHtOC22scxrwrz4A2882LyUMwQjnvaedN1HAeXzphspQ6CpHkzMAWxBTUruDLg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^14.18.0 || >=16.10.0"
|
"node": "^14.18.0 || >=16.10.0"
|
||||||
|
@ -3211,9 +3211,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/es-module-lexer": {
|
"node_modules/es-module-lexer": {
|
||||||
"version": "1.5.4",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz",
|
||||||
"integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==",
|
"integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/esast-util-from-estree": {
|
"node_modules/esast-util-from-estree": {
|
||||||
|
@ -6652,20 +6652,21 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/regex": {
|
"node_modules/regex": {
|
||||||
"version": "5.0.2",
|
"version": "5.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/regex/-/regex-5.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/regex/-/regex-5.1.0.tgz",
|
||||||
"integrity": "sha512-/pczGbKIQgfTMRV0XjABvc5RzLqQmwqxLHdQao2RTXPk+pmTXB2P0IaUHYdYyk412YLwUIkaeMd5T+RzVgTqnQ==",
|
"integrity": "sha512-KNCzMdCkhhFKcWnqKIixAKDRzERQ/RTvENLRuLSqNFYdvn/XEgKSrpBHluYqnQxuDnzOB+iZRNGidQeEVe9upw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"regex-utilities": "^2.3.0"
|
"regex-utilities": "^2.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/regex-recursion": {
|
"node_modules/regex-recursion": {
|
||||||
"version": "5.0.0",
|
"version": "5.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-5.1.0.tgz",
|
||||||
"integrity": "sha512-UwyOqeobrCCqTXPcsSqH4gDhOjD5cI/b8kjngWgSZbxYh5yVjAwTjO5+hAuPRNiuR70+5RlWSs+U9PVcVcW9Lw==",
|
"integrity": "sha512-8PNVYEQEw5fyIGDuLqXMP5WSSjNey+9q+pUFdVqBbPxo9PL8nl7ucZRa3jzooTz7D6wMOHDrCMdwc6fqL60EXw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"regex": "^5.1.0",
|
||||||
"regex-utilities": "^2.3.0"
|
"regex-utilities": "^2.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -30,15 +30,17 @@ const listFormatter = new Intl.ListFormat("en-GB", {
|
||||||
>
|
>
|
||||||
<div class="mx-auto mb-16 max-w-prose">
|
<div class="mx-auto mb-16 max-w-prose">
|
||||||
<h1
|
<h1
|
||||||
class="animate-reveal break-words text-start text-4xl font-medium opacity-0"
|
class="animate-reveal break-words text-start text-4xl font-semibold opacity-0"
|
||||||
>
|
>
|
||||||
{article.data.title}
|
<span class="text-secondary">{article.data.title}</span><span
|
||||||
|
class="ml-2 text-tertiary">{article.data.description}</span
|
||||||
|
>
|
||||||
</h1>
|
</h1>
|
||||||
<div
|
<div
|
||||||
class="flex animate-reveal flex-col items-start opacity-0 [animation-delay:0.1s]"
|
class="flex animate-reveal flex-col items-start opacity-0 [animation-delay:0.1s]"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mt-4 flex flex-col items-start gap-2 text-lg text-tertiary md:flex-row"
|
class="mt-4 flex flex-col items-start gap-2 text-lg text-accent md:flex-row"
|
||||||
>
|
>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<Icon name="mdi:calendar" />
|
<Icon name="mdi:calendar" />
|
||||||
|
@ -71,7 +73,7 @@ const listFormatter = new Intl.ListFormat("en-GB", {
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
article.data.extraAuthors ? (
|
article.data.extraAuthors ? (
|
||||||
<div class="mt-2 flex items-center gap-2 text-tertiary">
|
<div class="mt-2 flex items-center gap-2">
|
||||||
<p>
|
<p>
|
||||||
In collaboration with{" "}
|
In collaboration with{" "}
|
||||||
{listFormatter.format(article.data.extraAuthors)}
|
{listFormatter.format(article.data.extraAuthors)}
|
||||||
|
@ -82,14 +84,14 @@ const listFormatter = new Intl.ListFormat("en-GB", {
|
||||||
<ul class="mt-4 flex flex-wrap gap-1">
|
<ul class="mt-4 flex flex-wrap gap-1">
|
||||||
{
|
{
|
||||||
article.data.categories.map((category: string) => (
|
article.data.categories.map((category: string) => (
|
||||||
<li class="rounded border border-accent bg-accent/50 px-1 py-0.5 text-sm capitalize text-primary invert">
|
<li class="rounded border border-accent bg-accent px-1 py-0.5 text-sm capitalize text-primary">
|
||||||
{category}
|
{category}
|
||||||
</li>
|
</li>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
article.data.tags.map((tag: string) => (
|
article.data.tags.map((tag: string) => (
|
||||||
<li class="rounded border border-accent bg-accent/50 px-1 py-0.5 text-sm capitalize text-secondary">
|
<li class="rounded border border-accent bg-primary px-1 py-0.5 text-sm capitalize text-accent">
|
||||||
{tag}
|
{tag}
|
||||||
</li>
|
</li>
|
||||||
))
|
))
|
||||||
|
|
|
@ -19,9 +19,6 @@ import { Icon } from "astro-icon/components";
|
||||||
</div>
|
</div>
|
||||||
<div class="text-left sm:gap-6 md:text-right">
|
<div class="text-left sm:gap-6 md:text-right">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="mb-6 text-sm font-semibold uppercase text-secondary">
|
|
||||||
Sections
|
|
||||||
</h2>
|
|
||||||
<ul class="font-medium text-tertiary">
|
<ul class="font-medium text-tertiary">
|
||||||
{
|
{
|
||||||
SITE.NAVLINKS.map((i) => (
|
SITE.NAVLINKS.map((i) => (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div
|
<div
|
||||||
class="prose max-w-full prose-headings:text-secondary prose-h1:text-xl prose-h1:font-bold prose-p:max-w-full prose-p:text-pretty prose-p:break-words prose-p:text-lg prose-p:text-tertiary prose-a:text-secondary prose-a:underline prose-a:decoration-tertiary/30 prose-a:decoration-wavy prose-blockquote:border-secondary prose-strong:text-secondary prose-code:whitespace-pre-wrap prose-code:font-semibold prose-code:text-tertiary prose-code:before:content-none prose-code:after:content-none prose-pre:w-fit prose-pre:max-w-full prose-pre:border prose-pre:border-accent prose-pre:bg-accent/50 prose-pre:text-tertiary prose-li:text-tertiary prose-li:marker:text-secondary prose-img:max-h-[90vh] prose-img:w-auto prose-img:max-w-full prose-img:rounded prose-video:max-h-[95vh] prose-video:w-auto prose-video:max-w-full prose-video:rounded"
|
class="prose max-w-full prose-headings:text-secondary prose-h1:text-xl prose-h1:font-bold prose-p:max-w-full prose-p:text-pretty prose-p:break-words prose-p:text-lg prose-p:text-secondary prose-a:text-secondary prose-a:underline prose-a:decoration-tertiary prose-a:decoration-wavy prose-blockquote:border-secondary prose-strong:text-secondary prose-code:whitespace-pre-wrap prose-code:font-semibold prose-code:text-accent prose-code:before:content-none prose-code:after:content-none prose-pre:w-fit prose-pre:max-w-full prose-pre:border prose-pre:border-accent prose-pre:bg-primary prose-li:text-secondary prose-li:marker:text-secondary prose-img:max-h-[90vh] prose-img:w-auto prose-img:max-w-full prose-img:rounded prose-video:max-h-[90vh] prose-video:w-auto prose-video:max-w-full prose-video:rounded"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -33,7 +33,7 @@ const next = items[(index + 1) % items.length];
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
<a href={`/${prev.collection}/${prev.slug}`}>
|
<a href={`/${prev.collection}/${prev.slug}`}>
|
||||||
<p class="animate-reveal break-words text-2xl font-medium opacity-0">
|
<p class="animate-reveal break-words text-xl font-medium opacity-0">
|
||||||
{prev.data.title}
|
{prev.data.title}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
|
@ -42,7 +42,7 @@ const next = items[(index + 1) % items.length];
|
||||||
class="group flex w-fit flex-row items-center justify-between gap-6 self-end"
|
class="group flex w-fit flex-row items-center justify-between gap-6 self-end"
|
||||||
>
|
>
|
||||||
<a href={`/${next.collection}/${next.slug}`}>
|
<a href={`/${next.collection}/${next.slug}`}>
|
||||||
<p class="animate-reveal break-words text-2xl font-medium opacity-0">
|
<p class="animate-reveal break-words text-xl font-medium opacity-0">
|
||||||
{next.data.title}
|
{next.data.title}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
---
|
|
||||||
import { Image } from "astro:assets";
|
|
||||||
import FormattedDate from "@components/FormattedDate.astro";
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
collection: any;
|
|
||||||
};
|
|
||||||
|
|
||||||
const { collection } = Astro.props;
|
|
||||||
---
|
|
||||||
|
|
||||||
<article
|
|
||||||
class="group relative isolate mx-auto flex w-full flex-col justify-end overflow-hidden rounded-lg px-8 pb-8 pt-40"
|
|
||||||
>
|
|
||||||
<Image
|
|
||||||
src={collection.data.image.url}
|
|
||||||
alt={collection.data.image.alt}
|
|
||||||
title={collection.data.title}
|
|
||||||
loading="eager"
|
|
||||||
class="absolute inset-0 h-full w-full object-cover duration-300 ease-in-out group-hover:scale-105"
|
|
||||||
fit="cover"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-gradient-to-t from-black via-transparent to-transparent"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<a
|
|
||||||
class="absolute inset-0 z-20"
|
|
||||||
href={`/${collection.collection}/${collection.slug}`}
|
|
||||||
aria-label={collection.data.title}></a>
|
|
||||||
<h3
|
|
||||||
class="z-10 mt-3 w-fit text-xl font-medium text-primary dark:text-secondary"
|
|
||||||
>
|
|
||||||
{collection.data.title}
|
|
||||||
</h3>
|
|
||||||
<div
|
|
||||||
class="z-10 w-fit gap-y-1 overflow-hidden text-sm leading-6 text-tertiary"
|
|
||||||
>
|
|
||||||
{
|
|
||||||
collection.data.collection ? (
|
|
||||||
<span>
|
|
||||||
<FormattedDate date={collection.data.date} /> • Collection
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
<FormattedDate date={collection.data.date} />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</article>
|
|
|
@ -1,23 +0,0 @@
|
||||||
---
|
|
||||||
import Layout from "@layouts/Layout.astro";
|
|
||||||
import { SITE } from "@consts";
|
|
||||||
import Showcase from "@components/Showcase.astro";
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
content: any;
|
|
||||||
CONSTS: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { content, CONSTS } = Astro.props;
|
|
||||||
---
|
|
||||||
|
|
||||||
<Layout title={SITE.TITLE} description={CONSTS.DESCRIPTION}>
|
|
||||||
<h1 class="animate-reveal break-words text-4xl font-medium opacity-0">
|
|
||||||
{CONSTS.TITLE}
|
|
||||||
</h1>
|
|
||||||
<div
|
|
||||||
class="mt-16 grid animate-reveal grid-cols-1 gap-6 opacity-0 [animation-delay:0.1s] md:grid-cols-3 md:[&>*:nth-child(4n+2)]:col-span-2 md:[&>*:nth-child(4n+3)]:col-span-2 md:[&>*:only-child]:col-span-3"
|
|
||||||
>
|
|
||||||
{content.map((article: any) => <Showcase collection={article} />)}
|
|
||||||
</div>
|
|
||||||
</Layout>
|
|
28
src/components/ShowcasePost.astro
Normal file
28
src/components/ShowcasePost.astro
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
import FormattedDate from "@components/FormattedDate.astro";
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
collection: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
const { collection } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
class="bg-none hover:bg-tertiary/30"
|
||||||
|
href={`/${collection.collection}/${collection.slug}`}
|
||||||
|
>
|
||||||
|
<article class="flex flex-col">
|
||||||
|
<h3 class="mb-3 text-balance text-xl font-semibold">
|
||||||
|
<span title="Title" class="text-secondary">{collection.data.title}</span
|
||||||
|
><span title="Description" class="ml-2 text-tertiary"
|
||||||
|
>{collection.data.description}</span
|
||||||
|
>
|
||||||
|
</h3>
|
||||||
|
<time class="block text-sm text-accent"
|
||||||
|
><FormattedDate date={collection.data.date} /></time
|
||||||
|
>
|
||||||
|
</article>
|
||||||
|
</a>
|
||||||
|
</li>
|
51
src/components/ShowcaseProject.astro
Normal file
51
src/components/ShowcaseProject.astro
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
---
|
||||||
|
import { Image } from "astro:assets";
|
||||||
|
import FormattedDate from "@components/FormattedDate.astro";
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
collection: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
const { collection } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<article
|
||||||
|
class="group relative isolate mx-auto flex w-full flex-col justify-end overflow-hidden rounded-lg px-8 pb-8 pt-40"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src={collection.data.image.url}
|
||||||
|
alt={collection.data.image.alt}
|
||||||
|
title={collection.data.title}
|
||||||
|
loading="eager"
|
||||||
|
class="absolute inset-0 h-full w-full object-cover duration-300 ease-in-out group-hover:scale-105"
|
||||||
|
fit="cover"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="absolute inset-0 bg-gradient-to-t from-black via-transparent to-transparent"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<a
|
||||||
|
class="absolute inset-0 z-20"
|
||||||
|
href={`/${collection.collection}/${collection.slug}`}
|
||||||
|
aria-label={collection.data.title}></a>
|
||||||
|
<h3
|
||||||
|
class="z-10 mt-3 w-fit text-xl font-semibold text-primary dark:text-secondary"
|
||||||
|
>
|
||||||
|
{collection.data.title}
|
||||||
|
</h3>
|
||||||
|
<div
|
||||||
|
class="z-10 w-fit gap-y-1 overflow-hidden text-sm leading-6 text-accent"
|
||||||
|
>
|
||||||
|
{
|
||||||
|
collection.data.collection ? (
|
||||||
|
<span>
|
||||||
|
<FormattedDate date={collection.data.date} /> • Collection
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<FormattedDate date={collection.data.date} />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</li>
|
|
@ -14,8 +14,6 @@ categories: ["personal"]
|
||||||
includeHero: true
|
includeHero: true
|
||||||
---
|
---
|
||||||
|
|
||||||
> 1 Corinthians 15:26 - The last enemy to be destroyed is death.
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
_Final_
|
_Final_
|
||||||
|
|
|
@ -35,16 +35,6 @@ const { title, description, image, date, updated, tags } = Astro.props;
|
||||||
<slot />
|
<slot />
|
||||||
</SkinnyCenter>
|
</SkinnyCenter>
|
||||||
</main>
|
</main>
|
||||||
<div
|
|
||||||
class="fixed top-[-10px] z-40 h-5 w-screen bg-primary opacity-90 blur"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="fixed bottom-[-10px] z-40 h-5 w-screen bg-primary opacity-90 blur"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -14,7 +14,7 @@ import Prose from "@components/Prose.astro";
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-start justify-between gap-6 md:flex-row md:items-center"
|
class="flex flex-col items-start justify-between gap-6 md:flex-row md:items-center"
|
||||||
>
|
>
|
||||||
<h1 class="animate-reveal break-words text-4xl font-medium opacity-0">
|
<h1 class="animate-reveal break-words text-4xl font-semibold opacity-0">
|
||||||
Troy Lusty
|
Troy Lusty
|
||||||
</h1>
|
</h1>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -3,7 +3,8 @@ import Layout from "@layouts/Layout.astro";
|
||||||
import { HOME } from "@consts";
|
import { HOME } from "@consts";
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
import { Icon } from "astro-icon/components";
|
import { Icon } from "astro-icon/components";
|
||||||
import Showcase from "@components/Showcase.astro";
|
import ShowcaseProject from "@components/ShowcaseProject.astro";
|
||||||
|
import ShowcasePost from "@components/ShowcasePost.astro";
|
||||||
|
|
||||||
const posts = (await getCollection("posts"))
|
const posts = (await getCollection("posts"))
|
||||||
.filter((post) => !post.data.draft)
|
.filter((post) => !post.data.draft)
|
||||||
|
@ -21,7 +22,7 @@ const projects = (await getCollection("projects"))
|
||||||
<div class="group flex flex-row items-center justify-between gap-6">
|
<div class="group flex flex-row items-center justify-between gap-6">
|
||||||
<a href="/projects">
|
<a href="/projects">
|
||||||
<h2
|
<h2
|
||||||
class="animate-reveal break-words text-4xl font-medium opacity-0"
|
class="animate-reveal break-words text-4xl font-semibold opacity-0"
|
||||||
id="featured-projects"
|
id="featured-projects"
|
||||||
>
|
>
|
||||||
Featured projects
|
Featured projects
|
||||||
|
@ -38,17 +39,17 @@ const projects = (await getCollection("projects"))
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<ol
|
||||||
class="mt-16 grid animate-reveal grid-cols-1 gap-6 opacity-0 [animation-delay:0.1s] md:grid-cols-3 md:[&>*:nth-child(4n+2)]:col-span-2 md:[&>*:nth-child(4n+3)]:col-span-2 md:[&>*:only-child]:col-span-3"
|
class="mt-16 grid animate-reveal grid-cols-1 gap-6 opacity-0 [animation-delay:0.1s] md:grid-cols-3 md:[&>*:nth-child(4n+2)]:col-span-2 md:[&>*:nth-child(4n+3)]:col-span-2 md:[&>*:only-child]:col-span-3"
|
||||||
>
|
>
|
||||||
{projects.map((project) => <Showcase collection={project} />)}
|
{projects.map((project) => <ShowcaseProject collection={project} />)}
|
||||||
</div>
|
</ol>
|
||||||
</section>
|
</section>
|
||||||
<section aria-labelledby="recent-posts">
|
<section aria-labelledby="recent-posts">
|
||||||
<div class="group flex flex-row items-center justify-between gap-6">
|
<div class="group flex flex-row items-center justify-between gap-6">
|
||||||
<a href="/posts">
|
<a href="/posts">
|
||||||
<h2
|
<h2
|
||||||
class="animate-reveal break-words text-4xl font-medium opacity-0 [animation-delay:0.2s]"
|
class="animate-reveal break-words text-4xl font-semibold opacity-0 [animation-delay:0.2s]"
|
||||||
id="recent-posts"
|
id="recent-posts"
|
||||||
>
|
>
|
||||||
Recent posts
|
Recent posts
|
||||||
|
@ -65,10 +66,10 @@ const projects = (await getCollection("projects"))
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<ol
|
||||||
class="mt-16 grid animate-reveal grid-cols-1 gap-6 opacity-0 [animation-delay:0.3s] md:grid-cols-3 md:[&>*:nth-child(4n+2)]:col-span-2 md:[&>*:nth-child(4n+3)]:col-span-2 md:[&>*:only-child]:col-span-3"
|
class="mt-16 grid animate-reveal grid-cols-1 gap-6 opacity-0 [animation-delay:0.3s]"
|
||||||
>
|
>
|
||||||
{posts.map((post) => <Showcase collection={post} />)}
|
{posts.map((post) => <ShowcasePost collection={post} />)}
|
||||||
</div>
|
</ol>
|
||||||
</section>
|
</section>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
|
@ -1,11 +1,21 @@
|
||||||
---
|
---
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
import { POSTS } from "@consts";
|
import { SITE, POSTS } from "@consts";
|
||||||
import ShowcasePage from "@components/ShowcasePage.astro";
|
import ShowcasePost from "@components/ShowcasePost.astro";
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
|
||||||
const posts = (await getCollection("posts"))
|
const posts = (await getCollection("posts"))
|
||||||
.filter((post) => !post.data.draft)
|
.filter((post) => !post.data.draft)
|
||||||
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
|
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
|
||||||
---
|
---
|
||||||
|
|
||||||
<ShowcasePage content={posts} CONSTS={POSTS} />
|
<Layout title={SITE.TITLE} description={POSTS.DESCRIPTION}>
|
||||||
|
<h1 class="animate-reveal break-words text-4xl font-semibold opacity-0">
|
||||||
|
{POSTS.TITLE}
|
||||||
|
</h1>
|
||||||
|
<ol
|
||||||
|
class="mt-16 grid animate-reveal grid-cols-1 gap-6 opacity-0 [animation-delay:0.1s]"
|
||||||
|
>
|
||||||
|
{posts.map((article: any) => <ShowcasePost collection={article} />)}
|
||||||
|
</ol>
|
||||||
|
</Layout>
|
||||||
|
|
|
@ -1,11 +1,21 @@
|
||||||
---
|
---
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
import { PROJECTS } from "@consts";
|
import { PROJECTS, SITE } from "@consts";
|
||||||
import ShowcasePage from "@components/ShowcasePage.astro";
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import ShowcaseProject from "@components/ShowcaseProject.astro";
|
||||||
|
|
||||||
const projects = (await getCollection("projects"))
|
const projects = (await getCollection("projects"))
|
||||||
.filter((project) => !project.data.draft)
|
.filter((project) => !project.data.draft)
|
||||||
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
|
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
|
||||||
---
|
---
|
||||||
|
|
||||||
<ShowcasePage content={projects} CONSTS={PROJECTS} />
|
<Layout title={SITE.TITLE} description={PROJECTS.DESCRIPTION}>
|
||||||
|
<h1 class="animate-reveal break-words text-4xl font-semibold opacity-0">
|
||||||
|
{PROJECTS.TITLE}
|
||||||
|
</h1>
|
||||||
|
<ol
|
||||||
|
class="mt-16 grid animate-reveal grid-cols-1 gap-6 opacity-0 [animation-delay:0.1s] md:grid-cols-3 md:[&>*:nth-child(4n+2)]:col-span-2 md:[&>*:nth-child(4n+3)]:col-span-2 md:[&>*:only-child]:col-span-3"
|
||||||
|
>
|
||||||
|
{projects.map((article: any) => <ShowcaseProject collection={article} />)}
|
||||||
|
</ol>
|
||||||
|
</Layout>
|
||||||
|
|
|
@ -7,17 +7,17 @@
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
:root {
|
:root {
|
||||||
--primary: 60deg 3.03% 93.53%;
|
--primary: 0deg 0% 99%;
|
||||||
--secondary: 60deg 5.56% 7.06%;
|
--secondary: 0deg 0% 13%;
|
||||||
--tertiary: 45deg 5.13% 30.59%;
|
--tertiary: 0deg 0% 51%;
|
||||||
--accent: 60deg 2.44% 83.92%;
|
--accent: 0deg 0% 39%;
|
||||||
}
|
}
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
--primary: 60deg 3.03% 6.47%;
|
--primary: 0deg 0% 0%;
|
||||||
--secondary: 60deg 5.56% 92.94%;
|
--secondary: 0deg 0% 93%;
|
||||||
--tertiary: 45deg 5.13% 69.41%;
|
--tertiary: 0deg 0% 45%;
|
||||||
--accent: 60deg 2.44% 16.08%;
|
--accent: 0deg 0% 71%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue