Compare commits
17 Commits
2.25.0
...
d45dec0ba5
| Author | SHA1 | Date | |
|---|---|---|---|
|
d45dec0ba5
|
|||
| c92fb72a73 | |||
|
5da828f5a7
|
|||
| f30f5cf933 | |||
|
48231fc441
|
|||
| d42ba08041 | |||
| fa618b0524 | |||
| 0a17e3b8af | |||
| 341453510f | |||
| c9cb15f201 | |||
| 74e9aff4cc | |||
|
d48d61ce91
|
|||
| 68f179456a | |||
| 568220d39c | |||
| 9dfcf6f006 | |||
| 62886ba2b3 | |||
|
90bc982371
|
@@ -28,9 +28,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.6",
|
||||
"@astrojs/node": "^9.5.4",
|
||||
"@astrojs/node": "^10.0.0",
|
||||
"@astrojs/partytown": "^2.1.4",
|
||||
"@astrojs/react": "^4.4.2",
|
||||
"@astrojs/react": "^5.0.0",
|
||||
"@astrojs/rss": "^4.0.15",
|
||||
"@astrojs/sitemap": "^3.7.0",
|
||||
"@directus/sdk": "^21.2.0",
|
||||
@@ -44,7 +44,7 @@
|
||||
"@tailwindcss/vite": "^4.2.1",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/unist": "^3.0.3",
|
||||
"astro": "^5.18.0",
|
||||
"astro": "^6.0.0",
|
||||
"astro-icon": "^1.1.5",
|
||||
"marked": "^17.0.4",
|
||||
"marked-shiki": "^1.2.1",
|
||||
|
||||
680
pnpm-lock.yaml
generated
680
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -16,13 +16,13 @@ const { post } = Astro.props;
|
||||
|
||||
<div class="smooth-reveal-cards group flex flex-col">
|
||||
<a
|
||||
class="card-base border-none!"
|
||||
class="card-base border-none! h-full flex flex-col"
|
||||
href={`/blog/${post.slug}/`}
|
||||
data-astro-prefetch
|
||||
>
|
||||
<div class="relative shrink-0 rounded-t-xl w-full overflow-hidden before:absolute before:inset-x-0 before:z-1 before:size-full">
|
||||
<Image
|
||||
class="rounded-t-xl h-auto w-full"
|
||||
class="rounded-t-xl h-64 w-full object-cover"
|
||||
src={getDirectusImageURL(post.image)}
|
||||
alt={post.image_alt}
|
||||
draggable="false"
|
||||
@@ -31,11 +31,11 @@ const { post } = Astro.props;
|
||||
inferSize={true}
|
||||
/>
|
||||
</div>
|
||||
<div class="rounded-xl p-4 md:p-5">
|
||||
<div class="rounded-xl p-4 md:p-5 flex flex-col flex-1">
|
||||
<h3 class="card-text-title text-xl">
|
||||
{post.title}
|
||||
</h3>
|
||||
<div class="ml-6 flex">
|
||||
<div class="ml-6 flex mt-auto">
|
||||
<div class="relative inline-block w-full">
|
||||
<div class="card-text-title card-hover-text-title flex relative items-center mx-auto min-h-11 sm:mx-0 sm:mt-4">
|
||||
<span class="relative inline-block overflow-hidden ml-2">
|
||||
|
||||
@@ -42,7 +42,7 @@ const { title, subTitle, url, pubDate, img, imgAlt } = Astro.props;
|
||||
<p class="card-text-title font-light text-pretty sm:text-lg max-w-prose mb-8">
|
||||
{subTitle}
|
||||
</p>
|
||||
<div class="flex items-center justify-between w-full">
|
||||
<div class="card-text-title flex items-center justify-between w-full">
|
||||
<div class="button-base button-bg-teal inline-flex rounded-lg gap-x-2">
|
||||
<div class="button-text-title flex relative items-center text-center">
|
||||
<span class="mr-2">
|
||||
|
||||
@@ -32,7 +32,7 @@ const { title, subTitle, url, pubDate, imgOne, imgOneAlt, imgTwo, imgTwoAlt } =
|
||||
<p class="card-text-title font-light text-pretty sm:text-lg max-w-prose mb-8">
|
||||
{subTitle}
|
||||
</p>
|
||||
<div class="flex items-center justify-between w-full">
|
||||
<div class="card-text-title flex items-center justify-between w-full">
|
||||
<div class="button-base button-bg-teal inline-flex rounded-lg gap-x-2">
|
||||
<div class="button-text-title flex relative items-center text-center">
|
||||
<span class="mr-2">
|
||||
|
||||
@@ -15,7 +15,7 @@ interface Props {
|
||||
const { url, title, description, logoLight, logoDark, count, publishDate } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="smooth-reveal flex flex-col mx-auto w-full">
|
||||
<div class="smooth-reveal-cards flex flex-col mx-auto w-full">
|
||||
<a
|
||||
class="card-base flex flex-col h-full min-h-55"
|
||||
href={url}
|
||||
|
||||
55
src/components/cards/LargeLinkCard.astro
Normal file
55
src/components/cards/LargeLinkCard.astro
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
import { Icon } from 'astro-icon/components';
|
||||
|
||||
import Logo from '@components/images/Logo.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
subTitle: string;
|
||||
url: string;
|
||||
logoLight: string;
|
||||
logoDark?: string;
|
||||
}
|
||||
|
||||
const { title, subTitle, url, logoLight, logoDark} = Astro.props;
|
||||
---
|
||||
|
||||
<div class="smooth-reveal w-full mx-auto">
|
||||
<a
|
||||
class="card-base group flex flex-row items-center justify-between w-full p-8 gap-6 md:gap-8"
|
||||
href={url}
|
||||
data-astro-prefetch
|
||||
>
|
||||
<div class="flex flex-row items-center ml-4">
|
||||
<div class="card-hover-icon-scale shrink-0 mr-3">
|
||||
<Logo
|
||||
srcLight={getDirectusImageURL(logoLight)}
|
||||
srcDark={getDirectusImageURL(logoDark!)}
|
||||
alt={`Logo of ${title}`}
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col gap-3 text-left ml-4">
|
||||
<h2 class="card-text-header text-2xl md:text-3xl">
|
||||
{title}
|
||||
</h2>
|
||||
<p class="card-text-title font-light text-pretty text-lg max-w-3xl">
|
||||
{subTitle}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden md:block shrink-0 mr-4">
|
||||
<div class="button-base button-bg-teal inline-flex rounded-lg gap-x-2">
|
||||
<div class="button-text-title flex relative items-center text-center">
|
||||
<span class="mr-2">
|
||||
Read More
|
||||
</span>
|
||||
<Icon
|
||||
name="mdi:keyboard-arrow-right"
|
||||
class="button-hover-arrow"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -19,8 +19,8 @@ const posts = await directus.request(
|
||||
<section class:list={['mx-auto px-4 py-10 sm:px-6 lg:px-8 lg:py-14 lg:pt-10 2xl:max-w-full', Astro.props.className]}>
|
||||
<div class="grid grid-cols-1">
|
||||
<LargeCategoryCard
|
||||
title="All Categories"
|
||||
description="Here you can forgoe the organization and just look at everything I have posted"
|
||||
title="All Posts"
|
||||
description="Here you can forgoe the organization and browse everything I've posted"
|
||||
url="/all"
|
||||
logoLight={global.all_logoLight}
|
||||
logoDark={global.all_logoDark}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
---
|
||||
import { readSingleton } from '@directus/sdk';
|
||||
|
||||
import LargeInvisibleCard from '@components/cards/LargeInvisibleCard.astro';
|
||||
import LargeLinkCard from '@components/cards/LargeLinkCard.astro';
|
||||
import directus from '@lib/directus';
|
||||
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
---
|
||||
|
||||
<section class:list={['mx-auto px-4 py-10 sm:px-6 lg:px-8 lg:py-14 lg:pt-10 2xl:max-w-full', Astro.props.className]}>
|
||||
<section class:list={['mx-auto px-4 pb-10 sm:px-6 lg:px-8 lg:pb-14 2xl:max-w-full', Astro.props.className]}>
|
||||
<div class="grid grid-cols-1">
|
||||
<LargeInvisibleCard
|
||||
<LargeLinkCard
|
||||
title="All Posts"
|
||||
subTitle="Browse all articles from every category"
|
||||
subTitle="Catch up on everything I've written so far here"
|
||||
url="/all"
|
||||
img={global.all_image}
|
||||
imgAlt={global.all_image_alt}
|
||||
logoLight={global.all_logoLight}
|
||||
logoDark={global.all_logoDark}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
---
|
||||
import { Image } from 'astro:assets';
|
||||
import { readItems } from '@directus/sdk';
|
||||
|
||||
import type { HeaderImage } from '@lib/directusTypes';
|
||||
|
||||
import GoLinkPrimaryButton from '@components/buttons/GoLinkPrimaryButton.astro';
|
||||
import GoLinkSecondaryButton from '@components/buttons/GoLinkSecondaryButton.astro';
|
||||
import directus from '@lib/directus';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
@@ -11,18 +16,24 @@ interface Props {
|
||||
primaryBtnURL?: string;
|
||||
secondaryBtn?: string;
|
||||
secondaryBtnURL?: string;
|
||||
src?: any;
|
||||
alt?: string;
|
||||
rounded?: boolean;
|
||||
}
|
||||
|
||||
const { title, subTitle, primaryBtn, primaryBtnURL, secondaryBtn, secondaryBtnURL, src, alt } = Astro.props;
|
||||
const { title, subTitle, primaryBtn, primaryBtnURL, secondaryBtn, secondaryBtnURL } = Astro.props;
|
||||
|
||||
const roundedClasses = Astro.props.rounded ? "rounded-2xl" : null;
|
||||
const imagesData = ((await directus.request(
|
||||
readItems('header_images', {
|
||||
fields: ['*'],
|
||||
})
|
||||
)) as unknown) as HeaderImage[];
|
||||
|
||||
const images = await Promise.all(imagesData.map(async (img) => ({
|
||||
...img,
|
||||
src: await getDirectusImageURL(img.image)
|
||||
})));
|
||||
---
|
||||
|
||||
<section class="mx-auto grid max-w-340 gap-4 px-4 py-14 sm:px-6 md:grid-cols-2 md:items-center md:gap-8 lg:px-8 2xl:max-w-full">
|
||||
<div>
|
||||
<section class="grid md:grid-cols-2 md:items-center gap-4 md:gap-8 max-w-340 2xl:max-w-full px-4 py-14 sm:px-6 lg:px-8">
|
||||
<div class="md:ml-12">
|
||||
<h1 class="smooth-reveal card-text-header block lg:text-7xl">
|
||||
<Fragment set:html={title} />
|
||||
</h1>
|
||||
@@ -36,22 +47,54 @@ const roundedClasses = Astro.props.rounded ? "rounded-2xl" : null;
|
||||
{secondaryBtn && <GoLinkSecondaryButton title={secondaryBtn} url={secondaryBtnURL} />}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="smooth-reveal-fade md:block w-full hidden">
|
||||
<div class="flex justify-center w-full top-12 md:ml-4 overflow-hidden">
|
||||
{src && alt && (
|
||||
<Image
|
||||
src={src}
|
||||
alt={alt}
|
||||
class={`h-full w-105 scale-100 object-cover object-center ${roundedClasses}`}
|
||||
draggable="false"
|
||||
loading="eager"
|
||||
format="webp"
|
||||
quality="low"
|
||||
widths={[840]}
|
||||
inferSize={true}
|
||||
/>
|
||||
)}
|
||||
<div class="smooth-reveal-fade md:block w-full hidden md:mr-12">
|
||||
<div
|
||||
class="flex justify-center w-full top-12 md:ml-4 overflow-hidden no-js-fallback"
|
||||
id="hero-image-container"
|
||||
>
|
||||
{images.map((img, index) => (
|
||||
<div
|
||||
class="hero-image hidden justify-center w-full h-full"
|
||||
data-index={index}
|
||||
>
|
||||
<Image
|
||||
class="h-full w-105 scale-100 object-cover object-center"
|
||||
src={img.src}
|
||||
alt={img.image_alt}
|
||||
draggable="false"
|
||||
loading="eager"
|
||||
format="webp"
|
||||
widths={[840]}
|
||||
inferSize={true}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<style>
|
||||
.no-js-fallback .hero-image:first-child {
|
||||
display: flex !important;
|
||||
}
|
||||
</style>
|
||||
<script is:inline>
|
||||
document.getElementById('hero-image-container')?.classList.remove('no-js-fallback');
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
document.addEventListener('astro:page-load', () => {
|
||||
const container = document.getElementById('hero-image-container');
|
||||
if (container) {
|
||||
const images = container.querySelectorAll('.hero-image');
|
||||
images.forEach(img => {
|
||||
img.classList.remove('flex');
|
||||
img.classList.add('hidden');
|
||||
});
|
||||
if (images.length > 0) {
|
||||
const randomIndex = Math.floor(Math.random() * images.length);
|
||||
images[randomIndex].classList.remove('hidden');
|
||||
images[randomIndex].classList.add('flex');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -23,11 +23,9 @@ const { posts, title, subTitle } = Astro.props;
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns-1 sm:columns-2 lg:columns-3 gap-6">
|
||||
{posts.map((b) => (
|
||||
<div class="break-inside-avoid mb-6">
|
||||
<BlogCard post={b} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{posts.map((b) =>
|
||||
<BlogCard post={b} />
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -20,7 +20,7 @@ const { forecastDays, error } = await getFiveDayForecast(latitude, longitude, ti
|
||||
</div>
|
||||
{error ? (
|
||||
<div class="card-base p-10 text-accent text-center">
|
||||
{error}
|
||||
Sorry, {error.toLowerCase}
|
||||
</div>
|
||||
) : (
|
||||
<div class="flex flex-wrap justify-center gap-4 lg:gap-6">
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 13 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.8 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.5 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB |
@@ -5,6 +5,7 @@ import type {
|
||||
Weather,
|
||||
Post,
|
||||
Category,
|
||||
HeaderImage,
|
||||
Application,
|
||||
Experience,
|
||||
Education,
|
||||
@@ -20,6 +21,7 @@ type Schema = {
|
||||
site_weather: Weather;
|
||||
posts: Post[];
|
||||
categories: Category[];
|
||||
header_images: HeaderImage[];
|
||||
site_applications: Application;
|
||||
site_experience: Experience;
|
||||
site_education: Education;
|
||||
|
||||
@@ -10,20 +10,10 @@ export type Global = {
|
||||
site_url: string;
|
||||
rybbit_site_id: string;
|
||||
logo: string;
|
||||
portrait: string;
|
||||
portrait_alt: string;
|
||||
home_image: string;
|
||||
home_image_alt: string;
|
||||
all_image: string;
|
||||
all_image_alt: string;
|
||||
all_logoLight: string;
|
||||
all_logoDark: string;
|
||||
blog_image: string;
|
||||
blog_image_alt: string;
|
||||
categories_image: string;
|
||||
categories_image_alt: string;
|
||||
applications_image: string;
|
||||
applications_image_alt: string;
|
||||
portrait: string;
|
||||
portrait_alt: string;
|
||||
footer_image: string;
|
||||
footer_image_alt: string;
|
||||
};
|
||||
@@ -61,6 +51,12 @@ export type Category = {
|
||||
logoDark: string;
|
||||
};
|
||||
|
||||
export type HeaderImage = {
|
||||
id: string;
|
||||
image: string;
|
||||
image_alt: string;
|
||||
};
|
||||
|
||||
export type Application = {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
@@ -9,8 +9,6 @@ import SkillsSliderSection from '@components/sections/SkillsSliderSection.astro'
|
||||
import BaseLayout from '@layouts/BaseLayout.astro';
|
||||
import directus from '@lib/directus';
|
||||
|
||||
import portraitImg from '@images/portrait.avif';
|
||||
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
---
|
||||
|
||||
@@ -37,9 +35,6 @@ const global = await directus.request(readSingleton('site_global'));
|
||||
<HeroSection
|
||||
title="About Me"
|
||||
subTitle={global.about}
|
||||
src={portraitImg}
|
||||
alt={global.portrait_alt}
|
||||
rounded={true}
|
||||
/>
|
||||
|
||||
<section class="max-w-7xl px-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto">
|
||||
|
||||
@@ -37,18 +37,16 @@ const posts = await directus.request(
|
||||
|
||||
<HeaderSection
|
||||
title="All Posts"
|
||||
subTitle="Browse all articles from every category."
|
||||
subTitle="Browse all posts from every category."
|
||||
btnExists
|
||||
btnTitle="To Categories"
|
||||
btnURL="/categories"
|
||||
/>
|
||||
|
||||
<section class="max-w-340 2xl:max-w-full mb-10 px-4 sm:px-6 lg:px-8 py-8 mx-auto mt-10">
|
||||
<div class="columns-1 sm:columns-2 lg:columns-3 gap-6">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{posts.map((b) =>
|
||||
<div class="break-inside-avoid mb-6">
|
||||
<BlogCard post={b} />
|
||||
</div>
|
||||
<BlogCard post={b} />
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -6,8 +6,6 @@ import ApplicationSection from '@components/sections/ApplicationSection.astro';
|
||||
import BaseLayout from '@layouts/BaseLayout.astro';
|
||||
import directus from '@lib/directus';
|
||||
|
||||
import applicationImg from '@images/cedar_tree.png';
|
||||
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
---
|
||||
|
||||
@@ -34,8 +32,6 @@ const global = await directus.request(readSingleton('site_global'));
|
||||
<HeroSection
|
||||
title="Applications"
|
||||
subTitle={global.about_applications}
|
||||
src={applicationImg}
|
||||
alt={global.applications_image_alt}
|
||||
/>
|
||||
|
||||
<ApplicationSection className="smooth-reveal-2" />
|
||||
|
||||
@@ -10,8 +10,6 @@ import AllPostsSection from '@components/sections/AllPostsSection.astro';
|
||||
import BaseLayout from '@layouts/BaseLayout.astro';
|
||||
import directus from '@lib/directus';
|
||||
|
||||
import blogImg from '@images/autumn_tree.png';
|
||||
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
const posts = await directus.request(
|
||||
readItems('posts', {
|
||||
@@ -50,8 +48,6 @@ const recentPosts: Post[] = posts.filter(
|
||||
<HeroSection
|
||||
title="Blog"
|
||||
subTitle={global.about_blog}
|
||||
src={blogImg}
|
||||
alt={global.blog_image_alt}
|
||||
/>
|
||||
|
||||
<SelectedPostsSection posts={selectedPosts} />
|
||||
|
||||
@@ -7,8 +7,6 @@ import AllCategoriesSection from '@components/sections/AllCategoriesSection.astr
|
||||
import BaseLayout from '@layouts/BaseLayout.astro';
|
||||
import directus from '@lib/directus';
|
||||
|
||||
import categoryImg from '@images/autumn_bench.png';
|
||||
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
---
|
||||
|
||||
@@ -35,8 +33,6 @@ const global = await directus.request(readSingleton('site_global'));
|
||||
<HeroSection
|
||||
title="Categories"
|
||||
subTitle={global.about_categories}
|
||||
src={categoryImg}
|
||||
alt={global.categories_image_alt}
|
||||
/>
|
||||
|
||||
<CategorySection />
|
||||
|
||||
@@ -12,8 +12,6 @@ import GiteaSection from '@components/sections/GiteaSection.astro';
|
||||
import BaseLayout from '@layouts/BaseLayout.astro';
|
||||
import directus from '@lib/directus';
|
||||
|
||||
import homeImg from '@images/autumn_mountain.png';
|
||||
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
const weather = await directus.request(readSingleton('site_weather'));
|
||||
const posts = await directus.request(
|
||||
@@ -54,8 +52,6 @@ const recentPosts = posts
|
||||
subTitle={global.about_description}
|
||||
primaryBtn="About Me"
|
||||
primaryBtnURL="/about"
|
||||
src={homeImg}
|
||||
alt={global.home_image_alt}
|
||||
/>
|
||||
|
||||
<FeatureSection />
|
||||
|
||||
Reference in New Issue
Block a user