v0.7.4: light-versie voor de modelpagina's (light.html, js/light/, css/light.css; later in de HUGO-site in een Bootstrap col-12): één model in 3D, doorsnede (snijhoogte tot de goot) en 2D-plattegrond, met beperkte keuzes: per unit breedte en diepte (binnen UnitModel.LIMITS, per model/pagina te beperken), dakvorm met richting, goot- en nokhoogte (helling erbij) en wolfseind, dakbedekking, gevelbekleding met kleur en richting, accent van het model, trasraam (geen/steen, hoogte), binnenspots en buitenverlichting; zelfde berekening als de configurator maar alleen prijs (indicatief, incl. btw), maten, m², inhoud en gewicht zichtbaar; LightModel past keuzes toe op een schone kopie van het model (binnenwanden en inrichting schuiven mee, binnenwanden volgen de goot) en weigert keuzes die de indeling breken (ramen/deuren, binnenwanden, inrichting, ruimtes, overlap) met de dichtstbijzijnde maat die wel past; accordeon-paneel, responsief op de breedte van de tool (container queries), scrollwiel scrolt de pagina tenzij je in de 3D klikt of Ctrl houdt; opslaan = PDF (LightPdf): voorblad "Uw woningontwerp" met render, kerncijfers, keuzes, prijs, contact en QR-code naar de modelpagina (qrcode-generator, MIT), aanzichten en plattegrond (HousePdf klantvariant zonder productie-informatie) en het stappenplan met maatwerk en uitnodiging; doorsnede-afdekking naar HouseModel.sectionCaps (ook in de configurator): 1 mm boven de snede en over de wandtop van wanden die lager blijven, geen flikkerend regelwerk meer; OrbitControls met touch (één vinger draaien, twee vingers knijpen/schuiven); model Vecht (U-vorm 13 × 9,5 m, drie units rond een holte)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
51921650e3
commit
decbbb4b72
+189
@@ -0,0 +1,189 @@
|
||||
/*!
|
||||
* Tectum
|
||||
* Copyright © 2026 Machiel Heinen.
|
||||
* Alle rechten voorbehouden. Gebruik uitsluitend met schriftelijke toestemming.
|
||||
* Zie LICENTIE.md.
|
||||
*/
|
||||
|
||||
/* Light-versie (modelpagina's). Alles onder .tectum-light, zodat de stijl van de site eromheen (Bootstrap) er niet
|
||||
mee botst; koppen, labels en knoppen krijgen daarom expliciet marge, gewicht en regelhoogte. De indeling volgt de
|
||||
breedte van de tool zelf (container queries), niet die van het scherm: in de site staat hij in een col-12. */
|
||||
.tectum-light {
|
||||
--tl-primary: #b95913;
|
||||
--tl-primary-hover: #9c4a0f;
|
||||
--tl-primary-soft: rgba(185, 89, 19, 0.10);
|
||||
--tl-text: #212121;
|
||||
--tl-muted: #5b6673;
|
||||
--tl-faint: #8a94a0;
|
||||
--tl-surface: #ffffff;
|
||||
--tl-bg: #f9faf5;
|
||||
--tl-border: #c5ced9;
|
||||
--tl-border-soft: #e2e7ee;
|
||||
--tl-radius: 10px;
|
||||
container: tl / inline-size;
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: var(--tl-text);
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
text-align: left;
|
||||
}
|
||||
.tectum-light *, .tectum-light *::before, .tectum-light *::after { box-sizing: border-box; }
|
||||
.tectum-light button { font: inherit; color: inherit; line-height: 1.2; margin: 0; text-transform: none; }
|
||||
.tectum-light h2, .tectum-light h3 { margin: 0; font-weight: 700; line-height: 1.2; }
|
||||
.tectum-light label { display: block; margin: 0; }
|
||||
.tectum-light small { font-size: 11px; color: var(--tl-faint); font-weight: 400; }
|
||||
|
||||
.tectum-light .tl-wrap {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 340px;
|
||||
height: clamp(560px, 80vh, 800px);
|
||||
border: 1px solid var(--tl-border-soft);
|
||||
border-radius: var(--tl-radius);
|
||||
overflow: hidden;
|
||||
background: var(--tl-surface);
|
||||
}
|
||||
|
||||
/* 3D / plattegrond */
|
||||
.tectum-light .tl-stage { position: relative; min-width: 0; min-height: 0; background: #dfe6ec; }
|
||||
.tectum-light .tl-3d { position: absolute; inset: 0; }
|
||||
.tectum-light .tl-3d canvas { display: block; width: 100%; height: 100%; touch-action: none; }
|
||||
.tectum-light .tl-plan { position: absolute; inset: 0; width: 100%; height: 100%; display: none; background: #fff; }
|
||||
.tectum-light.view-plan .tl-plan { display: block; }
|
||||
.tectum-light.view-plan .tl-3d { visibility: hidden; }
|
||||
.tectum-light .tl-viewbar, .tectum-light .tl-cutbar, .tectum-light .tl-busy, .tectum-light .tl-hint {
|
||||
position: absolute; background: rgba(255, 255, 255, 0.94); border-radius: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
.tectum-light .tl-viewbar { top: 10px; left: 10px; display: flex; gap: 2px; padding: 3px; }
|
||||
.tectum-light .tl-viewbar button {
|
||||
display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 10px;
|
||||
border-radius: 6px; cursor: pointer; color: var(--tl-muted); white-space: nowrap;
|
||||
}
|
||||
.tectum-light .tl-viewbar button:hover { color: var(--tl-text); }
|
||||
.tectum-light .tl-viewbar button.on { background: var(--tl-primary-soft); color: var(--tl-primary); font-weight: 600; }
|
||||
.tectum-light .tl-cutbar { top: 52px; left: 10px; display: none; align-items: center; gap: 10px; padding: 6px 12px; font-size: 13px; }
|
||||
.tectum-light.view-cut .tl-cutbar { display: flex; }
|
||||
.tectum-light .tl-cutbar input { width: 150px; accent-color: var(--tl-primary); }
|
||||
.tectum-light .tl-cutbar output { min-width: 4.2em; font-weight: 600; font-variant-numeric: tabular-nums; }
|
||||
.tectum-light .tl-hint { left: 10px; bottom: 10px; font-size: 12px; color: var(--tl-muted); padding: 3px 8px; box-shadow: none; pointer-events: none; }
|
||||
.tectum-light .tl-busy { top: 10px; right: 10px; display: none; align-items: center; gap: 8px; padding: 6px 12px; }
|
||||
.tectum-light.is-busy .tl-busy { display: inline-flex; }
|
||||
.tectum-light.is-busy .tl-panel { pointer-events: none; }
|
||||
.tectum-light .tl-spinner {
|
||||
width: 14px; height: 14px; border: 2px solid var(--tl-border); border-top-color: var(--tl-primary);
|
||||
border-radius: 50%; animation: tl-spin 0.8s linear infinite;
|
||||
}
|
||||
@keyframes tl-spin { to { transform: rotate(360deg); } }
|
||||
.tectum-light .tl-toast {
|
||||
position: absolute; left: 50%; bottom: 42px; transform: translate(-50%, 8px); width: max-content; max-width: calc(100% - 24px);
|
||||
background: #2b2f33; color: #fff; padding: 9px 14px; border-radius: 8px; font-size: 13px;
|
||||
opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none;
|
||||
}
|
||||
.tectum-light .tl-toast.on { opacity: 1; transform: translate(-50%, 0); }
|
||||
|
||||
/* Paneel */
|
||||
.tectum-light .tl-panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--tl-border-soft); background: var(--tl-surface); }
|
||||
.tectum-light .tl-head { padding: 14px 16px 10px; }
|
||||
.tectum-light .tl-title { font-size: 18px; }
|
||||
.tectum-light .tl-sub { margin-top: 3px; color: var(--tl-muted); font-size: 12px; }
|
||||
.tectum-light .tl-sections { flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid var(--tl-border-soft); }
|
||||
|
||||
/* Accordeon */
|
||||
.tectum-light .tl-sec { border-bottom: 1px solid var(--tl-border-soft); }
|
||||
.tectum-light .tl-sec-head {
|
||||
display: flex; align-items: center; gap: 9px; width: 100%; padding: 11px 16px; border: 0; background: none; cursor: pointer; text-align: left;
|
||||
}
|
||||
.tectum-light .tl-sec-head:hover { background: var(--tl-bg); }
|
||||
.tectum-light .tl-sec-head > .bi:first-child { color: var(--tl-primary); }
|
||||
.tectum-light .tl-sec-title { font-weight: 600; }
|
||||
.tectum-light .tl-sec-sum { flex: 1; min-width: 0; text-align: right; font-size: 12px; color: var(--tl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.tectum-light .tl-chev { font-size: 12px; color: var(--tl-faint); transition: transform 0.15s; }
|
||||
.tectum-light .tl-sec.open .tl-chev { transform: rotate(180deg); }
|
||||
.tectum-light .tl-sec.open .tl-sec-sum { visibility: hidden; }
|
||||
.tectum-light .tl-sec-body { padding: 0 16px 12px; }
|
||||
|
||||
/* Velden */
|
||||
.tectum-light .tl-field { margin: 8px 0; }
|
||||
.tectum-light .tl-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--tl-muted); margin-bottom: 4px; }
|
||||
.tectum-light .tl-val { color: var(--tl-text); font-weight: 600; text-align: right; }
|
||||
.tectum-light .tl-note { font-size: 11px; color: var(--tl-faint); }
|
||||
.tectum-light .tl-seg { display: flex; flex-wrap: wrap; gap: 4px; }
|
||||
.tectum-light .tl-seg button {
|
||||
flex: 1 1 auto; border: 1px solid var(--tl-border); background: var(--tl-surface); border-radius: 7px;
|
||||
padding: 6px 8px; cursor: pointer; white-space: nowrap; font-size: 13px;
|
||||
}
|
||||
.tectum-light .tl-seg button:hover:not(:disabled) { border-color: var(--tl-primary); }
|
||||
.tectum-light .tl-seg button.on { border-color: var(--tl-primary); background: var(--tl-primary-soft); color: var(--tl-primary); font-weight: 600; }
|
||||
.tectum-light .tl-units .tl-seg button { flex: 0 0 auto; min-width: 40px; }
|
||||
.tectum-light button:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
.tectum-light button:focus-visible, .tectum-light input:focus-visible, .tectum-light .tl-map-u:focus-visible { outline: 2px solid var(--tl-primary); outline-offset: 2px; }
|
||||
|
||||
.tectum-light .tl-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.tectum-light .tl-sw {
|
||||
width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.18);
|
||||
background: var(--sw); cursor: pointer; overflow: hidden; box-shadow: 0 0 0 2px var(--tl-surface);
|
||||
}
|
||||
.tectum-light .tl-sw img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
.tectum-light .tl-sw.on { box-shadow: 0 0 0 2px var(--tl-surface), 0 0 0 4px var(--tl-primary); }
|
||||
|
||||
.tectum-light .tl-slider { margin: 8px 0; }
|
||||
.tectum-light .tl-sl-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
|
||||
.tectum-light .tl-sl-head output { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||||
.tectum-light .tl-slider input { display: block; width: 100%; margin: 4px 0 0; accent-color: var(--tl-primary); }
|
||||
|
||||
.tectum-light .tl-mapbox { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
|
||||
.tectum-light .tl-map { display: block; flex: 1; min-width: 0; max-height: 96px; }
|
||||
.tectum-light .tl-map-u { cursor: pointer; outline: none; }
|
||||
.tectum-light .tl-map-u rect { fill: var(--tl-bg); stroke: var(--tl-border); stroke-width: 40; }
|
||||
.tectum-light .tl-map-u text { fill: var(--tl-muted); font-weight: 600; pointer-events: none; }
|
||||
.tectum-light .tl-map-u:hover rect { stroke: var(--tl-primary); }
|
||||
.tectum-light .tl-map-u.on rect { fill: var(--tl-primary-soft); stroke: var(--tl-primary); stroke-width: 60; }
|
||||
.tectum-light .tl-map-u.on text { fill: var(--tl-primary); }
|
||||
|
||||
/* Kerncijfers en prijs */
|
||||
.tectum-light .tl-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; padding: 10px 16px; font-size: 12px; border-top: 1px solid var(--tl-border-soft); background: var(--tl-bg); }
|
||||
.tectum-light .tl-kv { display: flex; justify-content: space-between; gap: 6px; }
|
||||
.tectum-light .tl-kv span { color: var(--tl-muted); }
|
||||
.tectum-light .tl-kv b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||||
.tectum-light .tl-buy { display: flex; align-items: center; gap: 8px; padding: 10px 16px 12px; background: var(--tl-bg); }
|
||||
.tectum-light .tl-price { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
||||
.tectum-light .tl-price-val { font-size: 21px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
|
||||
.tectum-light .tl-price-note { font-size: 11px; color: var(--tl-muted); }
|
||||
.tectum-light .tl-btn {
|
||||
display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 14px;
|
||||
border: 1px solid var(--tl-border); border-radius: 8px; background: var(--tl-surface); cursor: pointer;
|
||||
}
|
||||
.tectum-light .tl-btn:hover { border-color: var(--tl-primary); }
|
||||
.tectum-light .tl-btn.tl-icon { width: 40px; padding: 0; }
|
||||
.tectum-light .tl-btn.tl-primary { background: var(--tl-primary); border-color: var(--tl-primary); color: #fff; font-weight: 600; }
|
||||
.tectum-light .tl-btn.tl-primary:hover { background: var(--tl-primary-hover); }
|
||||
|
||||
/* Middel (bijv. tablet, of een smallere kolom): paneel iets smaller. */
|
||||
@container tl (max-width: 980px) {
|
||||
.tectum-light .tl-wrap { grid-template-columns: minmax(0, 1fr) 300px; }
|
||||
.tectum-light .tl-viewbar button { padding: 6px 8px; }
|
||||
}
|
||||
|
||||
/* Smal (telefoon): 3D boven, keuzes eronder; prijs en PDF blijven onderin beeld zolang de keuzes in beeld zijn. */
|
||||
@container tl (max-width: 720px) {
|
||||
.tectum-light .tl-wrap { grid-template-columns: 1fr; height: auto; overflow: visible; }
|
||||
.tectum-light .tl-stage { height: min(62vh, 115cqw); border-radius: var(--tl-radius) var(--tl-radius) 0 0; overflow: hidden; }
|
||||
.tectum-light .tl-panel { border-left: 0; border-top: 1px solid var(--tl-border-soft); border-radius: 0 0 var(--tl-radius) var(--tl-radius); }
|
||||
.tectum-light .tl-sections { overflow: visible; }
|
||||
.tectum-light .tl-buy { position: sticky; bottom: 0; z-index: 2; border-top: 1px solid var(--tl-border-soft); box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06); border-radius: 0 0 var(--tl-radius) var(--tl-radius); }
|
||||
.tectum-light .tl-hint { display: none; }
|
||||
.tectum-light .tl-viewbar { left: 8px; right: 8px; top: 8px; }
|
||||
.tectum-light .tl-viewbar button { flex: 1; justify-content: center; }
|
||||
.tectum-light .tl-cutbar { left: 8px; right: 8px; top: 50px; }
|
||||
.tectum-light .tl-cutbar input { flex: 1; width: auto; }
|
||||
.tectum-light .tl-busy { top: auto; bottom: 10px; right: 10px; }
|
||||
/* Grotere tikvlakken */
|
||||
.tectum-light .tl-seg button { padding: 9px 8px; }
|
||||
.tectum-light .tl-sw { width: 36px; height: 36px; }
|
||||
.tectum-light .tl-sec-head { padding: 13px 16px; }
|
||||
.tectum-light .tl-slider input { height: 28px; }
|
||||
}
|
||||
@container tl (max-width: 380px) {
|
||||
.tectum-light .tl-viewbar button .bi { display: none; }
|
||||
.tectum-light .tl-facts { grid-template-columns: 1fr; }
|
||||
}
|
||||
Reference in New Issue
Block a user