Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

Cssing (#47)

PickleNikba748d4fe04b
diff --git a/src/app/page.tsx b/src/app/page.tsx
index e913e581..df5ee7e2 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -15,9 +15,9 @@ export default function Index() {
className="relative -mx-4 flex flex-col items-center justify-center gap-4 overflow-hidden px-4"
style={{ minHeight: 'calc(100dvh - 112px)' }}
>
- <div className="absolute left-1/2 top-1/2 -z-10 h-96 w-96 -translate-x-[30%] -translate-y-[80%] rounded-full bg-[#3178c6] blur-3xl dark:bg-[#3178c6]/40"></div>
- <div className="absolute right-1/2 top-1/2 -z-10 h-96 w-96 -translate-y-[80%] translate-x-[30%] rounded-full bg-[#3178c6]/20 blur-3xl dark:bg-[#3178c6]/20"></div>
- <h1 className="bg-gradient-to-r from-[#3178c6] to-white bg-clip-text text-center text-9xl font-black tracking-tighter text-transparent dark:to-white ">
+ <div className="absolute left-1/2 top-1/2 -z-10 h-96 w-96 -translate-x-[30%] -translate-y-[69%] rounded-full bg-black/0 blur-3xl dark:bg-white/20"></div>
+ <div className="absolute right-1/2 top-1/2 -z-10 h-96 w-96 -translate-y-[69%] translate-x-[30%] rounded-full bg-[#3178c6]/0 blur-3xl dark:bg-[#3178c6]/20"></div>
+ <h1 className="bg-gradient-to-r from-[#3178c6] to-black bg-clip-text text-center text-9xl font-black text-transparent dark:to-white ">
Type
<br />
Hero
diff --git a/src/components/challenge/description-panel.tsx b/src/components/challenge/description-panel.tsx
index e056cd26..bb8403a3 100644
--- a/src/components/challenge/description-panel.tsx
+++ b/src/components/challenge/description-panel.tsx
@@ -62,7 +62,7 @@ export function DescriptionPanel({ challenge }: Props) {
return (
<div className="flex-1 overflow-y-auto rounded-md bg-white dark:bg-zinc-800">
<Tabs defaultValue="description" className="w-full">
- <TabsList className="grid w-full grid-cols-2">
+ <TabsList className="sticky top-0 grid w-full grid-cols-2">
<TabsTrigger value="description">Description</TabsTrigger>
<TabsTrigger value="solutions">Solutions</TabsTrigger>
</TabsList>
diff --git a/src/components/challenge/editor/index.tsx b/src/components/challenge/editor/index.tsx
index a21ea738..d7279d79 100644
--- a/src/components/challenge/editor/index.tsx
+++ b/src/components/challenge/editor/index.tsx
@@ -143,7 +143,7 @@ export const CodePanel = ({ prompt }: Props) => {
return (
<div className="flex flex-1 flex-col overflow-hidden rounded-md">
- <div className="container flex h-[40px] flex-row-reverse items-center space-y-2 border border-b-zinc-300 bg-muted dark:border-b-zinc-700">
+ <div className="container sticky top-0 flex h-[40px] flex-row-reverse items-center border border-b-zinc-300 bg-muted py-2 dark:border-b-zinc-700">
<Dialog>
<DialogTrigger>
<Settings size={20} className="stroke-gray-500 hover:stroke-gray-400" />
@@ -169,7 +169,7 @@ export const CodePanel = ({ prompt }: Props) => {
onChange={(code) => setCode(code ?? '')}
/>
</div>
- <div className="flex items-center justify-between bg-muted p-2">
+ <div className="sticky bottom-0 flex items-center justify-between bg-muted p-2">
{editorState && <VimStatusBar editor={editorState} />}
<Button
size="sm"
diff --git a/src/components/challenge/index.tsx b/src/components/challenge/index.tsx
index 10570b77..f458a3cb 100644
--- a/src/components/challenge/index.tsx
+++ b/src/components/challenge/index.tsx
@@ -35,7 +35,10 @@ export async function Challenge({ id }: Props) {
}
return (
- <div className="flex h-full gap-2 p-4">
+ <div
+ className="flex flex-col gap-2 py-4 md:flex-row"
+ style={{ maxHeight: 'calc(100dvh - 3.5rem)' }}
+ >
<DescriptionPanel challenge={challenge} />
<CodePanel prompt={challenge.prompt} />
diff --git a/src/components/explore/index.tsx b/src/components/explore/index.tsx
index 98a3f76f..078cb0b6 100644
--- a/src/components/explore/index.tsx
+++ b/src/components/explore/index.tsx
@@ -9,7 +9,7 @@ export function Explore() {
return (
<div className="flex h-full flex-col">
<section className="mb-8 flex max-w-[69ch] flex-col items-start gap-2 pt-4 md:pt-8">
- <TypographyH1 className="bg-gradient-to-r from-indigo-500 to-pink-500 bg-clip-text text-transparent dark:to-pink-400">
+ <TypographyH1 className="bg-gradient-to-r from-[#3178C6] to-pink-500 bg-clip-text text-transparent dark:to-pink-400">
Explore
</TypographyH1>
<TypographyP>
diff --git a/src/components/ui/navigation.tsx b/src/components/ui/navigation.tsx
index 87a2a9bf..74869589 100644
--- a/src/components/ui/navigation.tsx
+++ b/src/components/ui/navigation.tsx
@@ -61,15 +61,14 @@ export function Navigation() {
<div className="relative flex basis-1/3">
<a className="flex items-center space-x-2 duration-300" href="/">
<svg
- className="h-6 w-6 rounded-md bg-indigo-500 p-[2px]"
+ className="h-6 w-6 rounded-md bg-[#3178C6] p-[2px]"
viewBox="0 0 512 512"
- fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_1_2)">
<path
d="M462 0H50C22.3858 0 0 22.3858 0 50V462C0 489.614 22.3858 512 50 512H462C489.614 512 512 489.614 512 462V50C512 22.3858 489.614 0 462 0Z"
- fill="#6366f1"
+ fill="#3178C6"
/>
<path
fillRule="evenodd"