From 4400c1f234d79e4572bbc98957e6abb1c5e985e0 Mon Sep 17 00:00:00 2001 From: Munishwar kalra Date: Wed, 4 Nov 2026 17:00:46 +0530 Subject: [PATCH] Move the docs styles into docs.css and fix the page spacing --- src/app/docs/docs.css | 36 ++++++++++++++++++++++++++++++++++++ src/app/docs/page.tsx | 1 + src/app/globals.css | 36 ------------------------------------ 3 files changed, 37 insertions(+), 36 deletions(-) create mode 100644 src/app/docs/docs.css diff --git a/src/app/docs/docs.css b/src/app/docs/docs.css new file mode 100644 index 0000000..68ed915 --- /dev/null +++ b/src/app/docs/docs.css @@ -0,0 +1,36 @@ +/* Docs page */ +.docs-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; } +.docs-toc { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; } +.docs-toc a { padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-size: 13px; transition: background .2s ease, color .2s ease; } +.docs-toc a:hover { background: #eef2fb; color: var(--brand); } +.docs-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; } +.docs-section { color: #3b4458; font-size: 14px; line-height: 1.75; } +.docs-section h2 { font-size: 19px; letter-spacing: -.4px; margin-bottom: 14px; } +.docs-section h3 { margin: 22px 0 6px; font-size: 14px; font-weight: 600; color: var(--ink); } +.docs-section p { margin: 0 0 12px; } +.docs-section ul, .docs-section ol { margin: 0 0 12px; padding-left: 20px; } +.docs-section ul { list-style: disc; } +.docs-section ol { list-style: decimal; } +.docs-section li { margin-bottom: 4px; } +.docs-section code { padding: 1px 5px; border-radius: 5px; background: #f1f3f8; font-size: 12.5px; } +.docs-table-wrap { overflow-x: auto; margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 10px; } +.docs-table { width: 100%; border-collapse: collapse; font-size: 13px; } +.docs-table th { text-align: left; padding: 10px 14px; background: #f7f8fb; color: var(--text-2); font-size: 12px; letter-spacing: .6px; text-transform: uppercase; } +.docs-table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; } +.docs-table td:first-child { white-space: nowrap; width: 1%; padding-right: 24px; } +.docs-callout { display: flex; gap: 12px; margin: 4px 0 14px; padding: 14px 16px; border-radius: 10px; border: 1px solid #c9d6f7; background: #f2f6ff; } +.docs-callout svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; color: var(--brand); } +.docs-callout strong { display: block; color: var(--ink); font-size: 13.5px; } +.docs-callout p { margin: 4px 0 0; font-size: 13px; } +.docs-callout.is-warn { border-color: #f0d9a8; background: #fff9ec; } +.docs-callout.is-warn svg { color: #b7791f; } +@media (max-width: 900px) { + .docs-layout { grid-template-columns: 1fr; } + .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; } + .docs-toc .dash-nav-caption { width: 100%; margin: 0; } + .docs-toc a { border: 1px solid var(--line); background: #fff; } + .docs-table td:first-child { white-space: normal; } +} +.docs-page { padding-block: 56px 96px; } +.docs-hero { margin-bottom: 36px; } +.docs-hero h1 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -1.3px; font-weight: 600; color: var(--ink); } diff --git a/src/app/docs/page.tsx b/src/app/docs/page.tsx index d7cc7d1..ea6a9f5 100644 --- a/src/app/docs/page.tsx +++ b/src/app/docs/page.tsx @@ -5,6 +5,7 @@ import { AlertTriangle, Info } from "lucide-react"; import { Button } from "@/components/ui/button"; import { getCurrentUser } from "@/lib/session"; import { Icon, Mark } from "@/modules/landing/icons"; +import "./docs.css"; export const metadata: Metadata = { title: "Docs — Dotkeep", diff --git a/src/app/globals.css b/src/app/globals.css index baf39ae..f9a4f0d 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -667,39 +667,6 @@ a.dash-tile { display: block; } .auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-3); font-size: 12px; letter-spacing: .6px; text-transform: uppercase; } .auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #e2e5ea; } -/* Docs page */ -.docs-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; } -.docs-toc { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; } -.docs-toc a { padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-size: 13px; transition: background .2s ease, color .2s ease; } -.docs-toc a:hover { background: #eef2fb; color: var(--brand); } -.docs-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; } -.docs-section { color: #3b4458; font-size: 14px; line-height: 1.75; } -.docs-section h2 { font-size: 19px; letter-spacing: -.4px; margin-bottom: 14px; } -.docs-section h3 { margin: 22px 0 6px; font-size: 14px; font-weight: 600; color: var(--ink); } -.docs-section p { margin: 0 0 12px; } -.docs-section ul, .docs-section ol { margin: 0 0 12px; padding-left: 20px; } -.docs-section ul { list-style: disc; } -.docs-section ol { list-style: decimal; } -.docs-section li { margin-bottom: 4px; } -.docs-section code { padding: 1px 5px; border-radius: 5px; background: #f1f3f8; font-size: 12.5px; } -.docs-table-wrap { overflow-x: auto; margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 10px; } -.docs-table { width: 100%; border-collapse: collapse; font-size: 13px; } -.docs-table th { text-align: left; padding: 10px 14px; background: #f7f8fb; color: var(--text-2); font-size: 12px; letter-spacing: .6px; text-transform: uppercase; } -.docs-table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; } -.docs-table td:first-child { white-space: nowrap; width: 1%; padding-right: 24px; } -.docs-callout { display: flex; gap: 12px; margin: 4px 0 14px; padding: 14px 16px; border-radius: 10px; border: 1px solid #c9d6f7; background: #f2f6ff; } -.docs-callout svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; color: var(--brand); } -.docs-callout strong { display: block; color: var(--ink); font-size: 13.5px; } -.docs-callout p { margin: 4px 0 0; font-size: 13px; } -.docs-callout.is-warn { border-color: #f0d9a8; background: #fff9ec; } -.docs-callout.is-warn svg { color: #b7791f; } -@media (max-width: 900px) { - .docs-layout { grid-template-columns: 1fr; } - .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; } - .docs-toc .dash-nav-caption { width: 100%; margin: 0; } - .docs-toc a { border: 1px solid var(--line); background: #fff; } - .docs-table td:first-child { white-space: normal; } -} /* Landing: hero preview (a small copy of the real Vault page, sample data) */ .pv { display: grid; grid-template-columns: 152px minmax(0, 1fr); background: #fff; color: var(--ink); font-size: 12px; line-height: 1.4; } @@ -737,6 +704,3 @@ a.dash-tile { display: block; } .pv-row { grid-template-columns: minmax(0, 1.2fr) 100px minmax(0, 1fr); column-gap: 20px; } .pv-filter { display: none; } } -.docs-page { padding-block: 56px 96px; } -.docs-hero { margin-bottom: 36px; } -.docs-hero h1 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -1.3px; font-weight: 600; color: var(--ink); }