Add local 3D model viewer (three.js + occt-import-js) for STEP/STL, 8px box + caption; embed guide; licenses

This commit is contained in:
trilium-share-gruvbox
2026-08-28 15:24:56 +02:00
parent 11216f8996
commit e13a5433d9
11 changed files with 1752 additions and 1 deletions
+50
View File
@@ -808,6 +808,56 @@ html.theme-light #content code {
border-radius: 8px;
}
/* ---------- 3D model viewer (STL / STEP) ---------- */
.model-viewer {
margin: 1em 0;
background: #1d2021;
border: 1px solid var(--background-highlight);
border-radius: 8px;
overflow: hidden;
}
.model-viewer-canvas {
position: relative;
}
.model-viewer-status {
padding: 48px;
text-align: center;
color: #a89984;
font-size: 0.9em;
}
.model-viewer-status.error {
color: #fb4934;
}
.model-viewer-hint {
position: absolute;
top: 8px;
left: 10px;
font-size: 0.75em;
color: #a89984;
z-index: 2;
pointer-events: none;
}
.model-viewer-caption {
font-size: 0.85em;
font-style: italic;
color: var(--text-menu);
text-align: center;
padding: 4px 12px;
background: var(--background-secondary);
border-top: 1px solid var(--background-highlight);
}
.model-viewer canvas {
display: block;
width: 100%;
height: auto;
}
/* ---------- Bildunterschriften (Gruvbox) ---------- */
#content figcaption {
font-size: 0.85em;