initial Previously index page
This commit is contained in:
parent
49580b3fb3
commit
98c27fc5c4
5 changed files with 76 additions and 10 deletions
|
@ -1,11 +1,12 @@
|
|||
---
|
||||
export interface Props {
|
||||
url: string;
|
||||
text?: string;
|
||||
}
|
||||
const { url } = Astro.props;
|
||||
const { text = "Back", url } = Astro.props;
|
||||
---
|
||||
|
||||
<nav><a class="back-link" href={url}>← Back</a></nav>
|
||||
<nav><a class="back-link" href={url}>← {text}</a></nav>
|
||||
|
||||
<style>
|
||||
nav {
|
||||
|
|
|
@ -3,21 +3,21 @@ import type { AstroInstance } from "astro";
|
|||
|
||||
export interface Props {
|
||||
posts: AstroInstance[];
|
||||
title: string;
|
||||
title?: string;
|
||||
}
|
||||
const { title, posts } = Astro.props;
|
||||
const postUrls: string[] = posts.map((post) => post.url || "");
|
||||
---
|
||||
|
||||
<h2>{title}</h2>
|
||||
{title ? <h2>{title}</h2> : ""}
|
||||
<ul>
|
||||
{
|
||||
postUrls
|
||||
.filter((url) => url !== "")
|
||||
.map((url) => (
|
||||
<li>
|
||||
<a href={url} title={url?.replace("/now/and-then/", "")}>
|
||||
{url?.replace("/now/and-then/", "")}
|
||||
<a href={url} title={url?.replace("/now/and-then/posts/", "")}>
|
||||
{url?.replace("/now/and-then/posts/", "")}
|
||||
</a>
|
||||
</li>
|
||||
))
|
||||
|
|
65
src/pages/now/and-then/index.astro
Normal file
65
src/pages/now/and-then/index.astro
Normal file
|
@ -0,0 +1,65 @@
|
|||
---
|
||||
import Layout from "../../../layouts/Layout.astro";
|
||||
import Footer from "../../../components/Footer.astro";
|
||||
import Back from "../../../components/Back.astro";
|
||||
import Posts from "../../../components/Posts.astro";
|
||||
|
||||
const posts = await Astro.glob("./posts/*.astro");
|
||||
const title = "Previously...";
|
||||
---
|
||||
|
||||
<Layout title={title} description="What Ayo Ayco have been up to?">
|
||||
<main>
|
||||
<Back text="Home" url="/" />
|
||||
<h1><span class="text-gradient">{title}</span></h1>
|
||||
<em>What have I been up to?</em>
|
||||
<Posts posts={posts} />
|
||||
<Footer />
|
||||
</main>
|
||||
</Layout>
|
||||
|
||||
<style>
|
||||
h1 {
|
||||
margin: 2rem 0;
|
||||
}
|
||||
|
||||
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 {
|
||||
line-height: 1.6;
|
||||
margin: 1rem 0;
|
||||
background: #4f39fa;
|
||||
padding: 1rem;
|
||||
border-radius: 0.4rem;
|
||||
color: var(--color-bg);
|
||||
}
|
||||
|
||||
.highlighted-content code {
|
||||
font-size: 0.875em;
|
||||
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>
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
import Layout from "../../../layouts/Layout.astro";
|
||||
import Footer from "../../../components/Footer.astro";
|
||||
import Back from "../../../components/Back.astro";
|
||||
import Layout from "../../../../layouts/Layout.astro";
|
||||
import Footer from "../../../../components/Footer.astro";
|
||||
import Back from "../../../../components/Back.astro";
|
||||
const title = "Settling in The Netherlands";
|
||||
const description =
|
||||
"This year (2022) I have moved to The Netherlands with my family; specifically to the northern area of Amsterdam.";
|
|
@ -4,7 +4,7 @@ import Footer from "../../components/Footer.astro";
|
|||
import Back from "../../components/Back.astro";
|
||||
import Posts from "../../components/Posts.astro";
|
||||
|
||||
const posts = await Astro.glob("./and-then/*.astro");
|
||||
const posts = await Astro.glob("./and-then/posts/*.astro");
|
||||
---
|
||||
|
||||
<Layout title="Now" description="What is Ayo Ayco currently up to?">
|
||||
|
|
Loading…
Reference in a new issue