Compare commits
23 Commits
6dd2209e21
...
2.18.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 62066c6f3b | |||
| 97b1fa0316 | |||
| 7f31880b51 | |||
| ddbcb33812 | |||
| 4e9ca2759a | |||
|
eae55da29d
|
|||
| b40a58a4e0 | |||
|
157a7bcdc5
|
|||
| 469d9ba3f7 | |||
| 8c5488fad5 | |||
| eff067a743 | |||
|
da28e5b50e
|
|||
| f376f2e1e4 | |||
|
a1cfa4ef24
|
|||
| cc5e975ea6 | |||
| ea15224eae | |||
| d19433ae4e | |||
| 7498870d92 | |||
| d7d43369dc | |||
| 5b94283498 | |||
| 4c1da43c68 | |||
| 6cddae61ed | |||
| 890dbdf313 |
@@ -22,7 +22,7 @@ WORKDIR /app
|
||||
COPY --from=prod-deps /app/node_modules /app/node_modules
|
||||
COPY --from=build /app/dist /app/dist
|
||||
|
||||
LABEL version="2.16.0"
|
||||
LABEL version="2.18.1"
|
||||
LABEL description="Astro based personal website"
|
||||
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
Personal site used for information about myself and blog.
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
With dependencies installed, you can utilize the following npm scripts to manage your project's development lifecycle:
|
||||
@@ -12,9 +13,13 @@ With dependencies installed, you can utilize the following npm scripts to manage
|
||||
|
||||
For detailed help with Astro CLI commands, visit [Astro's documentation](https://docs.astro.build/en/reference/cli-reference/).
|
||||
|
||||
|
||||
## Thanks
|
||||
|
||||
Thanks https://github.com/godruoyi/gblog/tree/gblog-template, https://github.com/mearashadowfax/ScrewFast,
|
||||
Based the site on: [gblog-template](https://github.com/godruoyi/gblog/tree/gblog-template) and [ScrewFast](https://github.com/mearashadowfax/ScrewFast)
|
||||
|
||||
Using Icons from [Icons8](https://icons8.com/)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "site-profile",
|
||||
"type": "module",
|
||||
"version": "2.16.0",
|
||||
"version": "2.18.1",
|
||||
"homepage": "https://www.alexlebens.dev",
|
||||
"bugs": {
|
||||
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",
|
||||
@@ -37,7 +37,7 @@
|
||||
"@giscus/react": "^3.1.0",
|
||||
"@iconify-json/mdi": "^1.2.3",
|
||||
"@iconify-json/pajamas": "^1.2.15",
|
||||
"@iconify-json/simple-icons": "^1.2.71",
|
||||
"@iconify-json/simple-icons": "^1.2.72",
|
||||
"@playform/compress": "^0.2.1",
|
||||
"@swup/astro": "^1.8.0",
|
||||
"@tailwindcss/postcss": "^4.2.1",
|
||||
@@ -49,13 +49,13 @@
|
||||
"marked": "^17.0.3",
|
||||
"marked-shiki": "^1.2.1",
|
||||
"mdast-util-to-string": "^4.0.0",
|
||||
"preline": "^4.1.1",
|
||||
"preline": "^4.1.2",
|
||||
"react": "^19.2.4",
|
||||
"react-dom": "^19.2.4",
|
||||
"reading-time": "^1.5.0",
|
||||
"sharp": "^0.34.5",
|
||||
"sharp-ico": "^0.1.5",
|
||||
"shiki": "^3.23.0",
|
||||
"shiki": "^4.0.1",
|
||||
"tailwindcss": "^4.2.1",
|
||||
"ultrahtml": "^1.6.0"
|
||||
},
|
||||
|
||||
549
pnpm-lock.yaml
generated
549
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,18 @@
|
||||
---
|
||||
import Logo from '@components/images/Logo.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
|
||||
interface Props {
|
||||
slug: string;
|
||||
title: string;
|
||||
description: string;
|
||||
logoLight: string;
|
||||
logoDark?: string;
|
||||
count: number;
|
||||
publishDate: string;
|
||||
}
|
||||
|
||||
const { slug, title, description, count, publishDate } = Astro.props;
|
||||
const { slug, title, description, logoLight, logoDark, count, publishDate } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="smooth-reveal-cards group h-full">
|
||||
@@ -18,10 +23,19 @@ const { slug, title, description, count, publishDate } = Astro.props;
|
||||
>
|
||||
<div class="relative grow overflow-hidden">
|
||||
<div class="absolute inset-1 flex flex-col p-3 md:p-4 lg:p-5">
|
||||
<div class="overflow-hidden">
|
||||
<h3 class="card-text-title-major card-hover-text-title whitespace-nowrap mb-4">
|
||||
<div class="flex flex-row items-center mb-4">
|
||||
<div class="card-hover-icon-scale shrink-0 mr-3">
|
||||
<Logo
|
||||
srcLight={getDirectusImageURL(logoLight)}
|
||||
srcDark={getDirectusImageURL(logoDark!)}
|
||||
alt={`Logo of ${title}`}
|
||||
/>
|
||||
</div>
|
||||
<h3 class="card-text-title-major card-hover-text-title whitespace-nowrap">
|
||||
{title}
|
||||
</h3>
|
||||
</div>
|
||||
<div>
|
||||
<p class="card-text-description mb-4">
|
||||
{description}
|
||||
</p>
|
||||
|
||||
@@ -4,12 +4,11 @@ import { Image } from 'astro:assets';
|
||||
const { srcLight, srcDark, alt, style, width, height } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="themed-image-container">
|
||||
<div class="grid grid-cols-1 grid-rows-1">
|
||||
<Image
|
||||
src={srcLight}
|
||||
alt={alt}
|
||||
class={`light-logo ${style}`}
|
||||
inferSize={true}
|
||||
class:list={['col-start-1 row-start-1 transition-all duration-400 ease-in-out opacity-100 scale-100 dark:opacity-0 dark:scale-65', style]}
|
||||
width={width}
|
||||
height={height}
|
||||
inferSize={true}
|
||||
@@ -18,29 +17,9 @@ const { srcLight, srcDark, alt, style, width, height } = Astro.props;
|
||||
<Image
|
||||
src={srcDark}
|
||||
alt={alt}
|
||||
class={`dark-logo ${style}`}
|
||||
inferSize={true}
|
||||
class:list={['col-start-1 row-start-1 transition-all duration-400 ease-in-out opacity-0 scale-65 dark:opacity-100 dark:scale-100', style]}
|
||||
width={width}
|
||||
height={height}
|
||||
inferSize={true}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.themed-image-container {
|
||||
display: grid;
|
||||
grid-template-areas: "stack";
|
||||
}
|
||||
|
||||
.themed-image-container :global(img) {
|
||||
grid-area: stack;
|
||||
}
|
||||
|
||||
:global(.dark) .light-logo {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
:global(.dark) .dark-logo {
|
||||
display: block !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -51,11 +51,12 @@ const categories = (await directus.request(readItems('categories')))
|
||||
.map((c, index) => {
|
||||
const posts = postMap.get(c.slug);
|
||||
const pattern = layoutPattern[index % layoutPattern.length];
|
||||
const smColSpan = Math.min(pattern.col, 2);
|
||||
const mdColSpan = Math.min(pattern.col, 4);
|
||||
const smColSpan = Math.min(pattern.col, 1);
|
||||
const mdColSpan = Math.min(pattern.col, 2);
|
||||
const lgColSpan = Math.min(pattern.col, 4);
|
||||
const rowSpan = pattern.row;
|
||||
const rowSpanClass = rowSpan > 1 ? `row-span-${rowSpan}` : 'row-span-1';
|
||||
const gridItemClass = `col-span-${smColSpan} md:col-span-${mdColSpan} ${rowSpanClass}`;
|
||||
const gridItemClass = `col-span-${smColSpan} md:col-span-${mdColSpan} lg:col-span-${lgColSpan} ${rowSpanClass}`;
|
||||
return {
|
||||
...c,
|
||||
posts,
|
||||
@@ -63,6 +64,7 @@ const categories = (await directus.request(readItems('categories')))
|
||||
layoutPattern: {
|
||||
smCol: smColSpan,
|
||||
mdCol: mdColSpan,
|
||||
lgCol: lgColSpan,
|
||||
row: rowSpan,
|
||||
index,
|
||||
},
|
||||
@@ -71,7 +73,7 @@ const categories = (await directus.request(readItems('categories')))
|
||||
---
|
||||
|
||||
<section class="mx-auto px-4 py-10 sm:px-6 lg:px-8 lg:py-14 lg:pt-10 2xl:max-w-full">
|
||||
<div class="grid grid-flow-row-dense grid-cols-2 md:grid-cols-4 gap-4">
|
||||
<div class="grid grid-flow-row-dense grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
{categories.map((category) => {
|
||||
return (
|
||||
<div
|
||||
@@ -82,6 +84,8 @@ const categories = (await directus.request(readItems('categories')))
|
||||
slug={category.slug}
|
||||
title={category.title}
|
||||
description={category.description}
|
||||
logoLight={category.logoLight}
|
||||
logoDark={category.logoDark}
|
||||
count={postMap.get(category.slug)?.length ?? 0}
|
||||
publishDate={timeago(postMap.get(category.slug)?.[0]?.published_date)}
|
||||
/>
|
||||
|
||||
@@ -1,23 +1,39 @@
|
||||
---
|
||||
import GoLinkPrimaryButton from '@components/buttons/GoLinkPrimaryButton.astro';
|
||||
import Logo from '@components/images/Logo.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
subTitle: string;
|
||||
logoExists?: boolean;
|
||||
logoLight?: string;
|
||||
logoDark?: string;
|
||||
btnExists?: boolean;
|
||||
btnTitle?: string;
|
||||
btnURL?: string;
|
||||
}
|
||||
|
||||
const { title, subTitle, btnExists, btnTitle, btnURL } = Astro.props;
|
||||
const { title, subTitle, logoExists, logoLight, logoDark, btnExists, btnTitle, btnURL } = Astro.props;
|
||||
---
|
||||
|
||||
<section class="mx-auto mt-10 px-4 sm:px-6 lg:px-8 lg:pt-10 2xl:max-w-full">
|
||||
<div class="flex-wrap md:flex md:items-center md:justify-between">
|
||||
<div class="w-full md:w-auto">
|
||||
<h1 class="smooth-reveal card-text-header block lg:text-6xl">
|
||||
{title}
|
||||
</h1>
|
||||
<div class="smooth-reveal flex flex-row items-center mb-4">
|
||||
{logoExists ? (
|
||||
<div class="shrink-0 mr-5">
|
||||
<Logo
|
||||
srcLight={getDirectusImageURL(logoLight!)}
|
||||
srcDark={getDirectusImageURL(logoDark!)}
|
||||
alt={`Logo of ${title}`}
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
<h1 class="card-text-header block lg:text-6xl">
|
||||
{title}
|
||||
</h1>
|
||||
</div>
|
||||
<p class="smooth-reveal card-text-header-description mt-4">
|
||||
{subTitle}
|
||||
</p>
|
||||
|
||||
@@ -120,7 +120,7 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
|
||||
to bottom,
|
||||
transparent 0px,
|
||||
transparent 16px,
|
||||
black 80px,
|
||||
black 60px,
|
||||
black 100%
|
||||
);
|
||||
|
||||
@@ -133,23 +133,23 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
|
||||
|
||||
/* Background that creates the "glimmer" effect */
|
||||
.bg {
|
||||
animation: slide 20s ease-in-out infinite alternate;
|
||||
background-image: linear-gradient(-60deg, var(--bg-primary) 33.3%, var(--bg-secondary) 33.3%, var(--bg-secondary) 66.6%, var(--bg-tertiary) 66.6%);
|
||||
filter: blur(80px);
|
||||
animation: slide 25s ease-in-out infinite alternate;
|
||||
background-image: linear-gradient(-55deg, var(--bg-primary) 33.3%, var(--bg-secondary) 33.3%, var(--bg-secondary) 66.6%, var(--bg-tertiary) 66.6%);
|
||||
filter: blur(40px);
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: -50%;
|
||||
right: -50%;
|
||||
left: -70%;
|
||||
right: -70%;
|
||||
opacity: .5;
|
||||
position: fixed;
|
||||
z-index: -1;
|
||||
--bg-primary: #e5e5e5;
|
||||
--bg-secondary: #d9d9d9;
|
||||
--bg-tertiary: #ededed;
|
||||
--bg-secondary: #dce3eb;
|
||||
--bg-tertiary: #f4f6f8;
|
||||
}
|
||||
|
||||
:global(.dark) .bg {
|
||||
--bg-primary: #292524;
|
||||
--bg-primary: #332f2e;
|
||||
--bg-secondary: #44403c;
|
||||
--bg-tertiary: #57534e;
|
||||
}
|
||||
@@ -160,15 +160,15 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
|
||||
}
|
||||
|
||||
.bg3 {
|
||||
animation-duration: 25s;
|
||||
animation-duration: 20s;
|
||||
}
|
||||
|
||||
@keyframes slide {
|
||||
0% {
|
||||
transform:translateX(-25%);
|
||||
transform: translateX(-30%);
|
||||
}
|
||||
100% {
|
||||
transform:translateX(25%);
|
||||
transform: translateX(30%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -53,6 +53,8 @@ export type Category = {
|
||||
slug: string;
|
||||
title: string;
|
||||
description: string;
|
||||
logoLight: string;
|
||||
logoDark: string;
|
||||
};
|
||||
|
||||
export type Application = {
|
||||
|
||||
@@ -7,9 +7,8 @@ import markedShiki from 'marked-shiki';
|
||||
import { createHighlighter } from 'shiki';
|
||||
import { readItems, readSingleton } from '@directus/sdk';
|
||||
|
||||
import type { Category } from '@lib/directusTypes';
|
||||
|
||||
import SocialShareButton from '@components/buttons/SocialShareButton.astro';
|
||||
import Logo from '@components/images/Logo.astro';
|
||||
import BaseLayout from '@layouts/BaseLayout.astro';
|
||||
import directus from '@lib/directus';
|
||||
import { formatDate } from '@support/time';
|
||||
@@ -112,7 +111,18 @@ const content = marked.parse(post.content || '');
|
||||
href=`/categories/${category.slug}`
|
||||
data-astro-prefetch
|
||||
>
|
||||
{category.title}
|
||||
<div class="flex flex-row items-center shrink-0">
|
||||
<div class="mr-2">
|
||||
<Logo
|
||||
srcLight={getDirectusImageURL(category.logoLight)}
|
||||
srcDark={getDirectusImageURL(category.logoDark)}
|
||||
alt={`Logo of ${category.title}`}
|
||||
width = 18,
|
||||
height = 18,
|
||||
/>
|
||||
</div>
|
||||
{category.title}
|
||||
</div>
|
||||
</a>
|
||||
<span class="shrink-0 text-secondary text-sm mx-2 sm:mx-4">
|
||||
/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import { readItems, readSingleton } from '@directus/sdk';
|
||||
|
||||
import type { Post, Category } from '@lib/directusTypes';
|
||||
import type { Post } from '@lib/directusTypes';
|
||||
|
||||
import HeaderSection from '@components/sections/HeaderSection.astro';
|
||||
import BlogCard from '@components/cards/BlogCard.astro';
|
||||
@@ -54,8 +54,11 @@ const categoriesPosts = posts
|
||||
>
|
||||
|
||||
<HeaderSection
|
||||
title={category.title}
|
||||
title=`${category.title}`
|
||||
subTitle={category.description}
|
||||
logoExists
|
||||
logoLight={category.logoLight}
|
||||
logoDark={category.logoDark}
|
||||
btnExists
|
||||
btnTitle="Back to Categories"
|
||||
btnURL="/categories"
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
|
||||
/* Object colors */
|
||||
--color-background: light-dark(var(--color-neutral-200), var(--color-stone-700));
|
||||
--color-background-accent: light-dark(color-mix(in srgb, var(--color-neutral-300) 40%, transparent), color-mix(in srgb, var(--color-stone-800) 20%, transparent));
|
||||
--color-background-accent: light-dark(color-mix(in srgb, var(--color-slate-300) 40%, transparent), color-mix(in srgb, var(--color-stone-800) 20%, transparent));
|
||||
--color-background-card: light-dark(color-mix(in srgb, var(--color-neutral-100) 80%, transparent), color-mix(in srgb, var(--color-neutral-800) 60%, transparent));
|
||||
|
||||
--color-divider: light-dark(color-mix(in srgb, var(--color-neutral-400) 50%, transparent), color-mix(in srgb, var(--color-neutral-500) 50%, transparent));
|
||||
--color-divider: light-dark(color-mix(in srgb, var(--color-slate-400) 40%, transparent), color-mix(in srgb, var(--color-neutral-500) 50%, transparent));
|
||||
}
|
||||
|
||||
@layer base {
|
||||
|
||||
Reference in New Issue
Block a user