80 lines
2 KiB
Text
80 lines
2 KiB
Text
---
|
|
import Layout from '../layouts/Layout.astro'
|
|
import Footer from '../components/Footer.astro'
|
|
import Posts from '../components/Posts.astro'
|
|
import now from '../constants/now.json'
|
|
import { dirname, resolve } from 'pathe'
|
|
import { readFileSync } from 'node:fs'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { mdToHTML } from '../../commands/md-to-html'
|
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const __dirname = dirname(__filename)
|
|
const nowMdPath = resolve(__dirname, '../constants/now.md')
|
|
const nowContent = readFileSync(nowMdPath, 'utf-8')
|
|
const nowHtml = await mdToHTML(nowContent)
|
|
|
|
const posts = await Astro.glob('./now/and-then/posts/*.astro')
|
|
---
|
|
|
|
<Layout title="Now" description="What is Ayo Ayco currently up to?">
|
|
<main>
|
|
<h1><span class="text-gradient">Now: {now.title}</span></h1>
|
|
<p>
|
|
<em
|
|
>Published on <time datetime="{now.publishDate}"
|
|
>{now.publishedOn ?? now.publishDate}</time
|
|
>
|
|
{now.publishState}</em
|
|
>
|
|
</p>
|
|
|
|
<Fragment set:html={nowHtml} />
|
|
|
|
<Posts posts={posts} title="Previously..." />
|
|
<hr />
|
|
<em><a href="https://nownownow.com/about">About now pages</a></em>
|
|
<Footer />
|
|
</main>
|
|
</Layout>
|
|
|
|
<style>
|
|
main {
|
|
margin: auto;
|
|
padding: 1em;
|
|
max-width: var(--content-width);
|
|
}
|
|
|
|
.text-gradient {
|
|
font-weight: 900;
|
|
background-image: var(--ayo-gradient);
|
|
animation: pulse 4s ease-in-out infinite;
|
|
background-size: 500% 500%;
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-size: 100% 200%;
|
|
background-position-y: 100%;
|
|
border-radius: 0.4rem;
|
|
}
|
|
|
|
.highlighted-content {
|
|
margin: 1rem 0;
|
|
background: #4f39fa;
|
|
padding: 1rem;
|
|
border-radius: 0.4rem;
|
|
color: var(--color-bg);
|
|
}
|
|
|
|
.highlighted-content code {
|
|
font-size: var(--font-size-base);
|
|
border: 0.1em solid var(--color-border);
|
|
border-radius: 4px;
|
|
padding: 0.15em 0.25em;
|
|
}
|
|
|
|
.link-card-grid {
|
|
display: grid;
|
|
gap: 1rem;
|
|
padding: 0;
|
|
}
|
|
</style>
|