diff --git a/src/index.css b/src/index.css index 83304f3..3c78667 100644 --- a/src/index.css +++ b/src/index.css @@ -17,7 +17,7 @@ main { } h2 { - @apply gradient-text text-center text-5xl font-extrabold tracking-tighter sm:text-8xl; + @apply gradient-text text-5xl font-extrabold tracking-tighter sm:text-8xl; } code { @@ -30,18 +30,10 @@ a { } /** image and video gradient background */ -figure:has(span):has(img), -figure:has(span):has(video) { - @apply relative; - - span { - @apply gradient-bg absolute -inset-1 block w-full origin-[50%_50%] rotate-3 rounded-2xl; - } - - img, - video { - @apply relative w-full self-center justify-self-center rounded-xl object-cover; - } +figure:has(video), +figure:has(img), +p:has(img:only-child) { + @apply gradient-media; } /** container sections */ @@ -86,7 +78,7 @@ section[id] { @apply !fixed !bottom-auto top-0 !border-b-base-content/10 bg-base-100 !text-base-content; & > a > img { - @apply ml-0 scale-100; + @apply !ml-0 !scale-100; } } @@ -98,6 +90,20 @@ section[id] { animation: octocat-wave 560ms ease-in-out; } } + + .gradient-media { + @apply relative; + + &:before { + content: ""; + @apply gradient-bg absolute -inset-1 block w-full origin-[50%_50%] rotate-3 rounded-2xl; + } + + img, + video { + @apply relative w-full self-center justify-self-center rounded-xl object-cover; + } + } } /** utilities */ diff --git a/src/index.tsx b/src/index.tsx index 638b0e5..375f6a3 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -15,6 +15,7 @@ import { createHashRouter, Outlet, RouterProvider, + ScrollRestoration, useLocation, } from "react-router-dom"; @@ -28,6 +29,11 @@ const routes = createHashRouter([ element: , loader: Routes.Home.loader, }, + { + path: "/blog", + element: , + loader: Routes.Blog.loader, + }, ], }, ]); @@ -49,6 +55,7 @@ function Root() { return ( + diff --git a/src/lib/api.ts b/src/lib/api.ts index 8731c17..4093a00 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -62,6 +62,16 @@ export const Query = { } } } + discussions(first: $num) { + nodes { + author { + login + } + body + createdAt + title + } + } } } `), diff --git a/src/partials/features.tsx b/src/partials/features.tsx index 539c26d..3afc538 100644 --- a/src/partials/features.tsx +++ b/src/partials/features.tsx @@ -73,7 +73,6 @@ export default function () { className="flex flex-col place-items-center gap-4 sm:flex-row sm:gap-24 sm:odd:flex-row-reverse" >
-