-
-
{doc.title}
- {!!doc?.description?.length && (
-
- {doc.description}
-
- )}
-
-
+
+
{doc.title}
+ {!!doc?.description?.length && (
+
+ {doc.description}
+
+ )}
+ {doc ? <>{doc.content}> : 'empty doc'}
>
)
}
diff --git a/src/app/globals.css b/src/app/globals.css
index e2b124f9..6af5aca7 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -3,8 +3,11 @@
/* Write your own custom base styles here */
:root {
+ @apply [--rgrid-m:theme(spacing.4)] lg:[--rgrid-m:theme(spacing.6)];
+ @apply [--rgrid-g:theme(spacing.4)] lg:[--rgrid-g:theme(spacing.12)];
+ @apply [--header-height:theme(spacing.16)];
+
scroll-behavior: smooth;
- --header-height: 4rem; /* TODO: make this value dynamic */
scroll-margin-top: var(--header-height);
font-size: 17px;
}
@@ -21,20 +24,16 @@ body {
@tailwind utilities;
/* Stop purging. */
-/* Your own custom utilities */
-@supports (position: sticky) {
- @media (min-width: theme('screens.lg')) {
- .sticky\?lg\:h-screen {
- height: 100vh !important;
- }
- .sticky\?lg\:h-\(screen-16\) {
- height: calc(100vh - theme('spacing.16'));
- }
- }
+main :target {
+ @apply scroll-m-[calc(var(--header-height)+theme(spacing.4))];
}
-.content-container :target {
- scroll-margin-top: theme('spacing.20'); /*
's h-16 + more spacing */
+.post-container > * {
+ @apply me-auto ms-auto block max-w-[calc(100%-2*var(--rgrid-m))] lg:max-w-4xl;
+
+ &.sandpack {
+ @apply xl:max-w-none;
+ }
}
/**
@@ -48,8 +47,8 @@ pre[class*='language-'] {
text-align: left;
white-space: pre;
word-spacing: normal;
- word-break: normal;
- word-wrap: normal;
+ /* word-break: normal; */
+ /* word-wrap: normal; */
line-height: 1.5;
tab-size: 4;
hyphens: none;
diff --git a/src/app/page.tsx b/src/app/page.tsx
index aaecb4ec..a147d0f5 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -157,7 +157,7 @@ export default function Page() {
Documentation
- .
pmndrs
+ .
pmnd.rs
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
new file mode 100644
index 00000000..e69de29b
diff --git a/src/components/Icon.tsx b/src/components/Icon.tsx
index 920452dc..b8bdf9a5 100644
--- a/src/components/Icon.tsx
+++ b/src/components/Icon.tsx
@@ -19,6 +19,21 @@ const icons = {
),
+ close: (props: SVGProps) => (
+
+ ),
enter: (props: SVGProps) => (
)
}
@@ -89,7 +63,7 @@ function NavItem({