Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e3179b0480 | |||
| c4104a52d1 | |||
| 954112e30e | |||
| f35c73b028 | |||
| 5cf1cd30d8 | |||
| 787479e077 | |||
| 91c9a4bb91 | |||
| 220c29f4f7 | |||
| dfeb181a1d | |||
| 641c7cb33f | |||
| 93a53cab3d | |||
| a6c889f76a | |||
| 9319228ef6 | |||
| 148fe8eeff |
17
.pre-commit-config.yaml
Normal file
17
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v6.0.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- id: check-merge-conflict
|
||||
- id: check-json
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v4.0.0-alpha.11
|
||||
hooks:
|
||||
- id: prettier
|
||||
types_or: [javascript, typescript, css, scss, html, json, yaml, markdown]
|
||||
additional_dependencies:
|
||||
- prettier
|
||||
- prettier-plugin-astro
|
||||
- prettier-plugin-tailwindcss
|
||||
@@ -1,14 +1,13 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
import node from '@astrojs/node';
|
||||
import react from '@astrojs/react';
|
||||
import sitemap from '@astrojs/sitemap';
|
||||
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import icon from 'astro-icon';
|
||||
import swup from '@swup/astro';
|
||||
|
||||
import { getSiteURL } from './src/support/url';
|
||||
import { getSiteURL } from './src/scripts/url';
|
||||
|
||||
export default defineConfig({
|
||||
site: getSiteURL(),
|
||||
@@ -25,7 +24,6 @@ export default defineConfig({
|
||||
},
|
||||
|
||||
integrations: [
|
||||
react(),
|
||||
sitemap(),
|
||||
icon({
|
||||
include: {
|
||||
@@ -43,17 +41,16 @@ export default defineConfig({
|
||||
}),
|
||||
(await import('@playform/compress')).default({
|
||||
CSS: true,
|
||||
JavaScript: true,
|
||||
JavaScript: false,
|
||||
HTML: {
|
||||
'html-minifier-terser': {
|
||||
collapseWhitespace: true,
|
||||
minifyCSS: false,
|
||||
minifyJS: true,
|
||||
minifyJS: false,
|
||||
},
|
||||
},
|
||||
Image: false,
|
||||
SVG: true,
|
||||
Logger: 2,
|
||||
}),
|
||||
],
|
||||
|
||||
@@ -74,13 +71,4 @@ export default defineConfig({
|
||||
adapter: node({
|
||||
mode: 'standalone',
|
||||
}),
|
||||
|
||||
build: {
|
||||
// Specifies the directory in the build output where Astro-generated assets (bundled JS and CSS for example) should live.
|
||||
// see https://docs.astro.build/en/reference/configuration-reference/#buildassets
|
||||
assets: 'assets',
|
||||
// see https://docs.astro.build/en/reference/configuration-reference/#buildassetsprefix
|
||||
assetsPrefix:
|
||||
!!import.meta.env.S3_ENABLE || !!process.env.S3_ENABLE ? 'https://digitalocean.com' : '',
|
||||
},
|
||||
});
|
||||
|
||||
19
package.json
19
package.json
@@ -30,22 +30,20 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.7",
|
||||
"@astrojs/node": "^10.0.1",
|
||||
"@astrojs/react": "^5.0.0",
|
||||
"@astrojs/node": "^9.5.5",
|
||||
"@astrojs/rss": "^4.0.17",
|
||||
"@astrojs/sitemap": "^3.7.1",
|
||||
"@directus/sdk": "^21.2.0",
|
||||
"@giscus/react": "^3.1.0",
|
||||
"@iconify-json/mdi": "^1.2.3",
|
||||
"@iconify-json/pajamas": "^1.2.15",
|
||||
"@iconify-json/simple-icons": "^1.2.73",
|
||||
"@playform/compress": "^0.2.1",
|
||||
"@iconify-json/simple-icons": "^1.2.74",
|
||||
"@playform/compress": "^0.2.2",
|
||||
"@swup/astro": "^1.8.0",
|
||||
"@tailwindcss/postcss": "^4.2.1",
|
||||
"@tailwindcss/vite": "^4.2.1",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/unist": "^3.0.3",
|
||||
"astro": "^6.0.4",
|
||||
"astro": "^5.18.1",
|
||||
"astro-compress": "^2.4.0",
|
||||
"astro-icon": "^1.1.5",
|
||||
"dayjs": "^1.11.20",
|
||||
"markdown-it": "^14.1.1",
|
||||
@@ -54,8 +52,6 @@
|
||||
"mdast-util-to-string": "^4.0.0",
|
||||
"photoswipe": "^5.4.4",
|
||||
"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",
|
||||
@@ -64,11 +60,11 @@
|
||||
"ultrahtml": "^1.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint-react/eslint-plugin": "^2.13.0",
|
||||
"@saithodev/semantic-release-gitea": "^2.1.0",
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/commit-analyzer": "^13.0.1",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@semantic-release/npm": "^13.1.5",
|
||||
"@semantic-release/release-notes-generator": "^14.1.0",
|
||||
"@tailwindcss/forms": "^0.5.11",
|
||||
"@tailwindcss/typography": "^0.5.19",
|
||||
@@ -77,9 +73,6 @@
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-astro": "^1.6.0",
|
||||
"eslint-plugin-format": "^2.0.1",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.2",
|
||||
"prettier": "^3.8.1",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"prettier-plugin-tailwindcss": "^0.7.2",
|
||||
|
||||
@@ -43,13 +43,12 @@
|
||||
</button>
|
||||
|
||||
<script is:inline>
|
||||
const applyTheme = () => {
|
||||
(() => {
|
||||
const isDark =
|
||||
localStorage.theme === 'dark' ||
|
||||
(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||
document.documentElement.classList.toggle('dark', isDark);
|
||||
};
|
||||
applyTheme();
|
||||
})();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Image } from 'astro:assets';
|
||||
import type { Post } from '@lib/directusTypes';
|
||||
|
||||
import PostMetadataSnippet from '@/components/snippets/PostMetadataSnippet.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
post: Post;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import Logo from '@components/images/Logo.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
slug: string;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { Icon } from 'astro-icon/components';
|
||||
|
||||
import Logo from '@components/images/Logo.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
topic: string;
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { Post } from '@lib/directusTypes';
|
||||
|
||||
import ReadMoreButton from '@components/buttons/ReadMoreButton.astro';
|
||||
import PostMetadataSnippet from '@/components/snippets/PostMetadataSnippet.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
post: Post;
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { Post } from '@lib/directusTypes';
|
||||
|
||||
import ReadMoreButton from '@components/buttons/ReadMoreButton.astro';
|
||||
import PostMetadataSnippet from '@/components/snippets/PostMetadataSnippet.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
post: Post;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import Logo from '@components/images/Logo.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
url: string;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { Icon } from 'astro-icon/components';
|
||||
import { Image } from 'astro:assets';
|
||||
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import ReadMoreButton from '@components/buttons/ReadMoreButton.astro';
|
||||
import Logo from '@components/images/Logo.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { Post } from '@lib/directusTypes';
|
||||
import CategoryCard from '@components/cards/CategoryCard.astro';
|
||||
import LargeCategoryCard from '@components/cards/LargeCategoryCard.astro';
|
||||
import directus from '@lib/directus';
|
||||
import { formatFromNow } from '@support/time';
|
||||
import { formatFromNow } from '@/scripts/time';
|
||||
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import GoLinkPrimaryButton from '@components/buttons/GoLinkPrimaryButton.astro';
|
||||
import Logo from '@components/images/Logo.astro';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
|
||||
@@ -7,7 +7,7 @@ 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';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
---
|
||||
import WeatherCard from '@components/cards/WeatherCard.astro';
|
||||
import { getFiveDayForecast } from '@support/weather';
|
||||
import { getFiveDayForecast } from '@/scripts/weather';
|
||||
|
||||
const { latitude = "44.95", longitude = "-93.09", cityName = "St. Paul, Minnesota", timezone = "America/Chicago" } = Astro.props;
|
||||
|
||||
const { forecastDays, error } = await getFiveDayForecast(latitude, longitude, timezone);
|
||||
---
|
||||
|
||||
<section class="max-w-340 2xl:max-w-fullpx-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto mb-2 md:mb-8">
|
||||
<section class="max-w-340 2xl:max-w-full px-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto mb-2 md:mb-8">
|
||||
<div class="text-center max-w-2xl mx-auto mb-10 lg:mb-14">
|
||||
<h1 class="smooth-reveal card-text-header block">
|
||||
Weather in my Area
|
||||
@@ -19,8 +19,12 @@ const { forecastDays, error } = await getFiveDayForecast(latitude, longitude, ti
|
||||
</div>
|
||||
</div>
|
||||
{error ? (
|
||||
<div class="card-base p-10 text-accent text-center">
|
||||
Sorry, {error.toLowerCase()}
|
||||
<div class="smooth-reveal flex flex-wrap justify-center gap-4 lg:gap-6">
|
||||
<div class="card-base flex flex-col justify-center items-center p-10 w-48 h-56">
|
||||
<h1 class="card-text-header block text-accent text-center">
|
||||
Sorry, {error.toLowerCase()}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div class="flex flex-wrap justify-center gap-4 lg:gap-6">
|
||||
|
||||
@@ -4,8 +4,8 @@ import getReadingTime from 'reading-time';
|
||||
import type { Post } from '@lib/directusTypes';
|
||||
|
||||
import Logo from '@components/images/Logo.astro';
|
||||
import { formatShortDate, formatDate } from '@support/time';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
import { formatShortDate, formatDate } from '@/scripts/time';
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
interface Props {
|
||||
post: Post;
|
||||
|
||||
@@ -101,16 +101,40 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
|
||||
</html>
|
||||
|
||||
<script>
|
||||
import { initPhotoSwipe } from '@/scripts/photoswipe';
|
||||
import { animateContent } from '@/scripts/animations';
|
||||
|
||||
const resetScroll = () => {
|
||||
const scrollContainer = document.getElementById('reset-scroll');
|
||||
if (scrollContainer) {
|
||||
scrollContainer.scrollTop = 0;
|
||||
}
|
||||
if (scrollContainer) scrollContainer.scrollTop = 0;
|
||||
};
|
||||
|
||||
resetScroll();
|
||||
initPhotoSwipe();
|
||||
animateContent();
|
||||
|
||||
const observer = new MutationObserver((mutations) => {
|
||||
const hasNewNodes = mutations.some(
|
||||
(mutation) => mutation.type === 'childList' && mutation.addedNodes.length > 0
|
||||
);
|
||||
|
||||
if (hasNewNodes) {
|
||||
animateContent();
|
||||
if (typeof (window as any).HSStaticMethods !== 'undefined') {
|
||||
(window as any).HSStaticMethods.autoInit();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const targetNode = document.getElementById('reset-scroll');
|
||||
if (targetNode) {
|
||||
observer.observe(targetNode, { childList: true, subtree: true });
|
||||
}
|
||||
|
||||
document.addEventListener('swup:page:view', () => {
|
||||
resetScroll();
|
||||
initPhotoSwipe();
|
||||
animateContent();
|
||||
if (typeof (window as any).HSStaticMethods !== 'undefined') {
|
||||
(window as any).HSStaticMethods.autoInit();
|
||||
}
|
||||
@@ -120,42 +144,6 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const animateContent = () => {
|
||||
const smoothReveal = document.querySelectorAll('.smooth-reveal');
|
||||
smoothReveal.forEach((el, index) => {
|
||||
setTimeout(() => {
|
||||
el.classList.add('animate-reveal');
|
||||
}, 50 + index * 100);
|
||||
});
|
||||
|
||||
const smoothReveal2 = document.querySelectorAll('.smooth-reveal-2');
|
||||
smoothReveal2.forEach((el, index) => {
|
||||
setTimeout(() => {
|
||||
el.classList.add('animate-reveal');
|
||||
}, 200 + index * 250);
|
||||
});
|
||||
|
||||
const smoothRevealCards = document.querySelectorAll('.smooth-reveal-cards');
|
||||
smoothRevealCards.forEach((el, index) => {
|
||||
setTimeout(() => {
|
||||
el.classList.add('animate-reveal');
|
||||
}, 400 + index * 250);
|
||||
});
|
||||
|
||||
const smoothRevealFade = document.querySelectorAll('.smooth-reveal-fade');
|
||||
smoothRevealFade.forEach((el, index) => {
|
||||
setTimeout(() => {
|
||||
el.classList.add('animate-reveal-fade');
|
||||
}, 100 + index * 250);
|
||||
});
|
||||
};
|
||||
|
||||
animateContent();
|
||||
|
||||
document.addEventListener('swup:page:view', animateContent);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* Fade away content below header when scrolling */
|
||||
.mask-container {
|
||||
@@ -182,6 +170,7 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
|
||||
/* Background that creates the "glimmer" effect */
|
||||
.bg {
|
||||
animation: slide 25s ease-in-out infinite alternate;
|
||||
will-change: transform;
|
||||
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;
|
||||
|
||||
@@ -14,7 +14,7 @@ import type {
|
||||
Skill,
|
||||
} from '@lib/directusTypes';
|
||||
|
||||
import { getDirectusURL } from '@/support/url';
|
||||
import { getDirectusURL } from '@/scripts/url';
|
||||
|
||||
type Schema = {
|
||||
site_global: Global;
|
||||
|
||||
@@ -1,51 +1,64 @@
|
||||
---
|
||||
|
||||
import { Image } from 'astro:assets';
|
||||
import { marked } from 'marked';
|
||||
import markedShiki from 'marked-shiki';
|
||||
import { createHighlighter } from 'shiki';
|
||||
import { readItems, readSingleton } from '@directus/sdk';
|
||||
import 'photoswipe/style.css';
|
||||
import "photoswipe/style.css";
|
||||
|
||||
import type { Post } from '@/lib/directusTypes'
|
||||
|
||||
import SocialShareButton from '@components/buttons/SocialShareButton.astro';
|
||||
import PostMetadataSnippet from '@/components/snippets/PostMetadataSnippet.astro';
|
||||
import BaseLayout from '@layouts/BaseLayout.astro';
|
||||
import directus from '@lib/directus';
|
||||
import { getDirectusImageURL } from '@/support/url';
|
||||
|
||||
const post = Astro.props;
|
||||
import { getDirectusImageURL } from '@/scripts/url';
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await directus.request(readItems('posts', {
|
||||
fields: ['*', { category: ['*'] }],
|
||||
}));
|
||||
return posts.map((post) => ({
|
||||
const globalData = await directus.request(readSingleton('site_global'));
|
||||
const highlighter = await createHighlighter({
|
||||
themes: ['github-light', 'github-dark'],
|
||||
langs: ['typescript', 'python', 'css', 'html', 'yaml', 'bash', 'json'],
|
||||
});
|
||||
const renderer = {
|
||||
image({ href, title, text }: { href: string; title: string | null; text: string }) {
|
||||
return `
|
||||
<a
|
||||
href="${href}"
|
||||
class="pswp-link"
|
||||
data-pswp-src="${href}"
|
||||
target="_blank"
|
||||
>
|
||||
<img src="${href}" alt="${text}" title="${title || ''}" loading="lazy" />
|
||||
</a>
|
||||
`;
|
||||
},
|
||||
};
|
||||
marked.use({ renderer });
|
||||
marked.use(markedShiki({
|
||||
highlight(code, lang) {
|
||||
return highlighter.codeToHtml(code, {
|
||||
lang: lang || 'plaintext',
|
||||
themes: { light: 'github-light', dark: 'github-dark' },
|
||||
defaultColor: false,
|
||||
});
|
||||
}
|
||||
}));
|
||||
|
||||
return posts.map((post: Post) => ({
|
||||
params: { slug: post.slug },
|
||||
props: post,
|
||||
props: {
|
||||
post,
|
||||
global: globalData,
|
||||
content: marked.parse(post.content || ''),
|
||||
},
|
||||
}));
|
||||
}
|
||||
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
|
||||
const highlighter = await createHighlighter({
|
||||
themes: ['github-light', 'github-dark'],
|
||||
langs: ['typescript', 'python', 'css', 'html', 'yaml', 'bash', 'json'],
|
||||
});
|
||||
|
||||
marked.use(markedShiki({
|
||||
highlight(code, lang) {
|
||||
return highlighter.codeToHtml(code, {
|
||||
lang: lang || 'plaintext',
|
||||
themes: {
|
||||
light: 'github-light',
|
||||
dark: 'github-dark',
|
||||
},
|
||||
defaultColor: false,
|
||||
});
|
||||
}
|
||||
}));
|
||||
|
||||
const content = marked.parse(post.content || '');
|
||||
const { post, global, content } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout
|
||||
@@ -65,7 +78,7 @@ const content = marked.parse(post.content || '');
|
||||
name: global.name,
|
||||
description: global.about,
|
||||
},
|
||||
image: [],
|
||||
image: [getDirectusImageURL(post.image)],
|
||||
headline: post.title,
|
||||
datePublished: post.published_date,
|
||||
dateModified: post.updated_date,
|
||||
@@ -85,7 +98,7 @@ const content = marked.parse(post.content || '');
|
||||
<Image
|
||||
class="rounded-2xl sm:rounded-b-none w-full max-h-150 object-cover"
|
||||
src={getDirectusImageURL(post.image)}
|
||||
alt={post.image_alt}
|
||||
alt={post.image_alt || post.title}
|
||||
draggable="false"
|
||||
format="webp"
|
||||
loading="lazy"
|
||||
@@ -110,13 +123,15 @@ const content = marked.parse(post.content || '');
|
||||
</article>
|
||||
|
||||
<div class="grid sm:flex sm:items-center sm:justify-between gap-y-5 sm:gap-y-0 max-w-5xl mx-auto mt-10 md:mt-14">
|
||||
<div class="flex flex-wrap sm:flex-nowrap sm:items-center gap-x-2 gap-y-1 sm:gap-y-0">
|
||||
{post.tags.map((tag: string) => (
|
||||
<span class="inline-flex items-center button-base bg-cobalt dark:bg-turquoise text-neutral-100 text-xs font-bold rounded-lg gap-x-1.5 px-3 py-1.5">
|
||||
{tag}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
{post.tags && post.tags.length > 0 && (
|
||||
<div class="flex flex-wrap sm:flex-nowrap sm:items-center gap-x-2 gap-y-1 sm:gap-y-0">
|
||||
{post.tags.map((tag: string) => (
|
||||
<span class="inline-flex items-center button-base bg-cobalt dark:bg-turquoise text-neutral-100 text-xs font-bold rounded-lg gap-x-1.5 px-3 py-1.5">
|
||||
{tag}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<SocialShareButton pageTitle={post.title}/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -139,39 +154,3 @@ const content = marked.parse(post.content || '');
|
||||
</style>
|
||||
|
||||
</BaseLayout>
|
||||
|
||||
<script>
|
||||
import PhotoSwipeLightbox from 'photoswipe/lightbox';
|
||||
const prose = document.querySelector('.prose');
|
||||
if (prose) {
|
||||
const images = prose.querySelectorAll('img');
|
||||
images.forEach((img) => {
|
||||
if (img.closest('a')) return;
|
||||
const link = document.createElement('a');
|
||||
link.href = img.src;
|
||||
link.dataset.pswpSrc = img.src;
|
||||
link.dataset.pswpWidth = img.naturalWidth.toString();
|
||||
link.dataset.pswpHeight = img.naturalHeight.toString();
|
||||
link.target = '_blank';
|
||||
link.classList.add('pswp-link');
|
||||
|
||||
img.parentNode?.insertBefore(link, img);
|
||||
link.appendChild(img);
|
||||
|
||||
if (!img.complete) {
|
||||
img.onload = () => {
|
||||
link.dataset.pswpWidth = img.naturalWidth.toString();
|
||||
link.dataset.pswpHeight = img.naturalHeight.toString();
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
const lightbox = new PhotoSwipeLightbox({
|
||||
gallery: prose,
|
||||
children: 'a.pswp-link',
|
||||
pswpModule: () => import('photoswipe'),
|
||||
});
|
||||
|
||||
lightbox.init();
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -67,7 +67,23 @@ const recentPosts = posts
|
||||
longitude={weather.longitude}
|
||||
cityName={weather.location}
|
||||
timezone={weather.timezone}
|
||||
/>
|
||||
>
|
||||
<div slot="fallback" class="max-w-340 2xl:max-w-full px-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto mb-2 md:mb-8">
|
||||
<div class="text-center max-w-2xl mx-auto mb-10 lg:mb-14">
|
||||
<h1 class="smooth-reveal card-text-header block">
|
||||
Loading weather...
|
||||
</h1>
|
||||
<div class="smooth-reveal mx-auto mt-5 max-w-3xl text-center flex justify-center">
|
||||
<div class="h-6 w-64"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap justify-center gap-4 lg:gap-6">
|
||||
{Array.from({ length: 5 }).map((_, index) => (
|
||||
<div class={`card-base h-62.5 w-40 animate-pulse bg-neutral-200 dark:bg-neutral-800 ${index === 3 ? "hidden min-[800px]:block" : index >= 4 ? "hidden min-[1100px]:block" : ""}`}></div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</WeatherSection>
|
||||
|
||||
<GiteaSection
|
||||
title="Follow me on Gitea"
|
||||
|
||||
31
src/scripts/animations.ts
Normal file
31
src/scripts/animations.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
const animateContent = () => {
|
||||
const smoothReveal = document.querySelectorAll('.smooth-reveal');
|
||||
smoothReveal.forEach((el, index) => {
|
||||
setTimeout(() => {
|
||||
el.classList.add('animate-reveal');
|
||||
}, 50 + index * 100);
|
||||
});
|
||||
|
||||
const smoothReveal2 = document.querySelectorAll('.smooth-reveal-2');
|
||||
smoothReveal2.forEach((el, index) => {
|
||||
setTimeout(() => {
|
||||
el.classList.add('animate-reveal');
|
||||
}, 200 + index * 250);
|
||||
});
|
||||
|
||||
const smoothRevealCards = document.querySelectorAll('.smooth-reveal-cards');
|
||||
smoothRevealCards.forEach((el, index) => {
|
||||
setTimeout(() => {
|
||||
el.classList.add('animate-reveal');
|
||||
}, 400 + index * 250);
|
||||
});
|
||||
|
||||
const smoothRevealFade = document.querySelectorAll('.smooth-reveal-fade');
|
||||
smoothRevealFade.forEach((el, index) => {
|
||||
setTimeout(() => {
|
||||
el.classList.add('animate-reveal-fade');
|
||||
}, 100 + index * 250);
|
||||
});
|
||||
};
|
||||
|
||||
export { animateContent };
|
||||
38
src/scripts/photoswipe.ts
Normal file
38
src/scripts/photoswipe.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import PhotoSwipeLightbox from 'photoswipe/lightbox';
|
||||
import PhotoSwipe from "photoswipe";
|
||||
|
||||
let lightbox: PhotoSwipeLightbox | null = null;
|
||||
|
||||
function initPhotoSwipe() {
|
||||
const links = document.querySelectorAll<HTMLAnchorElement>('a.pswp-link');
|
||||
|
||||
links.forEach((link) => {
|
||||
const img = link.querySelector('img');
|
||||
if (img) {
|
||||
const applyDimensions = () => {
|
||||
link.dataset.pswpWidth = (img.naturalWidth || 1920).toString();
|
||||
link.dataset.pswpHeight = (img.naturalHeight || 1080).toString();
|
||||
};
|
||||
if (img.complete) {
|
||||
applyDimensions();
|
||||
} else {
|
||||
img.addEventListener('load', applyDimensions);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (lightbox) {
|
||||
lightbox.destroy();
|
||||
}
|
||||
|
||||
lightbox = new PhotoSwipeLightbox({
|
||||
gallery: '.prose',
|
||||
children: 'a.pswp-link',
|
||||
pswpModule: PhotoSwipe,
|
||||
allowPanToNext: true,
|
||||
});
|
||||
|
||||
lightbox.init();
|
||||
}
|
||||
|
||||
export { initPhotoSwipe };
|
||||
@@ -1,5 +1,7 @@
|
||||
@import 'tailwindcss';
|
||||
@import './utilities.css';
|
||||
@import './utilities-buttons.css';
|
||||
@import './utilities-cards.css';
|
||||
@import './utilities-misc.css';
|
||||
|
||||
@plugin '@tailwindcss/typography';
|
||||
@plugin '@tailwindcss/forms';
|
||||
@@ -43,6 +45,29 @@
|
||||
--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-slate-400) 40%, transparent), color-mix(in srgb, var(--color-neutral-500) 50%, transparent));
|
||||
|
||||
/* Typography */
|
||||
--color-prose-blog-body: var(--color-neutral-700);
|
||||
--color-prose-blog-headings: var(--color-neutral-900);
|
||||
--color-prose-blog-links: var(--color-orange-300);
|
||||
|
||||
--color-prose-blog-invert-body: var(--color-neutral-400);
|
||||
--color-prose-blog-invert-headings: var(--color-neutral-200);
|
||||
|
||||
--radius-markdown-img: 0.5rem;
|
||||
|
||||
/* Reveal Animations */
|
||||
--animate-reveal: reveal 0.8s ease forwards;
|
||||
--animate-reveal-fade: reveal-fade 1.8s ease forwards;
|
||||
|
||||
@keyframes reveal {
|
||||
from { opacity: 0; transform: translateY(20px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
@keyframes reveal-fade {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
@@ -51,7 +76,6 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
--theme-transition: 0.3s ease;
|
||||
--scroll-offset: 0px;
|
||||
}
|
||||
|
||||
:root:where(.dark, .dark *) {
|
||||
@@ -90,7 +114,54 @@
|
||||
border-color var(--theme-transition);
|
||||
}
|
||||
|
||||
/* Shiki syntax highlighting */
|
||||
/* Typography */
|
||||
.prose blockquote {
|
||||
font-style: normal;
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
.prose img {
|
||||
@apply rounded-lg;
|
||||
}
|
||||
|
||||
.prose-blog {
|
||||
--tw-prose-body: var(--color-neutral-700);
|
||||
--tw-prose-headings: var(--color-neutral-900);
|
||||
--tw-prose-lead: var(--color-neutral-700);
|
||||
--tw-prose-links: var(--color-orange-300);
|
||||
--tw-prose-bold: var(--color-neutral-900);
|
||||
--tw-prose-counters: var(--color-neutral-600);
|
||||
--tw-prose-bullets: var(--color-neutral-400);
|
||||
--tw-prose-hr: var(--color-neutral-300);
|
||||
--tw-prose-quotes: var(--color-neutral-500);
|
||||
--tw-prose-quote-borders: var(--color-neutral-300);
|
||||
--tw-prose-captions: var(--color-neutral-700);
|
||||
--tw-prose-code: var(--color-neutral-700);
|
||||
--tw-prose-pre-code: var(--color-neutral-900);
|
||||
--tw-prose-pre-bg: var(--color-white);
|
||||
--tw-prose-th-borders: var(--color-neutral-300);
|
||||
--tw-prose-td-borders: var(--color-neutral-200);
|
||||
|
||||
&:where(.dark, .dark *) {
|
||||
--tw-prose-body: var(--color-neutral-400);
|
||||
--tw-prose-headings: var(--color-neutral-200);
|
||||
--tw-prose-lead: var(--color-neutral-300);
|
||||
--tw-prose-links: var(--color-orange-300);
|
||||
--tw-prose-bold: var(--color-neutral-300);
|
||||
--tw-prose-counters: var(--color-neutral-400);
|
||||
--tw-prose-bullets: var(--color-neutral-600);
|
||||
--tw-prose-hr: var(--color-neutral-700);
|
||||
--tw-prose-quotes: var(--color-neutral-500);
|
||||
--tw-prose-quote-borders: var(--color-neutral-500);
|
||||
--tw-prose-captions: var(--color-neutral-400);
|
||||
--tw-prose-code: var(--color-neutral-350);
|
||||
--tw-prose-pre-code: var(--color-neutral-300);
|
||||
--tw-prose-th-borders: var(--color-neutral-600);
|
||||
--tw-prose-td-borders: var(--color-neutral-700);
|
||||
}
|
||||
}
|
||||
|
||||
/* Shiki */
|
||||
:root {
|
||||
--shiki-fg: var(--shiki-light);
|
||||
--shiki-bg: var(--color-neutral-200);
|
||||
@@ -114,32 +185,3 @@
|
||||
color: var(--shiki-dark) !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Content reveal animations */
|
||||
.smooth-reveal,
|
||||
.smooth-reveal-2,
|
||||
.smooth-reveal-cards {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
transition:
|
||||
opacity 0.8s ease,
|
||||
transform 0.8s ease;
|
||||
}
|
||||
|
||||
.animate-reveal {
|
||||
opacity: 1 !important;
|
||||
transform: translateY(0) !important;
|
||||
}
|
||||
|
||||
.smooth-reveal-fade {
|
||||
opacity: 0;
|
||||
transform: translateY(0px);
|
||||
transition:
|
||||
opacity 1.8s ease,
|
||||
transform 0.8s ease;
|
||||
}
|
||||
|
||||
.animate-reveal-fade {
|
||||
opacity: 1 !important;
|
||||
transform: translateY(0) !important;
|
||||
}
|
||||
|
||||
51
src/styles/utilities-buttons.css
Normal file
51
src/styles/utilities-buttons.css
Normal file
@@ -0,0 +1,51 @@
|
||||
@utility button-base {
|
||||
@apply transition-all duration-300
|
||||
border border-transparent
|
||||
shadow-sm hover:shadow-md dark:shadow-md dark:hover:shadow-lg
|
||||
px-4 py-3
|
||||
}
|
||||
|
||||
@utility button-base-hidden {
|
||||
@apply transition-all duration-300
|
||||
border border-transparent
|
||||
hover:bg-neutral-200 dark:hover:bg-neutral-700
|
||||
p-2
|
||||
}
|
||||
|
||||
@utility button-hover-arrow {
|
||||
@apply translate-y-px transition duration-300
|
||||
group-hover:translate-x-1
|
||||
h-3 w-3 md:h-5 md:w-5
|
||||
}
|
||||
|
||||
@utility button-text-title {
|
||||
@apply text-neutral-200 2xl:text-base
|
||||
text-sm font-bold
|
||||
}
|
||||
|
||||
@utility button-text-title-hidden {
|
||||
@apply transition-all duration-300
|
||||
text-neutral-600 group-hover:text-neutral-700 dark:text-neutral-400 dark:group-hover:text-neutral-300 2xl:text-base
|
||||
text-sm font-medium
|
||||
}
|
||||
|
||||
@utility button-bg-blue {
|
||||
@apply transition-all duration-300
|
||||
bg-cobalt hover:bg-steel dark:bg-steel dark:hover:bg-cobalt
|
||||
}
|
||||
|
||||
@utility button-bg-teal {
|
||||
@apply transition-all duration-300
|
||||
bg-bermuda hover:bg-turquoise group-hover:bg-turquoise dark:bg-turquoise dark:hover:bg-bermuda dark:group-hover:bg-bermuda
|
||||
}
|
||||
|
||||
@utility button-bg-neutral {
|
||||
@apply transition-all duration-300
|
||||
border border-neutral-100 dark:border-stone-500/20
|
||||
bg-background-card hover:bg-neutral-100 dark:hover:bg-neutral-800/90
|
||||
}
|
||||
|
||||
@utility button-bg-gitea {
|
||||
@apply transition-all duration-300
|
||||
bg-gitea-primary hover:bg-gitea-secondary dark:bg-gitea-secondary dark:hover:bg-gitea-primary
|
||||
}
|
||||
79
src/styles/utilities-cards.css
Normal file
79
src/styles/utilities-cards.css
Normal file
@@ -0,0 +1,79 @@
|
||||
@utility card-base {
|
||||
@apply transition-all duration-300
|
||||
rounded-xl
|
||||
border border-neutral-100 dark:border-stone-500/20
|
||||
bg-background-card hover:bg-neutral-100 dark:hover:bg-neutral-800/90
|
||||
shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg
|
||||
}
|
||||
|
||||
@utility card-base-hidden {
|
||||
@apply transition-all duration-300
|
||||
rounded-2xl
|
||||
border border-transparent
|
||||
hover:bg-neutral-400/20 dark:hover:bg-neutral-800/40
|
||||
}
|
||||
|
||||
@utility card-hover-icon-color {
|
||||
@apply transition-all duration-300
|
||||
text-primary
|
||||
group-hover:text-main
|
||||
}
|
||||
|
||||
@utility card-hover-icon-scale {
|
||||
@apply transition-transform duration-300 will-change-transform
|
||||
drop-shadow-md dark:drop-shadow-xl dark:drop-shadow-neutral-500/60
|
||||
group-hover:scale-3d group-hover:scale-105
|
||||
}
|
||||
|
||||
@utility card-text-header {
|
||||
@apply text-header
|
||||
text-4xl md:text-5xl
|
||||
font-bold leading-tight tracking-tight text-balance
|
||||
}
|
||||
|
||||
@utility card-text-header-minor {
|
||||
@apply text-header
|
||||
text-2xl md:text-3xl
|
||||
font-semibold leading-tight tracking-tight text-balance
|
||||
}
|
||||
|
||||
@utility card-text-header-description {
|
||||
@apply text-primary
|
||||
text-lg
|
||||
text-pretty leading-relaxed
|
||||
}
|
||||
|
||||
@utility card-text-title {
|
||||
@apply text-primary
|
||||
font-bold
|
||||
}
|
||||
|
||||
@utility card-text-title-major {
|
||||
@apply text-header
|
||||
text-4xl md:text-3xl
|
||||
font-bold leading-tight tracking-tight text-balance
|
||||
}
|
||||
|
||||
@utility card-hover-text-title {
|
||||
@apply transition-all duration-300
|
||||
group-hover:text-main
|
||||
}
|
||||
|
||||
@utility card-hover-text-neutral {
|
||||
@apply transition-all duration-300
|
||||
group-hover:text-primary-hover
|
||||
}
|
||||
|
||||
@utility card-hover-text-gitea {
|
||||
@apply transition-all duration-300
|
||||
group-hover:text-gitea-primary
|
||||
}
|
||||
|
||||
@utility card-text-description {
|
||||
@apply text-secondary
|
||||
}
|
||||
|
||||
@utility card-hover-text-description {
|
||||
@apply transition-all duration-300
|
||||
text-secondary-hover
|
||||
}
|
||||
44
src/styles/utilities-misc.css
Normal file
44
src/styles/utilities-misc.css
Normal file
@@ -0,0 +1,44 @@
|
||||
/* Nav */
|
||||
@utility nav-base {
|
||||
@apply border border-neutral-100 dark:border-stone-500/20
|
||||
bg-neutral-100 dark:bg-neutral-800
|
||||
shadow-xs dark:shadow-md
|
||||
}
|
||||
|
||||
/* Fade edges of a div */
|
||||
@utility mask-fade-edges {
|
||||
-webkit-mask-image:
|
||||
linear-gradient(to right, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent),
|
||||
linear-gradient(to bottom, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent);
|
||||
mask-image:
|
||||
linear-gradient(to right, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent),
|
||||
linear-gradient(to bottom, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent);
|
||||
|
||||
-webkit-mask-composite: source-in;
|
||||
mask-composite: intersect;
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
@utility smooth-reveal {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
transition: opacity 0.8s ease, transform 0.8s ease;
|
||||
}
|
||||
|
||||
@utility smooth-reveal-2 {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
transition: opacity 0.8s ease, transform 0.8s ease;
|
||||
}
|
||||
|
||||
@utility smooth-reveal-cards {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
transition: opacity 0.8s ease, transform 0.8s ease;
|
||||
}
|
||||
|
||||
@utility smooth-reveal-fade {
|
||||
opacity: 0;
|
||||
transform: translateY(0px);
|
||||
transition: opacity 1.8s ease, transform 0.8s ease;
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
/* Button classes */
|
||||
@utility button-base {
|
||||
@apply transition-all duration-300
|
||||
border border-transparent
|
||||
shadow-sm hover:shadow-md dark:shadow-md dark:hover:shadow-lg
|
||||
px-4 py-3
|
||||
}
|
||||
|
||||
@utility button-base-hidden {
|
||||
@apply transition-all duration-300
|
||||
border border-transparent
|
||||
hover:bg-neutral-200 dark:hover:bg-neutral-700
|
||||
p-2
|
||||
}
|
||||
|
||||
@utility button-hover-arrow {
|
||||
@apply translate-y-px transition duration-300
|
||||
group-hover:translate-x-1
|
||||
h-3 w-3 md:h-5 md:w-5
|
||||
}
|
||||
|
||||
@utility button-text-title {
|
||||
@apply text-neutral-200 2xl:text-base
|
||||
text-sm font-bold
|
||||
}
|
||||
|
||||
@utility button-text-title-hidden {
|
||||
@apply transition-all duration-300
|
||||
text-neutral-600 group-hover:text-neutral-700 dark:text-neutral-400 dark:group-hover:text-neutral-300 2xl:text-base
|
||||
text-sm font-medium
|
||||
}
|
||||
|
||||
@utility button-bg-blue {
|
||||
@apply transition-all duration-300
|
||||
bg-cobalt hover:bg-steel dark:bg-steel dark:hover:bg-cobalt
|
||||
}
|
||||
|
||||
@utility button-bg-teal {
|
||||
@apply transition-all duration-300
|
||||
bg-bermuda hover:bg-turquoise group-hover:bg-turquoise dark:bg-turquoise dark:hover:bg-bermuda dark:group-hover:bg-bermuda
|
||||
}
|
||||
|
||||
@utility button-bg-neutral {
|
||||
@apply transition-all duration-300
|
||||
border border-neutral-100 dark:border-stone-500/20
|
||||
bg-background-card hover:bg-neutral-100 dark:hover:bg-neutral-800/90
|
||||
}
|
||||
|
||||
@utility button-bg-gitea {
|
||||
@apply transition-all duration-300
|
||||
bg-gitea-primary hover:bg-gitea-secondary dark:bg-gitea-secondary dark:hover:bg-gitea-primary
|
||||
}
|
||||
|
||||
/* Card classes */
|
||||
@utility card-base {
|
||||
@apply transition-all duration-300
|
||||
rounded-xl
|
||||
border border-neutral-100 dark:border-stone-500/20
|
||||
bg-background-card hover:bg-neutral-100 dark:hover:bg-neutral-800/90
|
||||
shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg
|
||||
}
|
||||
|
||||
@utility card-base-hidden {
|
||||
@apply transition-all duration-300
|
||||
rounded-2xl
|
||||
border border-transparent
|
||||
hover:bg-neutral-400/20 dark:hover:bg-neutral-800/40
|
||||
}
|
||||
|
||||
@utility card-hover-icon-color {
|
||||
@apply transition-all duration-300
|
||||
text-primary
|
||||
group-hover:text-main
|
||||
}
|
||||
|
||||
@utility card-hover-icon-scale {
|
||||
@apply transition-transform duration-300 will-change-transform
|
||||
drop-shadow-md dark:drop-shadow-xl dark:drop-shadow-neutral-500/60
|
||||
group-hover:scale-3d group-hover:scale-105
|
||||
}
|
||||
|
||||
@utility card-text-header {
|
||||
@apply text-header
|
||||
text-4xl md:text-5xl
|
||||
font-bold leading-tight tracking-tight text-balance
|
||||
}
|
||||
|
||||
@utility card-text-header-minor {
|
||||
@apply text-header
|
||||
text-2xl md:text-3xl
|
||||
font-semibold leading-tight tracking-tight text-balance
|
||||
}
|
||||
|
||||
@utility card-text-header-description {
|
||||
@apply text-primary
|
||||
text-lg
|
||||
text-pretty leading-relaxed
|
||||
}
|
||||
|
||||
@utility card-text-title {
|
||||
@apply text-primary
|
||||
font-bold
|
||||
}
|
||||
|
||||
@utility card-text-title-major {
|
||||
@apply text-header
|
||||
text-4xl md:text-3xl
|
||||
font-bold leading-tight tracking-tight text-balance
|
||||
}
|
||||
|
||||
@utility card-hover-text-title {
|
||||
@apply transition-all duration-300
|
||||
group-hover:text-main
|
||||
}
|
||||
|
||||
@utility card-hover-text-neutral {
|
||||
@apply transition-all duration-300
|
||||
group-hover:text-primary-hover
|
||||
}
|
||||
|
||||
@utility card-hover-text-gitea {
|
||||
@apply transition-all duration-300
|
||||
group-hover:text-gitea-primary
|
||||
}
|
||||
|
||||
@utility card-text-description {
|
||||
@apply text-secondary
|
||||
}
|
||||
|
||||
@utility card-hover-text-description {
|
||||
@apply transition-all duration-300
|
||||
text-secondary-hover
|
||||
}
|
||||
|
||||
/* Misc */
|
||||
@utility nav-base {
|
||||
@apply border border-neutral-100 dark:border-stone-500/20
|
||||
bg-neutral-100 dark:bg-neutral-800
|
||||
shadow-xs dark:shadow-md
|
||||
}
|
||||
|
||||
@utility mask-fade-edges {
|
||||
-webkit-mask-image:
|
||||
linear-gradient(to right, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent),
|
||||
linear-gradient(to bottom, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent);
|
||||
mask-image:
|
||||
linear-gradient(to right, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent),
|
||||
linear-gradient(to bottom, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent);
|
||||
|
||||
-webkit-mask-composite: source-in;
|
||||
mask-composite: intersect;
|
||||
}
|
||||
@@ -1,64 +1,6 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
|
||||
export default {
|
||||
content: [
|
||||
'./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}',
|
||||
'./node_modules/preline/preline.js',
|
||||
],
|
||||
darkMode: 'class',
|
||||
theme: {
|
||||
extend: {
|
||||
typography: ({ theme }) => ({
|
||||
blog: {
|
||||
css: {
|
||||
'--tw-prose-body': theme('colors.neutral[700]'),
|
||||
'--tw-prose-headings': theme('colors.neutral[900]'),
|
||||
'--tw-prose-lead': theme('colors.neutral[700]'),
|
||||
'--tw-prose-links': theme('colors.orange[300]'),
|
||||
'--tw-prose-bold': theme('colors.neutral[900]'),
|
||||
'--tw-prose-counters': theme('colors.neutral[600]'),
|
||||
'--tw-prose-bullets': theme('colors.neutral[400]'),
|
||||
'--tw-prose-hr': theme('colors.neutral[300]'),
|
||||
'--tw-prose-quotes': theme('colors.neutral[500]'),
|
||||
'--tw-prose-quote-borders': theme('colors.neutral[300]'),
|
||||
'--tw-prose-captions': theme('colors.neutral[700]'),
|
||||
'--tw-prose-code': theme('colors.neutral[700]'),
|
||||
'--tw-prose-pre-code': theme('colors.neutral[900]'),
|
||||
'--tw-prose-pre-bg': theme('colors.white'),
|
||||
'--tw-prose-th-borders': theme('colors.neutral[300]'),
|
||||
'--tw-prose-td-borders': theme('colors.neutral[200]'),
|
||||
|
||||
'--tw-prose-invert-body': theme('colors.neutral[400]'),
|
||||
'--tw-prose-invert-headings': theme('colors.neutral[200]'),
|
||||
'--tw-prose-invert-lead': theme('colors.neutral[300]'),
|
||||
'--tw-prose-invert-links': theme('colors.orange[300]'),
|
||||
'--tw-prose-invert-bold': theme('colors.neutral[300]'),
|
||||
'--tw-prose-invert-counters': theme('colors.neutral[400]'),
|
||||
'--tw-prose-invert-bullets': theme('colors.neutral[600]'),
|
||||
'--tw-prose-invert-hr': theme('colors.neutral[700]'),
|
||||
'--tw-prose-invert-quotes': theme('colors.neutral[500]'),
|
||||
'--tw-prose-invert-quote-borders': theme('colors.neutral[500]'),
|
||||
'--tw-prose-invert-captions': theme('colors.neutral[400]'),
|
||||
'--tw-prose-invert-code': theme('colors.neutral[350]'),
|
||||
'--tw-prose-invert-pre-code': theme('colors.neutral[300]'),
|
||||
'--tw-prose-invert-th-borders': theme('colors.neutral[600]'),
|
||||
'--tw-prose-invert-td-borders': theme('colors.neutral[700]'),
|
||||
},
|
||||
},
|
||||
DEFAULT: {
|
||||
css: {
|
||||
blockquote: {
|
||||
fontStyle: 'normal',
|
||||
quotes: 'none',
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
require('tailwindcss/nesting'),
|
||||
require('preline/plugin'),
|
||||
require('@tailwindcss/typography'),
|
||||
],
|
||||
content: ['./node_modules/preline/preline.js'],
|
||||
plugins: [require('preline/plugin')],
|
||||
};
|
||||
|
||||
@@ -4,20 +4,19 @@
|
||||
"exclude": ["dist"],
|
||||
"compilerOptions": {
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "src",
|
||||
"jsx": "react-jsx",
|
||||
"baseUrl": ".",
|
||||
"types": ["astro/client"],
|
||||
"paths": {
|
||||
"@/*": ["*"],
|
||||
"@/*": ["src/*"],
|
||||
"@src/*": ["src/*"],
|
||||
"@lib/*": ["lib/*"],
|
||||
"@components/*": ["components/*"],
|
||||
"@content/*": ["content/*"],
|
||||
"@layouts/*": ["layouts/*"],
|
||||
"@styles/*": ["styles/*"],
|
||||
"@pages/*": ["pages/*"],
|
||||
"@support/*": ["support/*"],
|
||||
"@images/*": ["images/*"]
|
||||
"@lib/*": ["src/lib/*"],
|
||||
"@components/*": ["src/components/*"],
|
||||
"@content/*": ["src/content/*"],
|
||||
"@layouts/*": ["src/layouts/*"],
|
||||
"@styles/*": ["src/styles/*"],
|
||||
"@pages/*": ["src/pages/*"],
|
||||
"@support/*": ["src/scripts/*"],
|
||||
"@images/*": ["src/images/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user