2026-03-15 12:25:50 +00:00
|
|
|
/* ========================================
|
|
|
|
|
Handwriting to Markdown — Plugin Styles
|
|
|
|
|
Prefisso hwm_ per evitare conflitti
|
|
|
|
|
======================================== */
|
|
|
|
|
|
2026-03-27 23:54:31 +00:00
|
|
|
/* ========================================
|
|
|
|
|
UTILITY CLASSES — Usate da JS per toggle
|
|
|
|
|
======================================== */
|
|
|
|
|
|
|
|
|
|
/* Nasconde un elemento (sostituisce style.display = 'none') */
|
|
|
|
|
.hwm_hidden {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Annulla pointer-events (usato da stripContentEditableFalse sul formato legacy) */
|
|
|
|
|
.hwm_no-pointer {
|
|
|
|
|
pointer-events: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Overflow hidden per l'animazione collapse del wrapper immagine */
|
|
|
|
|
.hwm_overflow-hidden {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Animazione altezza del wrapper clip (collapse/expand nuovo formato) */
|
|
|
|
|
.hwm_clip-wrapper {
|
|
|
|
|
transition: height 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
.hwm_clip-animating {
|
|
|
|
|
height: var(--hwm-clip-h, auto);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Lo span internal-embed decorato dal plugin riceve position:relative
|
|
|
|
|
(ancoraggo del pannello portale position:absolute) e pointer-events:none
|
|
|
|
|
(non blocca lo stylus Android; il pannello portale ha pointer-events:auto) */
|
|
|
|
|
.internal-embed[data-hwm-decorated="1"] {
|
|
|
|
|
position: relative;
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-15 12:25:50 +00:00
|
|
|
/* --- Container principale dell'embed --- */
|
|
|
|
|
.hwm_container {
|
|
|
|
|
position: relative;
|
|
|
|
|
border: 1px solid var(--background-modifier-border);
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-m);
|
2026-03-15 12:25:50 +00:00
|
|
|
overflow: hidden;
|
|
|
|
|
margin: 8px 0;
|
2026-03-27 23:54:31 +00:00
|
|
|
/* Sfondo via CSS var (impostato con setCssProps --hwm-bg) con fallback bianco */
|
|
|
|
|
background-color: var(--hwm-bg, #ffffff);
|
2026-03-15 23:03:31 +00:00
|
|
|
/* Riabilita pointer-events (i wrapper CM6 sopra hanno pointer-events: none
|
|
|
|
|
per non bloccare l'hit-test dell'handwriting Android) */
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-22 17:23:41 +00:00
|
|
|
/* --- Modalità handwriting Android (switch nelle impostazioni) ---
|
|
|
|
|
Quando attiva (classe hwm-handwriting-mode su document.body), i riquadri
|
|
|
|
|
handwriting mostrano un box compatto con icona invece dell'SVG a piena
|
|
|
|
|
altezza. Questo riduce l'area CE=false che interferisce con la proximity
|
|
|
|
|
detection dello stylus handwriting di Android.
|
2026-03-23 01:03:11 +00:00
|
|
|
L'SVG viene nascosto; il pannello portale (position:absolute) rimane visibile
|
2026-03-22 17:23:41 +00:00
|
|
|
sopra il box per permettere apertura editor, conversione ed eliminazione. */
|
|
|
|
|
.hwm-handwriting-mode .hwm-badge-mode {
|
|
|
|
|
/* Larghezza piena: lo span .internal-embed di default può restare stretto
|
|
|
|
|
quanto l'immagine — forziamo 100% per contenere correttamente il pannello portale */
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
box-sizing: border-box !important;
|
|
|
|
|
/* Altezza fissa: abbastanza alta da contenere il pannello portale (~34px)
|
|
|
|
|
senza occupare troppo spazio nel documento */
|
|
|
|
|
height: 72px !important;
|
|
|
|
|
max-height: 72px !important;
|
|
|
|
|
min-height: 72px !important;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
cursor: default;
|
|
|
|
|
/* Flex per centrare l'icona */
|
|
|
|
|
display: flex !important;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
background: var(--background-secondary, #f0f0f0);
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-m);
|
2026-03-22 17:23:41 +00:00
|
|
|
}
|
|
|
|
|
/* Nasconde l'SVG: mostriamo solo il box con l'icona */
|
|
|
|
|
.hwm-handwriting-mode .hwm-badge-mode img {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
/* Icona matita centrata via pseudo-elemento */
|
|
|
|
|
.hwm-handwriting-mode .hwm-badge-mode::after {
|
|
|
|
|
content: "✏️";
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
opacity: 0.5;
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-23 14:15:12 +00:00
|
|
|
/* SVG a piena larghezza in tutti i contesti (desktop).
|
|
|
|
|
Su mobile le regole .hwm-handwriting-mode sovrastano questo.
|
|
|
|
|
NO overflow:hidden sullo span: clipperebbe i tratti ai bordi dell'SVG.
|
|
|
|
|
Il border-radius va sull'img per arrotondarne gli angoli visivi. */
|
2026-03-22 17:23:41 +00:00
|
|
|
.internal-embed[src*="_handwriting/"] {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-m);
|
|
|
|
|
/* Bordo e ombra per rendere il riquadro visibile contro lo sfondo Obsidian */
|
|
|
|
|
border: 1.5px solid var(--background-modifier-border);
|
|
|
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
|
2026-03-23 14:45:35 +00:00
|
|
|
/* Elimina whitespace implicito sotto l'img (gap tra img e bordo su Android) */
|
|
|
|
|
padding: 0;
|
|
|
|
|
line-height: 0;
|
2026-03-22 17:23:41 +00:00
|
|
|
}
|
2026-03-16 07:54:35 +00:00
|
|
|
.internal-embed[src*="_handwriting/"] img {
|
2026-03-22 17:23:41 +00:00
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: auto;
|
|
|
|
|
max-height: none;
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-m);
|
2026-03-16 07:54:35 +00:00
|
|
|
}
|
|
|
|
|
|
2026-03-15 23:03:31 +00:00
|
|
|
/* Variante wiki ![[svg]]:
|
|
|
|
|
La classe hwm_container viene aggiunta DIRETTAMENTE allo span
|
|
|
|
|
.internal-embed di Obsidian (nessun wrapper esterno, per non
|
|
|
|
|
spostare i nodi CM6 e causare crash del virtual DOM).
|
|
|
|
|
L'immagine è già renderizzata da Obsidian; noi aggiungiamo solo
|
|
|
|
|
i bottoni come figli dello span. */
|
|
|
|
|
.hwm_container--wiki {
|
|
|
|
|
background: transparent; /* l'SVG ha già il suo sfondo */
|
|
|
|
|
width: 100%;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
.hwm_container--wiki img {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: auto;
|
2026-03-15 12:25:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Toolbar in alto a destra --- */
|
|
|
|
|
.hwm_toolbar {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 6px;
|
|
|
|
|
right: 6px;
|
|
|
|
|
z-index: 10;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 0; /* spacing gestito via margin-right sui bottoni, così i bottoni
|
|
|
|
|
nascosti (max-width:0, margin:0) non creano spazi vuoti */
|
|
|
|
|
padding: 3px 6px;
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-m);
|
2026-03-15 12:25:50 +00:00
|
|
|
background: rgba(240, 240, 240, 0.95);
|
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
|
|
|
|
opacity: 1;
|
|
|
|
|
transition: opacity 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Bottoni toolbar --- */
|
|
|
|
|
.hwm_btn {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
width: 28px;
|
|
|
|
|
height: 28px;
|
|
|
|
|
padding: 0;
|
|
|
|
|
border: none;
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-s);
|
2026-03-15 12:25:50 +00:00
|
|
|
background: transparent;
|
|
|
|
|
color: #666;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
line-height: 0;
|
|
|
|
|
/* Spacing via margin-right invece di gap, così i bottoni nascosti
|
|
|
|
|
(margin:0) non lasciano spazi vuoti nella toolbar compatta */
|
|
|
|
|
margin-right: 4px;
|
|
|
|
|
/* Animazione espansione/compressione toolbar */
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
max-width: 40px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
transition: max-width 0.2s ease, opacity 0.2s ease,
|
|
|
|
|
margin 0.2s ease, padding 0.2s ease;
|
|
|
|
|
}
|
|
|
|
|
/* Icone SVG inline dentro i bottoni */
|
|
|
|
|
.hwm_btn svg {
|
|
|
|
|
width: 16px;
|
|
|
|
|
height: 16px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
.hwm_btn:hover {
|
|
|
|
|
background: #e0e0e0;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
/* Bottone attivo (tool selezionato) */
|
|
|
|
|
.hwm_btn.hwm_active {
|
|
|
|
|
background: var(--interactive-accent);
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Bottone salva (evidenziato) --- */
|
|
|
|
|
.hwm_save-btn {
|
|
|
|
|
margin-left: 4px;
|
|
|
|
|
}
|
|
|
|
|
.hwm_save-btn:hover {
|
|
|
|
|
background: var(--interactive-accent);
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Bottone elimina (X rossa su hover) --- */
|
|
|
|
|
.hwm_delete-btn:hover {
|
|
|
|
|
background: #dc2626;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Selettore colori --- */
|
|
|
|
|
.hwm_colors {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 3px;
|
|
|
|
|
margin: 0 4px;
|
|
|
|
|
}
|
|
|
|
|
/* I pallini colore sono <div> (non <button>) per evitare che Obsidian Mobile
|
|
|
|
|
sovrascriva width/height con i propri stili globali sui button.
|
2026-03-27 23:54:31 +00:00
|
|
|
Il colore sfondo è impostato via setCssProps --hwm-btn-color.
|
|
|
|
|
Le dimensioni forzate con !important per resistere agli override di Obsidian Mobile. */
|
2026-03-15 12:25:50 +00:00
|
|
|
.hwm_color-btn {
|
|
|
|
|
display: inline-block;
|
2026-03-27 23:54:31 +00:00
|
|
|
width: 22px !important;
|
|
|
|
|
height: 22px !important;
|
|
|
|
|
min-width: 22px !important;
|
|
|
|
|
min-height: 22px !important;
|
2026-03-15 12:25:50 +00:00
|
|
|
border: 2px solid transparent;
|
2026-03-27 23:54:31 +00:00
|
|
|
border-radius: 50% !important;
|
2026-03-15 12:25:50 +00:00
|
|
|
cursor: pointer;
|
2026-03-27 23:54:31 +00:00
|
|
|
box-sizing: border-box !important;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
background-color: var(--hwm-btn-color, transparent);
|
2026-03-15 12:25:50 +00:00
|
|
|
}
|
|
|
|
|
.hwm_color-btn.hwm_active {
|
|
|
|
|
border-color: var(--interactive-accent);
|
|
|
|
|
}
|
|
|
|
|
.hwm_color-btn:hover {
|
|
|
|
|
border-color: #999;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Area canvas (editing) --- */
|
|
|
|
|
.hwm_canvas-wrap {
|
|
|
|
|
width: 100%;
|
2026-03-22 17:23:41 +00:00
|
|
|
/* Centra il canvas orizzontalmente quando il modal/tab è più largo
|
|
|
|
|
della risoluzione nativa del canvas (canvasWidth dalle settings) */
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
2026-03-15 12:25:50 +00:00
|
|
|
}
|
|
|
|
|
.hwm_canvas {
|
|
|
|
|
display: block;
|
2026-03-22 17:23:41 +00:00
|
|
|
/* max-width invece di width:100% per evitare che il canvas venga stirato
|
|
|
|
|
oltre la sua risoluzione nativa (canvasWidth dai settings).
|
|
|
|
|
Stirarlo causerebbe tratti pixelati nel modal / tab full-screen. */
|
|
|
|
|
max-width: 100%;
|
2026-03-15 12:25:50 +00:00
|
|
|
cursor: crosshair;
|
|
|
|
|
/* Sfondo bianco fisso */
|
|
|
|
|
background: #ffffff;
|
2026-03-28 18:03:17 +00:00
|
|
|
/* Previene scroll/zoom del browser durante il disegno con pennino/dito */
|
|
|
|
|
touch-action: none !important;
|
2026-03-15 12:25:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Handle di resize in basso --- */
|
|
|
|
|
.hwm_resize-handle {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 12px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
cursor: ns-resize;
|
|
|
|
|
background: #f5f5f5;
|
|
|
|
|
border-top: 1px solid #e0e0e0;
|
|
|
|
|
color: #999;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
user-select: none;
|
|
|
|
|
touch-action: none;
|
|
|
|
|
}
|
|
|
|
|
.hwm_resize-handle:hover {
|
|
|
|
|
background: #ebebeb;
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
2026-03-23 14:15:12 +00:00
|
|
|
.hwm_resize-handle--dark {
|
|
|
|
|
background: #2a2a2a;
|
|
|
|
|
border-top-color: #444;
|
|
|
|
|
color: #888;
|
|
|
|
|
}
|
|
|
|
|
.hwm_resize-handle--dark:hover {
|
|
|
|
|
background: #333;
|
|
|
|
|
color: #aaa;
|
|
|
|
|
}
|
2026-03-15 12:25:50 +00:00
|
|
|
|
2026-03-22 21:03:45 +00:00
|
|
|
/* --- Pannello portale floating (document.body, position:fixed) --- */
|
|
|
|
|
/* Stile chiaro (come la toolbar) — i bottoni .hwm_btn usano i loro colori di default */
|
|
|
|
|
.hwm_portal-panel {
|
|
|
|
|
position: fixed;
|
|
|
|
|
z-index: 1000;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 0; /* spacing via margin-right sui .hwm_btn */
|
|
|
|
|
padding: 3px 6px;
|
|
|
|
|
background: rgba(240, 240, 240, 0.95);
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
|
|
|
|
pointer-events: all;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Modal wiki editor --- */
|
|
|
|
|
.hwm_wiki-modal-content {
|
|
|
|
|
padding: 0;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
.hwm_wiki-modal-content .hwm_container {
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
border: none;
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- SVG collassato (bottone ↕) --- */
|
|
|
|
|
.hwm-collapsed {
|
|
|
|
|
max-height: 48px !important;
|
|
|
|
|
overflow: hidden !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Preview mode --- */
|
|
|
|
|
.hwm_preview-wrap {
|
|
|
|
|
position: relative;
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
/* L'immagine SVG occupa tutta la larghezza del container */
|
|
|
|
|
.hwm_preview-img {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: auto;
|
|
|
|
|
}
|
|
|
|
|
/* Bottone matita sovrapposto in alto a destra sulla preview */
|
|
|
|
|
.hwm_pencil-btn {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 8px;
|
|
|
|
|
right: 8px;
|
|
|
|
|
width: 32px !important;
|
|
|
|
|
height: 32px !important;
|
|
|
|
|
background: rgba(0, 0, 0, 0.45) !important;
|
|
|
|
|
border-radius: 6px !important;
|
|
|
|
|
color: #fff !important;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
transition: opacity 0.15s;
|
|
|
|
|
}
|
|
|
|
|
.hwm_preview-wrap:hover .hwm_pencil-btn {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
/* Su mobile il bottone è sempre visibile (no hover) */
|
|
|
|
|
.hwm_mobile .hwm_pencil-btn {
|
|
|
|
|
opacity: 1 !important;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-15 12:25:50 +00:00
|
|
|
/* --- Placeholder per canvas vuoto --- */
|
|
|
|
|
.hwm_placeholder {
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #999;
|
|
|
|
|
padding: 40px 0;
|
|
|
|
|
font-style: italic;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Errore parsing --- */
|
|
|
|
|
.hwm_error {
|
|
|
|
|
color: var(--text-error);
|
|
|
|
|
padding: 8px;
|
|
|
|
|
font-style: italic;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Separatore visivo nella toolbar --- */
|
|
|
|
|
.hwm_separator {
|
|
|
|
|
width: 1px;
|
|
|
|
|
height: 20px;
|
|
|
|
|
background: #d0d0d0;
|
|
|
|
|
margin: 0 6px 0 2px; /* destra più ampia per bilanciare visivamente */
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
transition: max-width 0.2s ease, opacity 0.2s ease,
|
|
|
|
|
margin 0.2s ease, padding 0.2s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Pallini colore: transizione per animazione toolbar --- */
|
|
|
|
|
.hwm_color-btn {
|
|
|
|
|
transition: max-width 0.2s ease, opacity 0.2s ease,
|
|
|
|
|
margin 0.2s ease, padding 0.2s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Toolbar compatta (mobile) ---
|
|
|
|
|
Bottoni nascosti: collassati a larghezza 0 con fade-out.
|
|
|
|
|
La transizione su .hwm_btn e .hwm_separator produce l'animazione
|
|
|
|
|
quando la classe viene aggiunta/rimossa via JS. */
|
|
|
|
|
.hwm_toolbar--compact .hwm_pen-btn,
|
|
|
|
|
.hwm_toolbar--compact .hwm_eraser-btn,
|
|
|
|
|
.hwm_toolbar--compact .hwm_clear-btn,
|
|
|
|
|
.hwm_toolbar--compact .hwm_save-btn,
|
|
|
|
|
.hwm_toolbar--compact .hwm_color-btn:not(.hwm_active),
|
|
|
|
|
.hwm_toolbar--compact .hwm_separator {
|
|
|
|
|
max-width: 0 !important;
|
|
|
|
|
opacity: 0 !important;
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
margin: 0 !important;
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
}
|
|
|
|
|
/* Riduce il margine attorno al pallino colore rimasto e azzera il gap
|
|
|
|
|
tra i pallini (gli inattivi sono collassati a width:0 ma il gap persiste) */
|
|
|
|
|
.hwm_toolbar--compact .hwm_colors {
|
|
|
|
|
margin: 0 2px;
|
|
|
|
|
gap: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Tema scuro per la toolbar ---
|
|
|
|
|
Applicato via classe hwm_toolbar--dark quando bgMode === 'dark' */
|
|
|
|
|
.hwm_toolbar--dark {
|
|
|
|
|
background: rgba(40, 40, 40, 0.97) !important;
|
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
|
|
|
|
|
}
|
|
|
|
|
.hwm_toolbar--dark .hwm_btn {
|
|
|
|
|
color: #bbb !important;
|
|
|
|
|
}
|
|
|
|
|
.hwm_toolbar--dark .hwm_btn:hover {
|
|
|
|
|
background: rgba(255, 255, 255, 0.12) !important;
|
|
|
|
|
color: #fff !important;
|
|
|
|
|
}
|
|
|
|
|
.hwm_toolbar--dark .hwm_btn.hwm_active {
|
|
|
|
|
background: var(--interactive-accent) !important;
|
|
|
|
|
color: #fff !important;
|
|
|
|
|
}
|
|
|
|
|
.hwm_toolbar--dark .hwm_separator {
|
|
|
|
|
background: #555 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Mobile: bottoni grandi e visibili ---
|
|
|
|
|
Forza sfondo chiaro + colore scuro per le icone SVG,
|
|
|
|
|
indipendentemente dal tema di Obsidian Mobile */
|
|
|
|
|
.hwm_mobile .hwm_toolbar {
|
|
|
|
|
gap: 0;
|
|
|
|
|
padding: 5px 8px;
|
|
|
|
|
}
|
|
|
|
|
.hwm_mobile .hwm_toolbar .hwm_btn {
|
|
|
|
|
width: 36px !important;
|
|
|
|
|
height: 36px !important;
|
|
|
|
|
margin-right: 6px !important; /* spacing via margin, non gap */
|
|
|
|
|
background: rgba(245, 245, 245, 0.98) !important;
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.18) !important;
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-m) !important;
|
2026-03-15 12:25:50 +00:00
|
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18) !important;
|
|
|
|
|
color: #222 !important;
|
|
|
|
|
}
|
|
|
|
|
.hwm_mobile .hwm_toolbar .hwm_btn.hwm_active {
|
|
|
|
|
background: var(--interactive-accent) !important;
|
|
|
|
|
border-color: var(--interactive-accent) !important;
|
|
|
|
|
color: #ffffff !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Tema scuro su mobile: sovrascrive i bianchi !important del mobile --- */
|
|
|
|
|
.hwm_mobile .hwm_toolbar--dark .hwm_btn {
|
|
|
|
|
background: rgba(55, 55, 55, 0.98) !important;
|
|
|
|
|
border-color: rgba(255, 255, 255, 0.15) !important;
|
|
|
|
|
color: #ddd !important;
|
|
|
|
|
}
|
|
|
|
|
.hwm_mobile .hwm_toolbar--dark .hwm_btn.hwm_active {
|
|
|
|
|
background: var(--interactive-accent) !important;
|
|
|
|
|
border-color: var(--interactive-accent) !important;
|
|
|
|
|
color: #fff !important;
|
|
|
|
|
}
|
2026-03-15 23:03:31 +00:00
|
|
|
|
|
|
|
|
/* ========================================
|
|
|
|
|
INLINE PREVIEW — Vista nel documento
|
|
|
|
|
======================================== */
|
|
|
|
|
|
|
|
|
|
/* --- Bottoni inline (X, converti, comprimi) ---
|
|
|
|
|
Posizionati in alto a sinistra per non coprire il bottone </> di Obsidian */
|
|
|
|
|
.hwm_inline-buttons {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 6px;
|
|
|
|
|
left: 6px;
|
|
|
|
|
z-index: 5;
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
padding: 3px;
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-m);
|
2026-03-15 23:03:31 +00:00
|
|
|
background: rgba(240, 240, 240, 0.9);
|
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
|
|
|
|
}
|
|
|
|
|
.hwm_inline-buttons--dark {
|
|
|
|
|
background: rgba(40, 40, 40, 0.95);
|
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
|
|
|
|
}
|
|
|
|
|
.hwm_inline-buttons--dark .hwm_btn {
|
|
|
|
|
color: #bbb;
|
|
|
|
|
}
|
|
|
|
|
.hwm_inline-buttons--dark .hwm_btn:hover {
|
|
|
|
|
background: rgba(255, 255, 255, 0.12);
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Bottone comprimi: rotazione 180° quando compresso --- */
|
|
|
|
|
.hwm_collapse-btn {
|
|
|
|
|
transition: transform 0.3s ease, max-width 0.2s ease,
|
|
|
|
|
opacity 0.2s ease, margin 0.2s ease, padding 0.2s ease;
|
|
|
|
|
}
|
|
|
|
|
.hwm_collapse-btn.hwm_rotated {
|
|
|
|
|
transform: rotate(180deg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Preview SVG inline --- */
|
|
|
|
|
.hwm_inline-preview {
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
/* Transizione per l'espansione/compressione */
|
|
|
|
|
transition: max-height 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
.hwm_inline-preview.hwm_collapsed {
|
2026-03-27 23:54:31 +00:00
|
|
|
/* max-height e overflow impostati tramite CSS var --hwm-max-h (setCssProps) */
|
|
|
|
|
max-height: var(--hwm-max-h, 48px);
|
2026-03-15 23:03:31 +00:00
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Preview SVG via background-image (nessun <img> nel DOM per non
|
|
|
|
|
interferire con l'handwriting Android dentro cm-content) */
|
|
|
|
|
.hwm_preview-bg {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 0; /* l'altezza è data da padding-bottom (aspect ratio) */
|
2026-03-27 23:54:31 +00:00
|
|
|
/* Immagine e proporzioni impostate via setCssProps --hwm-bg-img e --hwm-ratio */
|
|
|
|
|
background-image: var(--hwm-bg-img);
|
|
|
|
|
padding-bottom: var(--hwm-ratio, 37.5%);
|
2026-03-15 23:03:31 +00:00
|
|
|
background-size: 100% auto;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-position: top left;
|
|
|
|
|
pointer-events: none; /* il click è gestito dal div padre */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ========================================
|
|
|
|
|
PANNELLO PORTALE — Fuori da cm-content
|
|
|
|
|
Contiene tutti i bottoni del formato wiki.
|
|
|
|
|
Vive in document.body → zero impatto su
|
|
|
|
|
cm-content → non rompe handwriting Android
|
|
|
|
|
======================================== */
|
|
|
|
|
|
2026-03-23 01:03:11 +00:00
|
|
|
/* Pannello con tutti i bottoni (nuovo formato ![[svg]]).
|
|
|
|
|
Vive dentro lo span .internal-embed (position: relative impostato via JS).
|
|
|
|
|
Con position: absolute segue il DOM: scompare quando lo span non è visibile
|
|
|
|
|
(scroll, impostazioni aperte, cambio tab) senza nessuna logica JS aggiuntiva. */
|
2026-03-15 23:03:31 +00:00
|
|
|
.hwm_portal-panel {
|
2026-03-23 01:03:11 +00:00
|
|
|
position: absolute;
|
|
|
|
|
top: 6px;
|
|
|
|
|
right: 6px;
|
|
|
|
|
z-index: 10; /* sufficiente per stare sopra l'img interna */
|
2026-03-15 23:03:31 +00:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 0; /* spacing via margin-right sui .hwm_btn */
|
|
|
|
|
padding: 3px 6px;
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-m);
|
2026-03-15 23:03:31 +00:00
|
|
|
background: rgba(240, 240, 240, 0.95);
|
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
2026-03-23 01:03:11 +00:00
|
|
|
/* Lo span padre ha pointer-events:none (per handwriting Android):
|
|
|
|
|
ripristina i click sui bottoni del pannello */
|
|
|
|
|
pointer-events: auto;
|
2026-03-15 23:03:31 +00:00
|
|
|
}
|
2026-03-23 14:15:12 +00:00
|
|
|
/* Tema scuro del pannello portale (classe aggiunta via JS in base a bgMode) */
|
|
|
|
|
.hwm_portal-panel--dark {
|
|
|
|
|
background: rgba(40, 40, 40, 0.97);
|
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
|
|
|
|
}
|
|
|
|
|
.hwm_portal-panel--dark .hwm_btn {
|
|
|
|
|
color: #bbb !important;
|
|
|
|
|
}
|
|
|
|
|
.hwm_portal-panel--dark .hwm_btn:hover {
|
|
|
|
|
background: rgba(255, 255, 255, 0.12) !important;
|
|
|
|
|
color: #fff !important;
|
|
|
|
|
}
|
2026-03-15 23:03:31 +00:00
|
|
|
|
|
|
|
|
/* Bottone cerchio singolo (formato legacy) */
|
|
|
|
|
.hwm_portal-btn {
|
2026-03-27 23:54:31 +00:00
|
|
|
position: fixed; /* coordinate viewport via CSS var --hwm-top e --hwm-left */
|
|
|
|
|
top: var(--hwm-top, 0);
|
|
|
|
|
left: var(--hwm-left, 0);
|
2026-03-15 23:03:31 +00:00
|
|
|
z-index: 100;
|
|
|
|
|
/* Cerchio perfetto: dimensioni fisse con !important per sovrascrivere
|
|
|
|
|
gli stili globali di Obsidian sui button che aggiungono padding */
|
|
|
|
|
width: 36px !important;
|
|
|
|
|
height: 36px !important;
|
|
|
|
|
min-width: 36px !important;
|
|
|
|
|
min-height: 36px !important;
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
border-radius: 50% !important;
|
|
|
|
|
border: none !important;
|
|
|
|
|
background: var(--interactive-accent) !important;
|
|
|
|
|
color: #ffffff !important;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
overflow: hidden; /* evita che l'SVG allarghi il bottone */
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
|
|
|
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
|
|
|
}
|
|
|
|
|
.hwm_portal-btn svg {
|
|
|
|
|
width: 18px !important;
|
|
|
|
|
height: 18px !important;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
stroke: #ffffff !important; /* forza icona bianca indipendentemente da currentColor */
|
|
|
|
|
}
|
|
|
|
|
.hwm_portal-btn:hover {
|
|
|
|
|
transform: scale(1.1);
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ========================================
|
|
|
|
|
DRAWING MODAL — Editor come overlay
|
|
|
|
|
======================================== */
|
|
|
|
|
|
|
|
|
|
.hwm_modal {
|
|
|
|
|
width: 95vw !important;
|
|
|
|
|
max-width: 95vw !important;
|
|
|
|
|
height: 90vh;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-l) !important;
|
|
|
|
|
overflow: hidden !important;
|
2026-03-15 23:03:31 +00:00
|
|
|
}
|
|
|
|
|
.hwm_modal .modal-content {
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2026-03-23 14:15:12 +00:00
|
|
|
border-radius: var(--radius-l);
|
2026-03-15 23:03:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ========================================
|
|
|
|
|
EDITOR VIEW — Tab dedicata al disegno
|
|
|
|
|
======================================== */
|
|
|
|
|
|
|
|
|
|
/* Container principale dell'editor view */
|
|
|
|
|
.hwm_editor-view {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 100%;
|
2026-03-27 23:54:31 +00:00
|
|
|
/* Sfondo via CSS var (impostato con setCssProps --hwm-bg) con fallback bianco */
|
|
|
|
|
background-color: var(--hwm-bg, #ffffff);
|
2026-03-15 23:03:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Top bar: ← a sinistra | toolbar a destra --- */
|
|
|
|
|
.hwm_editor-topbar {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding: 6px 8px;
|
2026-03-23 01:03:11 +00:00
|
|
|
background: rgba(240, 240, 240, 0.95) !important; /* !important: impedisce a Obsidian dark mode di sovrascrivere il topbar */
|
|
|
|
|
border-bottom: 1px solid #ddd !important;
|
2026-03-15 23:03:31 +00:00
|
|
|
flex-shrink: 0;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
.hwm_editor-topbar--dark {
|
2026-03-23 01:03:11 +00:00
|
|
|
background: rgba(40, 40, 40, 0.97) !important;
|
|
|
|
|
border-bottom-color: #444 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Forza background e colore icone dentro il topbar dell'editor.
|
|
|
|
|
Obsidian dark theme ha regole tipo ".modal-content button { background: var(...) }"
|
|
|
|
|
con specificità 0,1,1 > 0,1,0 di .hwm_btn: senza !important qui sotto, i bottoni
|
|
|
|
|
rimangono scuri anche in light mode. Le due regole .hwm_btn e --dark .hwm_btn hanno
|
|
|
|
|
stessa specificità (0,2,0) ma --dark appare dopo → vince in dark mode. */
|
|
|
|
|
.hwm_editor-topbar .hwm_btn {
|
|
|
|
|
background: transparent !important;
|
|
|
|
|
color: #333 !important;
|
|
|
|
|
}
|
|
|
|
|
.hwm_editor-topbar--dark .hwm_btn {
|
|
|
|
|
background: transparent !important;
|
|
|
|
|
color: #bbb !important;
|
|
|
|
|
}
|
|
|
|
|
/* Hover light: sfondo grigio chiaro */
|
|
|
|
|
.hwm_editor-topbar .hwm_btn:hover:not(.hwm_active) {
|
|
|
|
|
background: #e0e0e0 !important;
|
|
|
|
|
color: #333 !important;
|
|
|
|
|
}
|
|
|
|
|
/* Hover dark: sfondo bianco semi-trasparente */
|
|
|
|
|
.hwm_editor-topbar--dark .hwm_btn:hover:not(.hwm_active) {
|
|
|
|
|
background: rgba(255, 255, 255, 0.12) !important;
|
|
|
|
|
color: #fff !important;
|
|
|
|
|
}
|
|
|
|
|
/* Bottone attivo (tool selezionato): sempre sfondo accent e icona bianca */
|
|
|
|
|
.hwm_editor-topbar .hwm_btn.hwm_active {
|
|
|
|
|
background: var(--interactive-accent) !important;
|
|
|
|
|
color: #ffffff !important;
|
2026-03-15 23:03:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Bottone ← (indietro, a sinistra) */
|
|
|
|
|
.hwm_back-btn {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Toolbar dentro l'editor view: posizione statica, allineata a destra */
|
|
|
|
|
.hwm_editor-toolbar {
|
|
|
|
|
position: static !important;
|
|
|
|
|
top: auto !important;
|
|
|
|
|
right: auto !important;
|
|
|
|
|
box-shadow: none !important;
|
|
|
|
|
background: transparent !important;
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-24 17:28:50 +00:00
|
|
|
/* Topbar centrata: usata sia nel DrawingModal (Windows) che in DrawingEditorView (Android).
|
|
|
|
|
position: relative serve ad ancorare il bottone chiudi (position: absolute) */
|
2026-03-22 17:23:41 +00:00
|
|
|
.hwm_editor-topbar--modal {
|
|
|
|
|
justify-content: center;
|
2026-03-24 17:28:50 +00:00
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Bottone X chiudi: ancorato al bordo destro del topbar, indipendente dal toolbar centrato */
|
|
|
|
|
.hwm_close-btn {
|
|
|
|
|
position: absolute !important;
|
|
|
|
|
right: 8px;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Nasconde la X nativa di Obsidian nel DrawingModal: la chiusura avviene dal bottone X in toolbar */
|
|
|
|
|
.hwm_modal .modal-close-button {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Overlay di conferma inline — no Modal annidato, nessun furto di focus */
|
|
|
|
|
.hwm_confirm-overlay {
|
|
|
|
|
position: absolute;
|
|
|
|
|
inset: 0;
|
|
|
|
|
background: rgba(0, 0, 0, 0.6);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
z-index: 100; /* sopra il pannello portale (z-index: 10) */
|
|
|
|
|
border-radius: inherit;
|
|
|
|
|
pointer-events: auto !important; /* override pointer-events:none dello span padre */
|
|
|
|
|
}
|
|
|
|
|
.hwm_confirm-overlay button {
|
|
|
|
|
pointer-events: auto !important;
|
|
|
|
|
}
|
|
|
|
|
.hwm_confirm-msg {
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-25 19:52:33 +00:00
|
|
|
/* Overlay di conversione OCR: copre l'SVG mentre Gemini elabora.
|
|
|
|
|
Stessa struttura di hwm_confirm-overlay ma con spinner animato
|
|
|
|
|
e fase di errore con messaggio + pulsante OK. */
|
|
|
|
|
.hwm_convert-overlay {
|
|
|
|
|
position: absolute;
|
|
|
|
|
inset: 0;
|
|
|
|
|
background: rgba(0, 0, 0, 0.55);
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
z-index: 100;
|
|
|
|
|
border-radius: inherit;
|
|
|
|
|
pointer-events: auto !important; /* blocca click sull'SVG sottostante */
|
|
|
|
|
}
|
|
|
|
|
/* Rotellina di caricamento */
|
|
|
|
|
.hwm_spinner {
|
|
|
|
|
width: 36px;
|
|
|
|
|
height: 36px;
|
|
|
|
|
border: 3px solid rgba(255, 255, 255, 0.25);
|
|
|
|
|
border-top-color: #fff;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
animation: hwm_spin 0.75s linear infinite;
|
|
|
|
|
}
|
|
|
|
|
@keyframes hwm_spin {
|
|
|
|
|
to { transform: rotate(360deg); }
|
|
|
|
|
}
|
|
|
|
|
/* Messaggio di errore mostrato al posto dello spinner */
|
|
|
|
|
.hwm_convert-error-msg {
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
max-width: 80%;
|
|
|
|
|
margin: 0;
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
}
|
|
|
|
|
/* Pulsante OK per chiudere l'overlay di errore */
|
|
|
|
|
.hwm_convert-ok-btn {
|
|
|
|
|
pointer-events: auto !important;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
/* Variante editor: copre l'intero modal/tab con z-index alto
|
|
|
|
|
per stare sopra toolbar e canvas */
|
|
|
|
|
.hwm_convert-overlay--editor {
|
|
|
|
|
z-index: 1000;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-24 19:50:36 +00:00
|
|
|
/* Wrapper per il collapse: contiene l'<img> e gestisce il clip.
|
|
|
|
|
Animiamo solo il wrapper, non il container span, così il ResizeObserver
|
|
|
|
|
di Obsidian Mobile non si attiva e non re-imposta le dimensioni dell'img. */
|
|
|
|
|
.hwm_clip-wrapper {
|
|
|
|
|
width: 100%;
|
|
|
|
|
background: transparent !important;
|
|
|
|
|
transition: height 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
/* L'img dentro il wrapper non deve mai rimpicciolirsi: occupa la larghezza
|
|
|
|
|
piena e la sua altezza naturale, poi il wrapper la clippa dall'alto */
|
|
|
|
|
.hwm_clip-wrapper img {
|
|
|
|
|
display: block !important;
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
height: auto !important;
|
|
|
|
|
max-height: none !important;
|
|
|
|
|
min-height: 0 !important;
|
|
|
|
|
object-fit: unset !important;
|
|
|
|
|
background: transparent !important;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-24 17:28:50 +00:00
|
|
|
/* --- Suggest SVG reference: thumbnail + nome file --- */
|
|
|
|
|
.hwm_svg-suggest-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
padding: 4px 0;
|
|
|
|
|
}
|
|
|
|
|
.hwm_svg-thumb {
|
|
|
|
|
width: 80px;
|
|
|
|
|
height: 48px;
|
|
|
|
|
object-fit: contain;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
background: var(--background-secondary);
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
.hwm_svg-suggest-name {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
2026-03-22 17:23:41 +00:00
|
|
|
}
|
|
|
|
|
|
2026-03-15 23:03:31 +00:00
|
|
|
/* --- Scroll container per il canvas nell'editor --- */
|
|
|
|
|
.hwm_editor-scroll {
|
|
|
|
|
flex: 1;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Resize handle disabilitato (visibile ma non interattivo) --- */
|
|
|
|
|
.hwm_resize-handle--disabled {
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
cursor: default;
|
|
|
|
|
}
|
|
|
|
|
.hwm_resize-handle--disabled:hover {
|
|
|
|
|
background: #f5f5f5; /* annulla l'effetto hover */
|
|
|
|
|
}
|
2026-03-23 21:21:57 +00:00
|
|
|
|
|
|
|
|
/* --- Sezione keyword OCR nelle impostazioni --- */
|
|
|
|
|
.hwm_keyword-ref {
|
|
|
|
|
margin-top: 24px;
|
|
|
|
|
border: 1px solid var(--background-modifier-border);
|
|
|
|
|
border-radius: var(--radius-m);
|
|
|
|
|
padding: 0 12px 12px;
|
|
|
|
|
}
|
|
|
|
|
.hwm_keyword-summary {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
padding: 10px 0;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
user-select: none;
|
|
|
|
|
}
|
|
|
|
|
.hwm_keyword-table {
|
|
|
|
|
width: 100%;
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
}
|
|
|
|
|
.hwm_keyword-table th,
|
|
|
|
|
.hwm_keyword-table td {
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
text-align: left;
|
|
|
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
}
|
|
|
|
|
.hwm_keyword-table th {
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: var(--text-muted);
|
|
|
|
|
}
|
|
|
|
|
/* Nome keyword in grassetto, colore accent */
|
|
|
|
|
.hwm_kw-name {
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: var(--text-accent);
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
2026-03-25 11:56:22 +00:00
|
|
|
|
|
|
|
|
/* --- Impostazioni responsive: controlli compatti, descrizioni sempre leggibili ---
|
|
|
|
|
Il problema su portrait mobile: .setting-item-control ha flex-shrink:0 nel CSS
|
|
|
|
|
di Obsidian, quindi cresce fino a spingere la descrizione fuori schermo.
|
|
|
|
|
Soluzione: limitiamo la larghezza max dei controlli e, sotto 480px,
|
|
|
|
|
impiliamo verticalmente (descrizione sopra, controllo sotto). */
|
|
|
|
|
|
|
|
|
|
/* Permette al controllo di restringersi se lo spazio è poco */
|
|
|
|
|
.hwm_settings .setting-item-control {
|
|
|
|
|
flex-shrink: 1;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-25 12:02:58 +00:00
|
|
|
/* Input e select brevi (cartella, numeri, lingua): non crescono oltre 160px */
|
2026-03-25 11:56:22 +00:00
|
|
|
.hwm_settings .setting-item-control input[type="text"],
|
|
|
|
|
.hwm_settings .setting-item-control select {
|
|
|
|
|
max-width: 160px;
|
|
|
|
|
min-width: 60px;
|
|
|
|
|
width: auto;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-25 12:02:58 +00:00
|
|
|
/* Campo password (chiave API Gemini): più largo perché la chiave è ~39 caratteri */
|
|
|
|
|
.hwm_settings .setting-item-control input[type="password"] {
|
|
|
|
|
max-width: 240px;
|
|
|
|
|
min-width: 120px;
|
|
|
|
|
width: auto;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-25 11:56:22 +00:00
|
|
|
/* Su schermi stretti (portrait tablet/phone): layout verticale */
|
|
|
|
|
@media (max-width: 480px) {
|
|
|
|
|
.hwm_settings .setting-item {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
/* Il controllo va sotto, allineato a sinistra */
|
|
|
|
|
.hwm_settings .setting-item-control {
|
|
|
|
|
width: auto;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
}
|
|
|
|
|
/* Input e select: tornano a dimensione naturale, non più cappati */
|
|
|
|
|
.hwm_settings .setting-item-control input[type="text"],
|
|
|
|
|
.hwm_settings .setting-item-control input[type="password"],
|
|
|
|
|
.hwm_settings .setting-item-control select {
|
|
|
|
|
max-width: none;
|
|
|
|
|
width: auto;
|
|
|
|
|
}
|
|
|
|
|
}
|