14e8087aac
- Implemented a new web interface for previewing designs, allowing users to search and filter by category. - Created `app.js` to handle state management, event binding, and rendering of design records. - Developed `index.html` as the main structure for the design gallery, including search input and design list. - Added `styles.css` for styling the design gallery and ensuring a responsive layout. - Updated Rust backend to support site generation, including new commands for building and serving the site. - Refactored catalog parsing to support new data structure for design entries. - Enhanced the sync process to collect site records and generate appropriate URLs for previews. - Introduced a new serving mechanism for the generated site, allowing local previews of designs.
373 lines
6.2 KiB
CSS
373 lines
6.2 KiB
CSS
:root {
|
|
color-scheme: light;
|
|
--bg: #fafafa;
|
|
--panel: #ffffff;
|
|
--panel-alt: #fcfcfc;
|
|
--text: #111111;
|
|
--text-soft: #666666;
|
|
--text-faint: #888888;
|
|
--border: #eaeaea;
|
|
--border-strong: #d7d7d7;
|
|
--chip: #f4f4f4;
|
|
--chip-active: #111111;
|
|
--shadow: 0 24px 80px rgba(17, 17, 17, 0.06);
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html {
|
|
scrollbar-width: thin;
|
|
scrollbar-color: #d0d0d0 transparent;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
background:
|
|
radial-gradient(circle at top left, rgba(0, 0, 0, 0.035), transparent 22%),
|
|
linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
|
|
color: var(--text);
|
|
font-family: "Geist", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
|
|
}
|
|
|
|
body ::-webkit-scrollbar {
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
|
|
body ::-webkit-scrollbar-thumb {
|
|
background: #d8d8d8;
|
|
border: 2px solid transparent;
|
|
border-radius: 999px;
|
|
background-clip: padding-box;
|
|
}
|
|
|
|
body ::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
a {
|
|
color: inherit;
|
|
text-decoration: none;
|
|
}
|
|
|
|
code {
|
|
font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
|
|
background: #f4f4f4;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 2px 6px;
|
|
}
|
|
|
|
.shell {
|
|
min-height: 100vh;
|
|
display: grid;
|
|
grid-template-columns: 360px minmax(0, 1fr);
|
|
}
|
|
|
|
.sidebar {
|
|
position: sticky;
|
|
top: 0;
|
|
height: 100vh;
|
|
overflow: auto;
|
|
padding: 28px 22px;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
backdrop-filter: blur(14px);
|
|
border-right: 1px solid var(--border);
|
|
}
|
|
|
|
.content {
|
|
padding: 28px;
|
|
display: grid;
|
|
grid-template-rows: auto minmax(0, 1fr);
|
|
gap: 16px;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.eyebrow {
|
|
margin-bottom: 10px;
|
|
color: var(--text-faint);
|
|
font-size: 11px;
|
|
line-height: 1;
|
|
letter-spacing: 0.14em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.page-title,
|
|
.hero-title {
|
|
margin: 0;
|
|
letter-spacing: -0.05em;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 34px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.page-copy {
|
|
margin: 14px 0 18px;
|
|
color: var(--text-soft);
|
|
font-size: 14px;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
.search-input {
|
|
width: 100%;
|
|
padding: 13px 14px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 14px;
|
|
outline: none;
|
|
background: #ffffff;
|
|
color: var(--text);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.search-input:focus {
|
|
border-color: var(--text);
|
|
box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
|
|
}
|
|
|
|
.chip-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin: 16px 0 18px;
|
|
}
|
|
|
|
.chip {
|
|
border: 1px solid var(--border);
|
|
background: var(--chip);
|
|
color: var(--text-soft);
|
|
border-radius: 999px;
|
|
padding: 8px 12px;
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
transition: 140ms ease;
|
|
}
|
|
|
|
.chip:hover {
|
|
border-color: var(--border-strong);
|
|
color: var(--text);
|
|
}
|
|
|
|
.chip.active {
|
|
background: var(--chip-active);
|
|
border-color: var(--chip-active);
|
|
color: #ffffff;
|
|
}
|
|
|
|
.design-list {
|
|
display: grid;
|
|
gap: 10px;
|
|
}
|
|
|
|
.design-card {
|
|
border: 1px solid var(--border);
|
|
background: var(--panel);
|
|
border-radius: 18px;
|
|
padding: 14px;
|
|
cursor: pointer;
|
|
transition: 140ms ease;
|
|
}
|
|
|
|
.design-card:hover,
|
|
.design-card.active {
|
|
border-color: var(--text);
|
|
transform: translateY(-1px);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.design-name {
|
|
margin: 0 0 6px;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
line-height: 1.25;
|
|
}
|
|
|
|
.design-category {
|
|
margin: 0 0 8px;
|
|
color: var(--text-faint);
|
|
font-size: 12px;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.design-brief {
|
|
margin: 0;
|
|
color: var(--text-soft);
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.design-status {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
margin-top: 10px;
|
|
padding: 4px 8px;
|
|
border-radius: 999px;
|
|
background: #f7f7f7;
|
|
color: var(--text-faint);
|
|
font-size: 11px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.hero-card,
|
|
.preview-card {
|
|
border: 1px solid var(--border);
|
|
border-radius: 24px;
|
|
background: var(--panel);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.hero-card {
|
|
padding: 24px;
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
gap: 20px;
|
|
align-items: start;
|
|
}
|
|
|
|
.hero-sub {
|
|
margin: 10px 0 12px;
|
|
color: var(--text-faint);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.hero-brief {
|
|
margin: 0;
|
|
color: var(--text-soft);
|
|
font-size: 14px;
|
|
line-height: 1.75;
|
|
max-width: 76ch;
|
|
}
|
|
|
|
.hero-actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.action-button {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
min-height: 40px;
|
|
padding: 0 14px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 999px;
|
|
background: #ffffff;
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
transition: 140ms ease;
|
|
}
|
|
|
|
.action-button:hover {
|
|
border-color: var(--text);
|
|
}
|
|
|
|
.action-button-primary {
|
|
background: var(--text);
|
|
border-color: var(--text);
|
|
color: #ffffff;
|
|
}
|
|
|
|
.action-button-active {
|
|
border-color: var(--text);
|
|
}
|
|
|
|
.action-button-disabled {
|
|
pointer-events: none;
|
|
color: var(--text-faint);
|
|
background: #f7f7f7;
|
|
border-color: var(--border);
|
|
}
|
|
|
|
.status-pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: 40px;
|
|
padding: 0 12px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 999px;
|
|
background: #f7f7f7;
|
|
color: var(--text-faint);
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.preview-card {
|
|
overflow: hidden;
|
|
display: grid;
|
|
grid-template-rows: auto minmax(0, 1fr);
|
|
min-height: 72vh;
|
|
}
|
|
|
|
.preview-bar {
|
|
padding: 14px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 12px;
|
|
background: var(--panel-alt);
|
|
}
|
|
|
|
.preview-label {
|
|
color: var(--text-faint);
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.14em;
|
|
}
|
|
|
|
.preview-link {
|
|
color: var(--text-soft);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.preview-link:hover {
|
|
color: var(--text);
|
|
}
|
|
|
|
.preview-frame {
|
|
width: 100%;
|
|
height: 100%;
|
|
min-height: 72vh;
|
|
border: 0;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.empty-state {
|
|
padding: 20px 14px;
|
|
color: var(--text-faint);
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
@media (max-width: 1100px) {
|
|
.shell {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.sidebar {
|
|
position: static;
|
|
height: auto;
|
|
border-right: 0;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.hero-card {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.hero-actions {
|
|
justify-content: flex-start;
|
|
}
|
|
}
|