diff --git a/src/pages/projects/index.astro b/src/pages/projects/index.astro
index 445e169..c2c82a4 100644
--- a/src/pages/projects/index.astro
+++ b/src/pages/projects/index.astro
@@ -1,10 +1,10 @@
---
import { getCollection } from "astro:content";
-import PageLayout from "@layouts/PageLayout.astro";
-import TopLayout from "@layouts/TopLayout.astro";
-import BottomLayout from "@layouts/BottomLayout.astro";
-import Projects from "@components/Projects";
-import { PROJECTS } from "@consts";
+import PageLayout from "@/layouts/PageLayout.astro";
+import TopLayout from "@/layouts/TopLayout.astro";
+import BottomLayout from "@/layouts/BottomLayout.astro";
+// import Projects from "@components/Projects";
+import { PROJECTS } from "@/consts";
const projects = (await getCollection("projects"))
.filter((project) => !project.data.draft)
@@ -23,7 +23,9 @@ const tags = [
-
+
+
{JSON.stringify(projects)}
+
{JSON.stringify(tags)}
diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts
index 67e86a7..cf4a8fb 100644
--- a/src/pages/rss.xml.ts
+++ b/src/pages/rss.xml.ts
@@ -1,6 +1,6 @@
import rss from "@astrojs/rss";
import { getCollection } from "astro:content";
-import { SITE } from "@consts";
+import { SITE } from "@/consts";
type Context = {
site: string;
@@ -17,13 +17,13 @@ export async function GET(context: Context) {
}));
const items = [...posts, ...projects].filter(
- ({ item }) => !item.data.draft
+ ({ item }) => !item.data.draft,
);
items.sort(
(a, b) =>
new Date(b.item.data.date).getTime() -
- new Date(a.item.data.date).getTime()
+ new Date(a.item.data.date).getTime(),
);
return rss({
@@ -34,7 +34,7 @@ export async function GET(context: Context) {
title: item.data.title,
description: item.data.summary,
pubDate: item.data.date,
- link: `/${pre}/${item.slug}/`,
+ link: `/${pre}/${item.id}/`,
})),
});
}
diff --git a/src/pages/search/index.astro b/src/pages/search/index.astro
index 136d0e1..9a23215 100644
--- a/src/pages/search/index.astro
+++ b/src/pages/search/index.astro
@@ -1,15 +1,15 @@
---
import { type CollectionEntry, getCollection } from "astro:content";
-import PageLayout from "@layouts/PageLayout.astro";
-import TopLayout from "@layouts/TopLayout.astro";
-import BottomLayout from "@layouts/BottomLayout.astro";
-import Search from "@components/Search";
-import { SEARCH } from "@consts";
+import PageLayout from "@/layouts/PageLayout.astro";
+import TopLayout from "@/layouts/TopLayout.astro";
+import BottomLayout from "@/layouts/BottomLayout.astro";
+import Search from "@/components/Search";
+import { SEARCH } from "@/consts";
const posts = (await getCollection("blog")).filter((post) => !post.data.draft);
const projects = (await getCollection("projects")).filter(
- (post) => !post.data.draft
+ (post) => !post.data.draft,
);
const data = [...posts, ...projects] as CollectionEntry<"blog">[];
diff --git a/src/pages/work/index.astro b/src/pages/work/index.astro
index f6d6705..0016f05 100644
--- a/src/pages/work/index.astro
+++ b/src/pages/work/index.astro
@@ -1,23 +1,23 @@
---
-import { getCollection } from "astro:content";
-import PageLayout from "@layouts/PageLayout.astro";
-import TopLayout from "@layouts/TopLayout.astro";
-import BottomLayout from "@layouts/BottomLayout.astro";
-import { WORK } from "@consts";
+import { getCollection, render } from "astro:content";
+import PageLayout from "@/layouts/PageLayout.astro";
+import TopLayout from "@/layouts/TopLayout.astro";
+import BottomLayout from "@/layouts/BottomLayout.astro";
+import { WORK } from "@/consts";
const collection = await getCollection("work");
collection.sort(
(a, b) =>
new Date(b.data.dateStart).getTime() -
- new Date(a.data.dateStart).getTime()
+ new Date(a.data.dateStart).getTime(),
);
const work = await Promise.all(
collection.map(async (item) => {
- const { Content } = await item.render();
+ const { Content } = await render(item);
return { ...item, Content };
- })
+ }),
);
function formatWorkDate(input: Date | string) {
diff --git a/src/styles/global.css b/src/styles/global.css
index 8baa589..e358531 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -1,148 +1,88 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
+@import "tailwindcss";
+@plugin "@tailwindcss/typography";
+@config "../../tailwind.config.js";
@layer base {
@font-face {
- font-family: "Atkinson";
- src: url("/fonts/atkinson-regular.woff") format("woff");
+ font-family: "DepartureMono";
+ src: url("/fonts/DepartureMono-Regular.woff") format("woff");
font-weight: 400;
font-style: normal;
font-display: swap;
}
-
@font-face {
- font-family: "Atkinson";
- src: url("/fonts/atkinson-bold.woff") format("woff");
+ font-family: "FiraCode";
+ src: url("/fonts/FiraCode-Regular.woff") format("woff");
+ font-weight: 400;
+ font-style: normal;
+ font-display: swap;
+ }
+ @font-face {
+ font-family: "FiraCode";
+ src: url("/fonts/FiraCode-Bold.woff") format("woff");
font-weight: 700;
font-style: normal;
font-display: swap;
}
-}
-html {
- overflow-y: scroll;
- color-scheme: light;
- background-color: white;
- font-family: "Atkinson", sans-serif;
-}
-
-html.dark {
- color-scheme: dark;
- background-color: black;
-}
-
-html,
-body {
- @apply h-full w-full antialiased;
- @apply bg-white dark:bg-black;
- @apply text-black/75 dark:text-white/75;
-}
-
-body {
- @apply relative flex flex-col;
-}
-
-main {
- @apply flex flex-col flex-1 bg-white dark:bg-black;
-}
-
-header {
- @apply border-b;
- @apply transition-all duration-300 ease-in-out;
-}
-
-header:not(.scrolled) {
- @apply bg-transparent border-transparent;
-}
-
-header.scrolled {
- @apply bg-white/75 dark:bg-black/50;
- @apply border-black/10 dark:border-white/25;
- @apply backdrop-blur-sm saturate-200;
-}
-
-article {
- @apply prose dark:prose-invert max-w-full pb-12;
-}
-
-.page-heading {
- @apply font-semibold text-black dark:text-white;
-}
-
-.blend {
- @apply transition-all duration-300 ease-in-out;
-}
-
-/** Light theme particles on home page */
-@keyframes animateParticle {
- from {
- transform: translateY(0px);
+ html {
+ overflow-y: scroll;
+ color-scheme: light;
+ background-color: white;
+ font-family: "FiraCode", monospace;
}
- to {
- transform: translateY(-2000px);
+
+ html.dark {
+ color-scheme: dark;
+ background-color: black;
}
-}
-/** styles for public /animation.js */
-.animate {
- opacity: 0;
- transform: translateY(50px);
- transition: opacity 1s ease, transform 1s ease;
-}
+ html,
+ body {
+ @apply h-full w-full antialiased;
+ @apply bg-white dark:bg-black;
+ @apply text-black/75 dark:text-white/75;
+ }
-.animate.show {
- opacity: 1;
- transform: translateY(0);
-}
+ body {
+ @apply relative flex flex-col;
+ }
-article img {
- padding-top: 20px;
- padding-bottom: 20px;
- display: block;
- margin: 0 auto;
-}
+ main {
+ @apply flex flex-col flex-1 bg-white dark:bg-black;
+ }
-/**
- * TWINKLE STARS
- */
+ header {
+ @apply border-b;
+ @apply transition-all duration-300 ease-in-out;
+ }
-#twinkle-star.template {
- @apply absolute -left-full; /* hide offscreen */
-}
+ header:not(.scrolled) {
+ @apply bg-transparent border-transparent;
+ }
-#twinkle-star.twinkle {
- @apply animate-twinkle; /* defined in tailwind.config */
-}
+ header.scrolled {
+ @apply bg-white/75 dark:bg-black/50;
+ @apply border-black/10 dark:border-white/25;
+ @apply backdrop-blur-sm saturate-200;
+ }
-/**
- * Meteors
- */
+ article {
+ @apply prose dark:prose-invert max-w-full pb-12;
+ }
-#meteors .shower {
- @apply absolute inset-0 top-0;
- @apply left-1/2 -translate-x-1/2;
- @apply w-screen aspect-square;
-}
+ .page-heading {
+ @apply font-semibold text-black dark:text-white;
+ }
-#meteors .meteor {
- @apply animate-meteor; /* defined in tailwind.config */
- @apply absolute top-1/2 left-1/2 w-px h-[75vh];
- @apply bg-gradient-to-b from-white to-transparent;
-}
+ .blend {
+ @apply transition-all duration-300 ease-in-out;
+ }
-#meteors .shower.ur {
- @apply rotate-45;
-}
-
-#meteors .shower.dr {
- @apply rotate-135;
-}
-
-#meteors .shower.dl {
- @apply rotate-225;
-}
-
-#meteors .shower.ul {
- @apply rotate-315;
-}
+ article img {
+ padding-top: 20px;
+ padding-bottom: 20px;
+ display: block;
+ margin: 0 auto;
+ }
+}
\ No newline at end of file
diff --git a/tailwind.config.js b/tailwind.config.js
new file mode 100644
index 0000000..4e48828
--- /dev/null
+++ b/tailwind.config.js
@@ -0,0 +1,33 @@
+import defaultTheme from "tailwindcss/defaultTheme";
+import typography from "@tailwindcss/typography";
+
+/** @type {import('tailwindcss').Config} */
+export default {
+ darkMode: ["class"],
+ content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
+ safelist: [
+ "font-departure"
+ ],
+ theme: {
+ extend: {
+ fontFamily: {
+ mono: ['"FiraCode"', ...defaultTheme.fontFamily.mono],
+ departure: ['"DepartureMono"', ...defaultTheme.fontFamily.mono],
+ },
+ typography: {
+ DEFAULT: {
+ css: {
+ maxWidth: "full",
+ },
+ },
+ },
+ rotate: {
+ 45: "45deg",
+ 135: "135deg",
+ 225: "225deg",
+ 315: "315deg",
+ },
+ },
+ },
+ plugins: [typography],
+};
diff --git a/tailwind.config.mjs b/tailwind.config.mjs
deleted file mode 100644
index 3ecca04..0000000
--- a/tailwind.config.mjs
+++ /dev/null
@@ -1,62 +0,0 @@
-import defaultTheme from "tailwindcss/defaultTheme";
-import typography from "@tailwindcss/typography";
-
-/** @type {import('tailwindcss').Config} */
-export default {
- darkMode: ["class"],
- content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
- theme: {
- extend: {
- fontFamily: {
- sans: ["Atkinson", ...defaultTheme.fontFamily.sans],
- },
- typography: {
- DEFAULT: {
- css: {
- maxWidth: "full",
- },
- },
- },
- rotate: {
- 45: "45deg",
- 135: "135deg",
- 225: "225deg",
- 315: "315deg",
- },
- animation: {
- twinkle: "twinkle 2s ease-in-out forwards",
- meteor: "meteor 3s ease-in-out forwards",
- },
- keyframes: {
- twinkle: {
- "0%": {
- opacity: 0,
- transform: "rotate(0deg)",
- },
- "50%": {
- opacity: 1,
- transform: "rotate(180deg)",
- },
- "100%": {
- opacity: 0,
- transform: "rotate(360deg)",
- },
- },
- meteor: {
- "0%": {
- opacity: 0,
- transform: "translateY(200%)",
- },
- "50%": {
- opacity: 1,
- },
- "100%": {
- opacity: 0,
- transform: "translateY(0)",
- },
- },
- },
- },
- },
- plugins: [typography],
-};
diff --git a/tsconfig.json b/tsconfig.json
index 09d8843..431f871 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -4,7 +4,7 @@
"strictNullChecks": true,
"baseUrl": ".",
"paths": {
- "@*": ["src/*"]
+ "@/*": ["src/*"]
},
"jsx": "preserve",
"jsxImportSource": "solid-js"