frontend: kleinere UI-Bereinigungen (Code & i18n)
- Redundante Rückgabewerte in `overlaySvg()` entfernt - `aria-labelledby` des Editors ersetzt durch `aria-label` für klarere i18n-Texte
This commit is contained in:
+2
-2
@@ -46,7 +46,7 @@
|
|||||||
<div class="app" id="app">
|
<div class="app" id="app">
|
||||||
<div class="panel editor">
|
<div class="panel editor">
|
||||||
<div class="panel-head">
|
<div class="panel-head">
|
||||||
<span id="editorTitle" data-i18n="editorTitle">Struktur (Text)</span>
|
<span data-i18n="editorTitle">Struktur (Text)</span>
|
||||||
<button type="button" class="copybtn" id="copy" data-i18n-title="copyTooltip" data-i18n-aria="copyTooltip" title="Text in die Zwischenablage kopieren" aria-label="Text in die Zwischenablage kopieren">
|
<button type="button" class="copybtn" id="copy" data-i18n-title="copyTooltip" data-i18n-aria="copyTooltip" title="Text in die Zwischenablage kopieren" aria-label="Text in die Zwischenablage kopieren">
|
||||||
<svg class="ic-copy" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
|
<svg class="ic-copy" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
|
||||||
<svg class="ic-done" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>
|
<svg class="ic-done" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="editor-body">
|
<div class="editor-body">
|
||||||
<textarea id="src" spellcheck="false" aria-labelledby="editorTitle"></textarea>
|
<textarea id="src" spellcheck="false" data-i18n-aria="editorTitle" aria-label="Struktur (Text)"></textarea>
|
||||||
<details class="agenda">
|
<details class="agenda">
|
||||||
<summary data-i18n="agenda">Agenda</summary>
|
<summary data-i18n="agenda">Agenda</summary>
|
||||||
<div class="hint" id="hint">
|
<div class="hint" id="hint">
|
||||||
|
|||||||
+1
-2
@@ -89,9 +89,8 @@ function svgEl(name, attrs){
|
|||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
function overlaySvg(cls, w, h){
|
function overlaySvg(cls, w, h){
|
||||||
const svg = svgEl('svg', {class:'cheap-overlay ' + cls, width:w, height:h,
|
return svgEl('svg', {class:'cheap-overlay ' + cls, width:w, height:h,
|
||||||
viewBox:`0 0 ${w.toFixed(1)} ${h.toFixed(1)}`});
|
viewBox:`0 0 ${w.toFixed(1)} ${h.toFixed(1)}`});
|
||||||
return svg;
|
|
||||||
}
|
}
|
||||||
function drawCheapPath(){
|
function drawCheapPath(){
|
||||||
out.querySelectorAll('svg.cheap-overlay').forEach(e => e.remove());
|
out.querySelectorAll('svg.cheap-overlay').forEach(e => e.remove());
|
||||||
|
|||||||
Reference in New Issue
Block a user