Erweiterungen

This commit is contained in:
2025-08-30 16:33:42 +02:00
parent 846b3999f2
commit 8ec6cb55d4
8 changed files with 874 additions and 0 deletions

View File

@@ -0,0 +1,182 @@
/* Styles for PDF Builder View */
.pdf-builder-root {
display: flex;
flex-direction: column;
gap: var(--lumo-space-m);
width: 100%;
}
.pdf-builder-workspace {
display: flex;
gap: var(--lumo-space-l);
align-items: flex-start;
width: 100%;
}
.pdf-palette {
width: 260px;
min-width: 240px;
border: 1px solid var(--lumo-contrast-20pct);
border-radius: var(--lumo-border-radius-m);
background: var(--lumo-base-color);
box-shadow: var(--lumo-box-shadow-xs);
padding: var(--lumo-space-m);
}
.pdf-palette .palette-title {
font-weight: 600;
margin-bottom: var(--lumo-space-s);
}
.pdf-palette .tool-item {
display: flex;
align-items: center;
gap: var(--lumo-space-m);
padding: var(--lumo-space-s);
border: 1px dashed var(--lumo-contrast-20pct);
border-radius: var(--lumo-border-radius-s);
cursor: grab;
user-select: none;
}
.pdf-palette .tool-item + .tool-item { margin-top: var(--lumo-space-s); }
.pdf-palette .tool-item:hover {
background: var(--lumo-contrast-5pct);
}
.pdf-canvas-wrapper {
flex: 1 1 auto;
display: flex;
justify-content: center;
}
.pdf-canvas {
width: 60%;
aspect-ratio: 210 / 297; /* A4 */
position: relative;
background: white;
border: 1px solid var(--lumo-contrast-20pct);
box-shadow: var(--lumo-box-shadow-m);
background-image: linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px),
linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
background-size: 20px 20px;
}
.canvas-frame {
position: absolute;
border: 3px solid var(--lumo-contrast-30pct); /* inactive: light gray */
border-radius: var(--lumo-border-radius-s);
background: rgba(255,255,255,0.9);
resize: none;
overflow: auto;
min-width: 80px;
min-height: 60px;
cursor: default;
user-select: none;
}
.canvas-frame.active {
border: 3px solid var(--lumo-primary-color); /* active: blue */
box-shadow: none;
resize: both;
cursor: default;
}
.canvas-frame .text-editor {
width: 100%;
height: 100%;
cursor: text;
user-select: text;
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: anywhere;
}
.canvas-frame .text-toolbar {
position: absolute;
left: 0;
top: -40px;
display: none;
align-items: center;
gap: var(--lumo-space-xs);
background: var(--lumo-base-color);
border: 1px solid var(--lumo-contrast-20pct);
border-radius: var(--lumo-border-radius-s);
box-shadow: var(--lumo-box-shadow-xs);
padding: 2px 4px;
cursor: default;
user-select: none;
}
.canvas-frame.active .text-toolbar { display: flex; }
.canvas-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pdf-builder-actions { display: flex; justify-content: flex-end; }
/* Capturing mode: hide frame borders, handles, toolbars for save/export */
.pdf-canvas.capturing .canvas-frame,
.pdf-canvas.capturing .canvas-frame.active {
border-color: transparent !important; /* hide border but keep layout */
box-shadow: none !important;
resize: none !important;
}
.pdf-canvas.capturing .frame-handle-move,
.pdf-canvas.capturing .text-toolbar {
display: none !important;
}
/* Image frames: no scrollbars */
.image-frame {
overflow: hidden; /* hide scrollbars */
-ms-overflow-style: none; /* IE/Edge */
scrollbar-width: none; /* Firefox */
}
.image-frame::-webkit-scrollbar { display: none; } /* WebKit */
/* Text frames: no scrolling allowed */
.text-frame {
overflow: hidden; /* disable scrolling */
-ms-overflow-style: none; /* IE/Edge */
scrollbar-width: none; /* Firefox */
}
.text-frame::-webkit-scrollbar { display: none; } /* WebKit */
/* Also disable scrolling inside the text editor */
.text-frame .text-editor {
overflow: hidden; /* disable scrolling */
-ms-overflow-style: none; /* IE/Edge */
scrollbar-width: none; /* Firefox */
}
.text-frame .text-editor::-webkit-scrollbar { display: none; } /* WebKit */
/* Move handle (top-left) visible only when active */
.frame-handle-move {
position: absolute;
top: 0;
left: 0;
width: 18px;
height: 18px;
display: none;
align-items: center;
justify-content: center;
font-size: 12px;
line-height: 1;
color: var(--lumo-primary-color);
background: #fff;
border: 1px solid var(--lumo-primary-color);
border-radius: 4px;
box-shadow: var(--lumo-box-shadow-xs);
cursor: grab;
z-index: 2;
user-select: none;
transform: translate(-50%, -50%); /* center the handle on the top-left corner */
}
.canvas-frame.active .frame-handle-move { display: flex; }
.frame-handle-move:active { cursor: grabbing; }
/* bottom-right visual icon removed; native CSS resize handle remains */