177 lines
8.7 KiB
Plaintext
177 lines
8.7 KiB
Plaintext
serve_stylesheet :: (res: *Response) {
|
|
set_header(res, "Content-Type", "text/stylesheet");
|
|
res.body = stylesheet;
|
|
}
|
|
|
|
stylesheet : string = #string DONE
|
|
:root {
|
|
--ink: #050505;
|
|
--paper: #FAFAFA;
|
|
--gold: #C5A059;
|
|
--gold-dim: #E6DCC8;
|
|
--grey: #888888;
|
|
--space: 2rem;
|
|
}
|
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=JetBrains+Mono:wght@400&family=Playfair+Display:ital,wght@0,300;0,400;0,600;1,400&display=swap');
|
|
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
body { background-color: var(--paper); color: var(--ink); font-family: 'Inter', sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
|
|
a { text-decoration: none; color: inherit; }
|
|
h1, h2, h3 { font-family: 'Playfair Display', serif; font-weight: 400; letter-spacing: -0.02em; }
|
|
.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--grey); }
|
|
|
|
/* --- NAV --- */
|
|
nav { padding: 1rem var(--space); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--gold-dim); position: sticky; top: 0; background: rgba(250, 250, 250, 0.98); backdrop-filter: blur(10px); z-index: 100; }
|
|
.brand { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 600; letter-spacing: 0.15em; display: flex; align-items: center; }
|
|
.brand::before { content: ''; display: block; width: 6px; height: 6px; background: var(--gold); margin-right: 16px; transform: rotate(45deg); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--gold-dim); }
|
|
.nav-actions a { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.1em; margin-left: var(--space); font-size: 0.8rem; transition: color 0.2s; }
|
|
.nav-actions a:hover { color: var(--gold); }
|
|
.nav-actions a.active { color: var(--gold); border-bottom: 1px solid var(--gold); }
|
|
|
|
/* --- LAYOUT: SIDEBAR + GRID --- */
|
|
.archive-layout {
|
|
display: grid;
|
|
grid-template-columns: 240px 1fr; /* Sidebar Fixed Width */
|
|
min-height: 100vh;
|
|
}
|
|
|
|
/* Sidebar Styling */
|
|
.sidebar {
|
|
padding: 2rem var(--space) 2rem 2rem;
|
|
border-right: 1px solid var(--gold-dim);
|
|
position: sticky;
|
|
top: 60px; /* Below Nav */
|
|
height: calc(100vh - 60px);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.filter-group { margin-bottom: 2.5rem; }
|
|
.filter-title { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; font-weight: bold; margin-bottom: 1rem; display: block; color: var(--ink); }
|
|
|
|
.filter-option {
|
|
display: flex; justify-content: space-between; align-items: center;
|
|
padding: 0.4rem 0; cursor: pointer; font-size: 0.9rem; color: #555; transition: color 0.2s;
|
|
}
|
|
.filter-option:hover { color: var(--gold); }
|
|
.filter-option.selected { color: var(--ink); font-weight: 500; }
|
|
.filter-option.selected::before { content: '●'; color: var(--gold); font-size: 0.6rem; margin-right: 0.5rem; }
|
|
|
|
.count { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: #ccc; }
|
|
|
|
/* Dense Grid Styling */
|
|
.main-content { padding: 2rem; }
|
|
|
|
.archive-header {
|
|
display: flex; justify-content: space-between; align-items: baseline;
|
|
margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.grid-dense {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Smaller cards */
|
|
gap: 2rem;
|
|
}
|
|
|
|
.asset-card { cursor: pointer; display: block; }
|
|
.asset-card:hover .asset-img img { transform: scale(1.05); filter: grayscale(0%); }
|
|
|
|
.asset-img {
|
|
width: 100%; aspect-ratio: 1/1; /* Square for dense packing */
|
|
background: #eee; overflow: hidden; margin-bottom: 0.8rem;
|
|
}
|
|
.asset-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: all 0.3s ease; }
|
|
|
|
.asset-title { font-size: 1rem; font-weight: 500; line-height: 1.2; margin-bottom: 0.2rem; }
|
|
.asset-meta { display: flex; gap: 1rem; }
|
|
|
|
.recipe-hero { width: 100%; height: 80vh; position: relative; overflow: hidden; z-index: 1; }
|
|
.recipe-hero img { width: 100%; height: 120%; object-fit: cover; position: absolute; top: 0; left: 0; will-change: transform; }
|
|
|
|
.content-wrapper { position: relative; z-index: 10; margin-top: -150px; padding: 0 var(--space); }
|
|
|
|
.header-card {
|
|
background: var(--paper); padding: 3rem var(--space); border: 1px solid var(--gold-dim);
|
|
max-width: 1200px; margin: 0 auto var(--space) auto; box-shadow: 0 20px 40px rgba(0,0,0,0.05);
|
|
}
|
|
.recipe-title { font-size: 4.5rem; line-height: 1; margin-bottom: 1.5rem; }
|
|
|
|
.specs { display: flex; gap: 3rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--gold-dim); }
|
|
.spec-val { font-family: 'Playfair Display', serif; font-size: 1.5rem; }
|
|
|
|
.layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 5rem; max-width: 1200px; margin: 0 auto; padding-bottom: 100px; padding-left: 20px; padding-right: 20px; }
|
|
|
|
.component-row { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; border-bottom: 1px solid var(--gold-dim); }
|
|
.component-name { font-weight: 500; font-size: 1.1rem; }
|
|
|
|
/* Dynamic Slots */
|
|
.slot-dynamic { background: var(--gold-transparent); padding: 1rem; margin: 1rem -1rem; border-left: 3px solid var(--gold); }
|
|
.slot-head { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
|
|
.slot-tag { color: var(--gold); font-weight: bold; }
|
|
|
|
/* HTMX Indicator styles */
|
|
.htmx-indicator { display: none; }
|
|
.htmx-request .htmx-indicator { display: inline; }
|
|
.htmx-request.reroll { animation: spin 0.5s linear infinite; }
|
|
@keyframes spin { 100% { transform: rotate(360deg); } }
|
|
|
|
.reroll { background: none; border: 1px solid var(--gold); color: var(--gold); border-radius: 50%; width: 24px; height: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.3s; }
|
|
.reroll:hover { background: var(--gold); color: var(--paper); }
|
|
|
|
.step { margin-bottom: 3rem; display: grid; grid-template-columns: 60px 1fr; }
|
|
.step-num { font-family: 'Playfair Display', serif; font-size: 2.5rem; color: var(--gold); font-style: italic; line-height: 1; }
|
|
.step-text { font-size: 1.15rem; font-weight: 300; max-width: 60ch; }
|
|
|
|
.edit-fab { position: fixed; bottom: 2rem; right: 2rem; width: 60px; height: 60px; border-radius: 50%; background: var(--ink); color: var(--gold); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,0.2); transition: transform 0.2s; z-index: 99; }
|
|
.edit-fab:hover { transform: scale(1.1); }
|
|
|
|
/* --- INPUTS --- */
|
|
input[type="text"], textarea {
|
|
background: transparent; border: none; border-bottom: 1px dashed var(--gold-dim);
|
|
width: 100%; color: var(--ink); font-family: inherit; padding: 0; margin: 0;
|
|
resize: none; outline: none;
|
|
}
|
|
input[type="text"]:focus, textarea:focus { border-bottom: 1px solid var(--gold); background: rgba(197, 160, 89, 0.05); }
|
|
|
|
.input-title { font-family: 'Playfair Display', serif; font-size: 4.5rem; line-height: 1; margin-bottom: 1rem; }
|
|
.input-step { font-size: 1.15rem; font-weight: 300; line-height: 1.6; }
|
|
.input-comp { font-weight: 500; font-size: 1.1rem; }
|
|
|
|
.editor-container { max-width: 1200px; margin: 4rem auto; padding: 0 var(--space); display: grid; grid-template-columns: 1fr 1.5fr; gap: 5rem; }
|
|
|
|
.drop-zone {
|
|
width: 100%; height: 400px; background: #f0f0f0; border: 2px dashed var(--gold-dim);
|
|
display: flex; align-items: center; justify-content: center; flex-direction: column;
|
|
margin-bottom: 3rem; cursor: pointer; color: #888;
|
|
}
|
|
.drop-zone:hover { border-color: var(--gold); color: var(--gold); }
|
|
|
|
.add-btn {
|
|
background: transparent; border: 1px solid var(--gold-dim); color: var(--gold);
|
|
width: 100%; padding: 0.5rem; margin-top: 1rem; cursor: pointer;
|
|
font-family: 'JetBrains Mono', monospace; text-transform: uppercase; font-size: 0.7rem;
|
|
}
|
|
.add-btn:hover { border-color: var(--gold); }
|
|
|
|
/* --- DRAWER --- */
|
|
.drawer {
|
|
position: fixed; top: 0; right: -400px; width: 400px; height: 100vh;
|
|
background: #fff; border-left: 1px solid var(--gold); z-index: 200;
|
|
padding: 2rem; box-shadow: -10px 0 30px rgba(0,0,0,0.1);
|
|
transition: right 0.3s ease; display: flex; flex-direction: column;
|
|
}
|
|
.drawer.open { right: 0; }
|
|
|
|
.drawer-search { border: 1px solid var(--ink) !important; padding: 1rem !important; font-size: 1rem; margin-bottom: 2rem; }
|
|
.drawer-list { flex: 1; overflow-y: auto; list-style: none; }
|
|
.drawer-item { padding: 1rem 0; border-bottom: 1px solid #eee; cursor: pointer; display: flex; justify-content: space-between; }
|
|
.drawer-item:hover { color: var(--gold); }
|
|
|
|
.overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.2); z-index: 150; display: none; }
|
|
.overlay.visible { display: block; }
|
|
|
|
/* HTMX Loading State for Drawer */
|
|
.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
|
|
.htmx-request .htmx-indicator { opacity: 1; }
|
|
|
|
DONE
|