Restore Stitch Home and initialize three frontend workspaces

This commit is contained in:
2026-12-05 20:37:13 +08:00
parent 9843afe0bc
commit d21e866bc2
52 changed files with 3022 additions and 1460 deletions
-159
View File
@@ -1,159 +0,0 @@
@import "tailwindcss";
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-border: var(--border);
--color-ring: var(--primary);
--color-like: #a33850;
}
:root {
--background: #f8f7f2;
--foreground: #202923;
--primary: #265849;
--primary-foreground: #ffffff;
--muted: #edf0e8;
--muted-foreground: #58665f;
--border: #dfe4da;
--surface: #fffefa;
}
body {
min-height: 100vh;
background: var(--background);
color: var(--foreground);
font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
button, summary { cursor: pointer; }
:where(button, summary, input):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.site-header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner {
display: grid;
grid-template-columns: 1fr minmax(13rem, 23rem) auto auto;
align-items: center;
gap: 16px;
min-height: 68px;
max-width: 1480px;
margin-inline: auto;
padding-inline: clamp(16px, 4vw, 56px);
}
.brand { display: inline-flex; justify-self: start; align-items: center; gap: 9px; font-size: 23px; font-weight: 800; letter-spacing: -.065em; }
.brand-mark { display: inline-grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #f3f3df; background: var(--primary); }
.brand-period { margin-left: -7px; color: #578370; }
.search { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--background); color: var(--muted-foreground); }
.search > svg { flex: none; }
.search input { min-width: 0; width: 100%; height: 39px; padding: 0; background: transparent; color: var(--foreground); font-size: 14px; }
.search:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }
.search input:focus-visible { outline: none; }
.header-avatar { overflow: hidden; width: 35px; height: 35px; border-radius: 50%; background: var(--muted); }
.site-grid {
display: grid;
grid-template-columns: 154px minmax(0, 1fr) minmax(208px, 263px);
align-items: start;
gap: clamp(18px, 3vw, 46px);
max-width: 1480px;
margin-inline: auto;
padding: 32px clamp(16px, 4vw, 56px) 64px;
}
.rail, .discovery { position: sticky; top: 100px; }
.rail-nav { display: grid; gap: 6px; }
.nav-entry { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 13px; border-radius: 10px; text-align: left; white-space: nowrap; font-size: 14px; font-weight: 600; }
.nav-entry:hover, .nav-active { background: #e8eee4; color: var(--primary); }
.view-heading { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.view-heading h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.1; letter-spacing: -.04em; }
.feed-switch, .column-switch { display: flex; flex: none; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: var(--muted); }
.feed-switch button { border-radius: 8px; padding: 7px 12px; color: var(--muted-foreground); font-size: 13px; font-weight: 650; }
.feed-switch [aria-pressed=true], .column-switch [aria-pressed=true] { background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px #20292318; }
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.channels { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); white-space: nowrap; font-size: 13px; }
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed=true] { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.column-switch button { width: 30px; height: 29px; }
.note-grid { columns: var(--feed-columns, 3); column-gap: 14px; }
.note-grid[data-columns="1"] { --feed-columns: 1; max-width: 580px; margin-inline: auto; }
.note-grid[data-columns="2"] { --feed-columns: 2; }
.note-card { break-inside: avoid; display: inline-block; width: 100%; margin-bottom: 14px; padding: 5px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); vertical-align: top; }
.note-open { display: block; border-radius: 10px; }
.note-image { position: relative; overflow: hidden; background: #e0e7db; border-radius: 10px; }
.media-icon, .pin { position: absolute; top: 9px; display: grid; place-items: center; background: #1d2520df; color: #fff; }
.media-icon { right: 9px; width: 28px; height: 28px; border-radius: 50%; }
.pin { left: 9px; padding: 3px 7px; border-radius: 5px; font-size: 11px; }
.empty-state { padding: 45px 20px; border: 1px dashed var(--border); border-radius: 14px; text-align: center; color: var(--muted-foreground); }
.discovery { display: grid; gap: 15px; }
.discovery-panel { padding: 17px 15px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); font-size: 13px; }
.discovery-panel h2 { margin-bottom: 6px; font-size: 16px; font-weight: 800; }
.topic { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 5px; padding: 10px 0; text-align: left; color: var(--primary); }
.topic:hover b { text-decoration: underline; }
.topic small { display: block; margin-top: 2px; color: var(--muted-foreground); }
.topic + .topic, .suggestion + .suggestion { border-top: 1px solid var(--border); }
.suggestion { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
.suggestion-avatar { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border-radius: 50%; background: #e2ebe0; color: var(--primary); font-weight: 750; }
.profile-card { border: 1px solid var(--border); border-radius: 17px; background: var(--surface); }
.profile-cover { width: 100%; height: clamp(130px, 21vw, 215px); border-radius: 16px 16px 0 0; background: #d4e0d2; object-fit: cover; }
.profile-body { padding: 0 clamp(14px, 4vw, 27px) 20px; }
.profile-actions { display: flex; min-height: 55px; align-items: center; gap: 12px; }
.profile-avatar { width: clamp(64px, 12vw, 96px); aspect-ratio: 1; z-index: 1; margin-top: -38px; border: 4px solid var(--surface); border-radius: 22px; background: var(--muted); object-fit: cover; }
.profile-name { display: flex; align-items: center; gap: 7px; font-size: 29px; font-weight: 800; }
.verified { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; background: var(--primary); color: white; }
.profile-bio { margin-block: 13px; font-size: 14px; }
.profile-meta, .profile-stats { display: flex; flex-wrap: wrap; gap: 10px 16px; color: var(--muted-foreground); font-size: 13px; }
.profile-meta > * { display: inline-flex; align-items: center; gap: 5px; }
.profile-meta button:hover { text-decoration: underline; }
.profile-stats { margin-top: 15px; }
.profile-stats b { color: var(--foreground); }
.profile-tabs { display: flex; gap: 5px; margin: 15px 0; overflow-x: auto; }
.profile-tabs button { padding: 9px 13px; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; }
.profile-tabs [aria-pressed=true] { border-color: var(--primary); color: var(--primary); font-weight: 750; }
.profile-menu { position: relative; }
.profile-menu summary { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--border); border-radius: 8px; list-style: none; }
.profile-menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; z-index: 2; top: calc(100% + 7px); right: 0; width: 155px; padding: 5px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px #20292319; }
.menu-panel button { display: flex; width: 100%; align-items: center; gap: 7px; padding: 7px; border-radius: 6px; text-align: left; font-size: 13px; }
.menu-panel button:hover { background: var(--muted); }
.dialog { position: fixed; inset: 0; z-index: 10; width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--foreground); }
.dialog::backdrop { background: #161e19a6; }
.dialog-content { position: relative; display: grid; gap: 13px; padding: 24px; }
.dialog-close { position: absolute; top: 10px; right: 10px; }
.modal-cover { width: 100%; max-height: 52vh; background: var(--muted); object-fit: contain; border-radius: 10px; }
.account-details > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.account-details dt { color: var(--muted-foreground); }
.notice { position: fixed; z-index: 6; right: 16px; bottom: 20px; max-width: calc(100vw - 32px); overflow-wrap: anywhere; padding: 10px 15px; border-radius: 8px; background: var(--primary); color: white; }
@media (max-width: 1100px) {
.site-grid { grid-template-columns: 134px minmax(0, 1fr); }
.discovery { display: none; }
}
@media (max-width: 720px) {
.site-grid { display: block; padding-top: 18px; padding-bottom: calc(75px + env(safe-area-inset-bottom)); }
.rail { position: fixed; inset: auto 0 0; z-index: 5; border-top: 1px solid var(--border); background: var(--surface); padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); }
.rail-nav { grid-template-columns: repeat(4, 1fr); }
.nav-entry { justify-content: center; flex-direction: column; gap: 2px; padding: 4px; font-size: 11px; }
.header-inner { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px; min-height: 56px; }
.brand { gap: 0; font-size: 0; }
.brand-period { display: none; }
.search { padding-inline: 7px; gap: 5px; }
.search input { font-size: 16px; }
.view-heading { min-height: 43px; }
.note-grid { column-gap: 9px; }
.note-card { margin-bottom: 9px; }
.notice { bottom: 70px; }
}
@media (max-width: 400px) {
.feed-toolbar { align-items: flex-start; }
.chip { padding-inline: 8px; }
}
+1 -5
View File
@@ -1,11 +1,7 @@
import type { Metadata } from "next";
import type { ReactNode } from "react";
import "./globals.css";
export const metadata: Metadata = {
title: "Bedrock · 发现",
description: "发现关于独立开发、数字生活与城市漫游的笔记。",
};
export const metadata: Metadata = { title: "Dashboard" };
export default function RootLayout({ children }: { children: ReactNode }) {
return <html lang="zh-CN"><body>{children}</body></html>;
+1 -3
View File
@@ -1,5 +1,3 @@
import { Bedrock } from "@/components/bedrock";
export default function Page() {
return <Bedrock />;
return <main><h1>Dashboard</h1></main>;
}