Playing around with options for base structure and navigation

This commit is contained in:
2025-07-03 23:50:20 -07:00
parent 65e05066ea
commit d515e581b5
26 changed files with 1075 additions and 398 deletions

View File

@@ -1,59 +1,9 @@
---
import {getCollection} from 'astro:content';
import BaseLayout from "../layouts/BaseLayout.astro";
import BaseLayout from '../layouts/BaseLayout.astro';
import {Image} from 'astro:assets';
const experiences = await getCollection('experiences');
const projects = await getCollection('projects');
const hobbies = await getCollection('hobbies');
import headshot from "../assets/headshot.png";
---
<BaseLayout>
<h1>My Experiences</h1>
<ul>
{experiences.map(experience => (
<li><a href={`/experience/${experience.id}`}>{experience.id}</a></li>
))}
</ul>
<h1>My Projects</h1>
<ul>
{projects.map(project => (
<li><a href={`/project/${project.id}`}>{project.id}</a></li>
))}
</ul>
<h1>My Hobbies</h1>
<ul>
{hobbies.map(project => (
<li><a href={`/hobby/${project.id}`}>{project.id}</a></li>
))}
</ul>
</BaseLayout>
<!--import { getCollection, render } from 'astro:content';-->
<!--import type { CollectionEntry } from 'astro:content';-->
<!--// 1. Generate a new path for every collection entry-->
<!--export async function getStaticPaths() {-->
<!-- const project = await getCollection('project');-->
<!-- console.log(project)-->
<!-- return project.map(post => ({-->
<!-- params: { slug: post.slug }, props: { post },-->
<!-- }));-->
<!--}-->
<!--// 2. For your template, you can get the entry directly from the prop-->
<!--const { post } = Astro.props;-->
<!--const { Content } = await render(post);-->
<!--// const { Content } = await entry.render();-->
<!-- -&#45;&#45;-->
<!--<BaseLayout pageTitle="">-->
<!--&lt;!&ndash; <Baseout pageTitle={entry.data.title}>&ndash;&gt;-->
<!--&lt;!&ndash; <h1 class="text-2xl font-bold pt-10">{entry.data.title}</h1>&ndash;&gt;-->
<!--&lt;!&ndash; <p class="text-sm py-2">{entry.data.date}</p>&ndash;&gt;-->
<!--&lt;!&ndash; <h2 class="font-bold py-2">Tags</h2>&ndash;&gt;-->
<!--&lt;!&ndash; &lt;!&ndash;<ul class="list-disc list-inside py-2">&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash; &lt;!&ndash; {entry.data.tags?.map((tag) => <li><a href={`/tags/${tag}`}>{tag}</a></li>)}&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash; &lt;!&ndash;</ul>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash; <div class="prose">&ndash;&gt;-->
<!--&lt;!&ndash; &lt;!&ndash;<Content />&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash; </div>&ndash;&gt;-->
<Image class="mx-auto block" src={headshot} alt="headshot" loading="eager"/>
</BaseLayout>