Taschenrechner-Features hinzugefügt und README aktualisiert
This commit is contained in:
@@ -97,6 +97,184 @@ body {
|
||||
background: rgba(37, 99, 235, 0.25);
|
||||
border-color: var(--primary);
|
||||
}
|
||||
.help-button:focus {
|
||||
outline: 2px solid var(--primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Calculator Styles */
|
||||
.calculator-btn {
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 0.8em 1.5em;
|
||||
border-radius: 8px;
|
||||
font-size: 1em;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
font-weight: 500;
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
min-height: 44px;
|
||||
min-width: 44px;
|
||||
}
|
||||
|
||||
.calculator-btn:hover {
|
||||
background: var(--primary-dark);
|
||||
}
|
||||
|
||||
.calculator-btn:focus {
|
||||
outline: 3px solid #facc15;
|
||||
outline-offset: 2px;
|
||||
box-shadow: 0 0 0 4px #1e293b;
|
||||
}
|
||||
|
||||
.calculator-modal {
|
||||
max-width: 400px;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.calculator {
|
||||
background: #f8fafc;
|
||||
border-radius: 12px;
|
||||
padding: 0.8em;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
width: fit-content;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.calculator-display {
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
|
||||
.calculator-history {
|
||||
margin-bottom: 0.8em;
|
||||
min-height: 40px;
|
||||
border: 2px solid #d1d5db;
|
||||
border-radius: 6px;
|
||||
background: #f9fafb;
|
||||
padding: 0.3em;
|
||||
font-family: 'Courier New', monospace;
|
||||
font-size: 0.8em;
|
||||
color: #6b7280;
|
||||
overflow-y: auto;
|
||||
max-height: 80px;
|
||||
}
|
||||
|
||||
.history-item {
|
||||
padding: 0.3em 0;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
text-align: right;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.history-item:last-child {
|
||||
border-bottom: none;
|
||||
color: #374151;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.calculator-display input {
|
||||
width: 100%;
|
||||
padding: 0.8em;
|
||||
padding-right: 3.5em;
|
||||
font-size: 1.3em;
|
||||
text-align: right;
|
||||
border: 3px solid #374151;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
color: #111827;
|
||||
font-family: 'Courier New', monospace;
|
||||
font-weight: 600;
|
||||
min-height: 48px;
|
||||
}
|
||||
|
||||
.calculator-display input:focus {
|
||||
outline: 3px solid #facc15;
|
||||
outline-offset: 2px;
|
||||
box-shadow: 0 0 0 4px #1e293b;
|
||||
border-color: #1f2937;
|
||||
}
|
||||
|
||||
.calculator-buttons {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 0.3em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.calc-btn {
|
||||
padding: 0.7em;
|
||||
font-size: 1em;
|
||||
border: 2px solid #374151;
|
||||
background: #f9fafb;
|
||||
color: #111827;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
font-weight: 600;
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
aspect-ratio: 1;
|
||||
}
|
||||
|
||||
.calc-btn:hover {
|
||||
background: #e5e7eb;
|
||||
border-color: #1f2937;
|
||||
}
|
||||
|
||||
.calc-btn:focus {
|
||||
outline: 3px solid #facc15;
|
||||
outline-offset: 2px;
|
||||
box-shadow: 0 0 0 4px #1e293b;
|
||||
background: #e5e7eb;
|
||||
border-color: #1f2937;
|
||||
}
|
||||
|
||||
.calc-clear {
|
||||
background: #ef4444;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.calc-clear:hover {
|
||||
background: #dc2626;
|
||||
}
|
||||
|
||||
.calc-delete {
|
||||
background: #f59e0b;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.calc-delete:hover {
|
||||
background: #d97706;
|
||||
}
|
||||
|
||||
.calc-operator {
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.calc-operator:hover {
|
||||
background: var(--primary-dark);
|
||||
}
|
||||
|
||||
.calc-equals {
|
||||
background: #10b981;
|
||||
color: white;
|
||||
grid-row: span 2;
|
||||
}
|
||||
|
||||
.calc-equals:hover {
|
||||
background: #059669;
|
||||
}
|
||||
|
||||
.calc-zero {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.help-button:focus {
|
||||
outline: 3px solid #facc15;
|
||||
outline-offset: 2px;
|
||||
@@ -154,7 +332,7 @@ body {
|
||||
padding: 2em;
|
||||
max-width: 90%;
|
||||
width: 90%;
|
||||
max-height: 90vh;
|
||||
max-height: 95vh;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
@@ -508,7 +686,7 @@ button:focus, .accordion-header:focus {
|
||||
padding: 0.4em 0.6em;
|
||||
}
|
||||
.modal-content {
|
||||
padding: 1.5em;
|
||||
padding: 1.2em;
|
||||
margin: 1em;
|
||||
width: calc(100% - 2em);
|
||||
max-width: none;
|
||||
@@ -519,6 +697,35 @@ button:focus, .accordion-header:focus {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.calculator-modal {
|
||||
max-width: 95%;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.calculator {
|
||||
width: 100%;
|
||||
padding: 0.8em;
|
||||
}
|
||||
|
||||
.calculator-buttons {
|
||||
width: 100%;
|
||||
gap: 0.3em;
|
||||
}
|
||||
|
||||
.calc-btn {
|
||||
padding: 0.6em;
|
||||
font-size: 1em;
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
.calculator-display input {
|
||||
padding: 0.6em;
|
||||
padding-right: 3em;
|
||||
font-size: 1.2em;
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
top: 0.8em;
|
||||
right: 0.8em;
|
||||
@@ -677,6 +884,214 @@ footer br + a {
|
||||
document.querySelector('.help-button').focus();
|
||||
}
|
||||
|
||||
// Taschenrechner-Funktionen
|
||||
let calculatorDisplay = '0';
|
||||
let calculatorPreviousValue = null;
|
||||
let calculatorCurrentOperator = null;
|
||||
let calculatorWaitingForOperand = false;
|
||||
let calculatorHistory = [];
|
||||
|
||||
function showCalculator() {
|
||||
const modal = document.getElementById('calculatorModal');
|
||||
const input = document.getElementById('calculatorInput');
|
||||
|
||||
if (modal && input) {
|
||||
modal.style.display = 'flex';
|
||||
modal.classList.add('active');
|
||||
input.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function hideCalculator() {
|
||||
const modal = document.getElementById('calculatorModal');
|
||||
modal.style.display = 'none';
|
||||
modal.classList.remove('active');
|
||||
}
|
||||
|
||||
function calculatorClear() {
|
||||
calculatorDisplay = '0';
|
||||
calculatorPreviousValue = null;
|
||||
calculatorCurrentOperator = null;
|
||||
calculatorWaitingForOperand = false;
|
||||
calculatorHistory = [];
|
||||
updateCalculatorDisplay();
|
||||
}
|
||||
|
||||
function calculatorDelete() {
|
||||
if (calculatorDisplay.length === 1) {
|
||||
calculatorDisplay = '0';
|
||||
} else {
|
||||
calculatorDisplay = calculatorDisplay.slice(0, -1);
|
||||
}
|
||||
updateCalculatorDisplay();
|
||||
}
|
||||
|
||||
function calculatorNumber(num) {
|
||||
if (calculatorWaitingForOperand) {
|
||||
calculatorDisplay = num;
|
||||
calculatorWaitingForOperand = false;
|
||||
} else {
|
||||
calculatorDisplay = calculatorDisplay === '0' ? num : calculatorDisplay + num;
|
||||
}
|
||||
updateCalculatorDisplay();
|
||||
}
|
||||
|
||||
function calculatorDecimal() {
|
||||
if (calculatorWaitingForOperand) {
|
||||
calculatorDisplay = '0.';
|
||||
calculatorWaitingForOperand = false;
|
||||
} else if (calculatorDisplay.indexOf('.') === -1) {
|
||||
calculatorDisplay += '.';
|
||||
}
|
||||
updateCalculatorDisplay();
|
||||
}
|
||||
|
||||
function calculatorOperator(op) {
|
||||
const inputValue = parseFloat(calculatorDisplay);
|
||||
|
||||
if (calculatorPreviousValue === null) {
|
||||
calculatorPreviousValue = inputValue;
|
||||
} else if (calculatorCurrentOperator) {
|
||||
const result = performCalculation(calculatorPreviousValue, inputValue, calculatorCurrentOperator);
|
||||
calculatorDisplay = String(result);
|
||||
calculatorPreviousValue = result;
|
||||
}
|
||||
|
||||
calculatorWaitingForOperand = true;
|
||||
calculatorCurrentOperator = op;
|
||||
updateCalculatorDisplay();
|
||||
}
|
||||
|
||||
function calculatorEquals() {
|
||||
const inputValue = parseFloat(calculatorDisplay);
|
||||
|
||||
if (calculatorPreviousValue === null || calculatorCurrentOperator === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const result = performCalculation(calculatorPreviousValue, inputValue, calculatorCurrentOperator);
|
||||
|
||||
// Füge zur History hinzu
|
||||
const historyEntry = calculatorPreviousValue + ' ' + getOperatorSymbol(calculatorCurrentOperator) + ' ' + inputValue + ' = ' + result;
|
||||
addToHistory(historyEntry);
|
||||
|
||||
calculatorDisplay = String(result);
|
||||
calculatorPreviousValue = null;
|
||||
calculatorCurrentOperator = null;
|
||||
calculatorWaitingForOperand = true;
|
||||
updateCalculatorDisplay();
|
||||
}
|
||||
|
||||
function performCalculation(firstValue, secondValue, operator) {
|
||||
switch (operator) {
|
||||
case '+':
|
||||
return firstValue + secondValue;
|
||||
case '-':
|
||||
return firstValue - secondValue;
|
||||
case '*':
|
||||
return firstValue * secondValue;
|
||||
case '/':
|
||||
return secondValue !== 0 ? firstValue / secondValue : 'Error';
|
||||
default:
|
||||
return secondValue;
|
||||
}
|
||||
}
|
||||
|
||||
function updateCalculatorDisplay() {
|
||||
const display = document.getElementById('calculatorInput');
|
||||
if (calculatorDisplay === 'Error') {
|
||||
display.value = 'Error';
|
||||
display.setAttribute('aria-label', '{{ _("Fehler") }}');
|
||||
calculatorDisplay = '0';
|
||||
calculatorPreviousValue = null;
|
||||
calculatorCurrentOperator = null;
|
||||
calculatorWaitingForOperand = false;
|
||||
} else {
|
||||
display.value = calculatorDisplay;
|
||||
display.setAttribute('aria-label', '{{ _("Taschenrechner Anzeige") }}: ' + calculatorDisplay);
|
||||
}
|
||||
updateHistoryDisplay();
|
||||
}
|
||||
|
||||
function readAloudFromCalculator(button) {
|
||||
// Prüfe, ob bereits eine Wiedergabe läuft
|
||||
if (currentSpeech && speechSynthesis.speaking) {
|
||||
// Stoppe die aktuelle Wiedergabe
|
||||
speechSynthesis.cancel();
|
||||
currentSpeech = null;
|
||||
button.classList.remove('playing');
|
||||
button.textContent = '🔊';
|
||||
return;
|
||||
}
|
||||
|
||||
// Finde das Eingabefeld
|
||||
const inputElement = document.getElementById('calculatorInput');
|
||||
if (!inputElement) return;
|
||||
|
||||
let textToRead = inputElement.value;
|
||||
|
||||
// Übersetze Zahlen und Operatoren für bessere Sprachausgabe
|
||||
if (textToRead !== 'Error') {
|
||||
// Prüfe, ob es sich um ein Ergebnis einer Berechnung handelt
|
||||
if (calculatorHistory.length > 0) {
|
||||
// Verwende die letzte Berechnung aus der History
|
||||
const lastCalculation = calculatorHistory[0];
|
||||
textToRead = lastCalculation;
|
||||
|
||||
// Übersetze mathematische Symbole für bessere Sprachausgabe
|
||||
textToRead = textToRead.replace(/×/g, ' mal ');
|
||||
textToRead = textToRead.replace(/÷/g, ' geteilt durch ');
|
||||
textToRead = textToRead.replace(/−/g, ' minus ');
|
||||
textToRead = textToRead.replace(/\+/g, ' plus ');
|
||||
textToRead = textToRead.replace(/\./g, ' Komma ');
|
||||
textToRead = textToRead.replace(/=/g, ' ist gleich ');
|
||||
} else {
|
||||
// Fallback für einzelne Zahlen
|
||||
textToRead = textToRead.replace(/\./g, ' Komma ');
|
||||
if (textToRead === '0') {
|
||||
textToRead = '{{ _("Null") }}';
|
||||
} else {
|
||||
textToRead = '{{ _("Taschenrechner Anzeige") }}: ' + textToRead;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
textToRead = '{{ _("Fehler") }}';
|
||||
}
|
||||
|
||||
readAloud(textToRead, button);
|
||||
}
|
||||
|
||||
function addToHistory(entry) {
|
||||
calculatorHistory.unshift(entry);
|
||||
if (calculatorHistory.length > 3) {
|
||||
calculatorHistory.pop();
|
||||
}
|
||||
}
|
||||
|
||||
function updateHistoryDisplay() {
|
||||
const historyContainer = document.getElementById('calculatorHistory');
|
||||
if (historyContainer) {
|
||||
historyContainer.innerHTML = '';
|
||||
calculatorHistory.forEach((entry, index) => {
|
||||
const historyItem = document.createElement('div');
|
||||
historyItem.className = 'history-item';
|
||||
historyItem.textContent = entry;
|
||||
historyItem.setAttribute('aria-label', '{{ _("Berechnung") }} ' + (index + 1) + ': ' + entry);
|
||||
historyContainer.appendChild(historyItem);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getOperatorSymbol(operator) {
|
||||
switch(operator) {
|
||||
case '+': return '+';
|
||||
case '-': return '−';
|
||||
case '*': return '×';
|
||||
case '/': return '÷';
|
||||
default: return operator;
|
||||
}
|
||||
}
|
||||
|
||||
// Sprachausgabe-Funktionalität
|
||||
let currentSpeech = null;
|
||||
|
||||
@@ -889,6 +1304,7 @@ footer br + a {
|
||||
document.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Escape') {
|
||||
hideHelp();
|
||||
hideCalculator();
|
||||
stopReading();
|
||||
}
|
||||
});
|
||||
@@ -899,6 +1315,101 @@ footer br + a {
|
||||
hideHelp();
|
||||
}
|
||||
});
|
||||
|
||||
// Klick außerhalb des Taschenrechner-Modals zum Schließen
|
||||
document.getElementById('calculatorModal').addEventListener('click', function(e) {
|
||||
if (e.target === this) {
|
||||
hideCalculator();
|
||||
}
|
||||
});
|
||||
|
||||
// Tastatursteuerung für Taschenrechner-Button
|
||||
document.getElementById('calculatorBtn').addEventListener('keydown', function(event) {
|
||||
if (event.key === 'Enter' || event.key === ' ') {
|
||||
event.preventDefault();
|
||||
showCalculator();
|
||||
}
|
||||
});
|
||||
|
||||
// Tastatursteuerung für Taschenrechner
|
||||
document.addEventListener('keydown', function(event) {
|
||||
const modal = document.getElementById('calculatorModal');
|
||||
if (modal.style.display === 'flex') {
|
||||
switch(event.key) {
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
calculatorNumber(event.key);
|
||||
event.preventDefault();
|
||||
break;
|
||||
case '.':
|
||||
case ',':
|
||||
calculatorDecimal();
|
||||
event.preventDefault();
|
||||
break;
|
||||
case '+':
|
||||
case 'p': case 'P': // Plus
|
||||
calculatorOperator('+');
|
||||
event.preventDefault();
|
||||
break;
|
||||
case '-':
|
||||
case 'm': case 'M': // Minus
|
||||
calculatorOperator('-');
|
||||
event.preventDefault();
|
||||
break;
|
||||
case '*':
|
||||
case 'x': case 'X': // Multiplikation
|
||||
case '×':
|
||||
calculatorOperator('*');
|
||||
event.preventDefault();
|
||||
break;
|
||||
case '/':
|
||||
case 'd': case 'D': // Division
|
||||
case '÷':
|
||||
calculatorOperator('/');
|
||||
event.preventDefault();
|
||||
break;
|
||||
case '=':
|
||||
case 'Enter':
|
||||
case ' ': // Leertaste für Gleich
|
||||
calculatorEquals();
|
||||
event.preventDefault();
|
||||
break;
|
||||
case 'Escape':
|
||||
hideCalculator();
|
||||
event.preventDefault();
|
||||
break;
|
||||
case 'Backspace':
|
||||
case 'Delete':
|
||||
calculatorDelete();
|
||||
event.preventDefault();
|
||||
break;
|
||||
case 'c': case 'C':
|
||||
case 'Escape':
|
||||
calculatorClear();
|
||||
event.preventDefault();
|
||||
break;
|
||||
case 'Tab':
|
||||
// Erlaube normale Tab-Navigation
|
||||
break;
|
||||
default:
|
||||
// Verhindere andere Tastatureingaben
|
||||
event.preventDefault();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Werktage-Checkbox Event-Handler
|
||||
var werktageCheckbox = document.getElementById('werktage');
|
||||
var bundeslandSelect = document.getElementById('bundesland');
|
||||
if (werktageCheckbox && bundeslandSelect) {
|
||||
function toggleBundesland() {
|
||||
bundeslandSelect.disabled = !werktageCheckbox.checked;
|
||||
}
|
||||
werktageCheckbox.addEventListener('change', toggleBundesland);
|
||||
// Initial setzen
|
||||
toggleBundesland();
|
||||
}
|
||||
});
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', function() {
|
||||
@@ -1126,6 +1637,56 @@ footer br + a {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Calculator Button -->
|
||||
<div style="text-align: center; margin-top: 1.5em;">
|
||||
<button type="button" id="calculatorBtn" class="calculator-btn" onclick="showCalculator()" aria-label="{{ _('Taschenrechner öffnen') }}" title="{{ _('Taschenrechner öffnen') }}" tabindex="0">
|
||||
🧮 {{ _('Taschenrechner') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Calculator Modal Overlay -->
|
||||
<div id="calculatorModal" class="modal-overlay" role="dialog" aria-labelledby="calculator-title" style="display: none;">
|
||||
<div class="modal-content calculator-modal">
|
||||
<button type="button" class="modal-close" onclick="hideCalculator()" aria-label="{{ _('Taschenrechner schließen') }}">×</button>
|
||||
<h1 id="calculator-title">{{ _('Taschenrechner') }}</h1>
|
||||
<p class="sr-only">{{ _('Verwenden Sie die Tab-Taste um durch die Tasten zu navigieren. Tastatur-Kurzbefehle: Zahlen 0-9, Punkt oder Komma für Dezimal, Plus (+) oder P für Addition, Minus (-) oder M für Subtraktion, Stern (*) oder X für Multiplikation, Schrägstrich (/) oder D für Division, Enter oder Leertaste für Gleich, C für Löschen, Backspace für letzte Ziffer löschen.') }}</p>
|
||||
|
||||
<div class="calculator">
|
||||
<div class="calculator-history" id="calculatorHistory" aria-label="{{ _('Berechnungsverlauf') }}" role="log" aria-live="polite"></div>
|
||||
<div class="calculator-display">
|
||||
<div style="position: relative; display: flex; align-items: center;">
|
||||
<input type="text" id="calculatorInput" readonly aria-label="{{ _('Taschenrechner Anzeige') }}" value="0" role="textbox" aria-live="polite">
|
||||
<button type="button" class="read-aloud-btn" onclick="readAloudFromCalculator(this)" onkeydown="if(event.key==='Enter'||event.key===' ') { event.preventDefault(); readAloudFromCalculator(this); }" aria-label="{{ _('Ergebnis vorlesen') }}" title="{{ _('Ergebnis vorlesen') }}" tabindex="0" style="position: absolute; right: 0.5em; top: 50%; transform: translateY(-50%);">🔊</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="calculator-buttons">
|
||||
<button type="button" onclick="calculatorClear()" class="calc-btn calc-clear" aria-label="{{ _('Löschen (Taste: C)') }}" tabindex="0">C</button>
|
||||
<button type="button" onclick="calculatorDelete()" class="calc-btn calc-delete" aria-label="{{ _('Letzte Ziffer löschen (Taste: Backspace)') }}" tabindex="0">⌫</button>
|
||||
<button type="button" onclick="calculatorOperator('/')" class="calc-btn calc-operator" aria-label="{{ _('Dividieren (Taste: / oder D)') }}" tabindex="0">÷</button>
|
||||
<button type="button" onclick="calculatorOperator('*')" class="calc-btn calc-operator" aria-label="{{ _('Multiplizieren (Taste: * oder X)') }}" tabindex="0">×</button>
|
||||
|
||||
<button type="button" onclick="calculatorNumber('7')" class="calc-btn" aria-label="{{ _('Sieben') }}" tabindex="0">7</button>
|
||||
<button type="button" onclick="calculatorNumber('8')" class="calc-btn" aria-label="{{ _('Acht') }}" tabindex="0">8</button>
|
||||
<button type="button" onclick="calculatorNumber('9')" class="calc-btn" aria-label="{{ _('Neun') }}" tabindex="0">9</button>
|
||||
<button type="button" onclick="calculatorOperator('-')" class="calc-btn calc-operator" aria-label="{{ _('Subtrahieren (Taste: - oder M)') }}" tabindex="0">−</button>
|
||||
|
||||
<button type="button" onclick="calculatorNumber('4')" class="calc-btn" aria-label="{{ _('Vier') }}" tabindex="0">4</button>
|
||||
<button type="button" onclick="calculatorNumber('5')" class="calc-btn" aria-label="{{ _('Fünf') }}" tabindex="0">5</button>
|
||||
<button type="button" onclick="calculatorNumber('6')" class="calc-btn" aria-label="{{ _('Sechs') }}" tabindex="0">6</button>
|
||||
<button type="button" onclick="calculatorOperator('+')" class="calc-btn calc-operator" aria-label="{{ _('Addieren (Taste: + oder P)') }}" tabindex="0">+</button>
|
||||
|
||||
<button type="button" onclick="calculatorNumber('1')" class="calc-btn" aria-label="{{ _('Eins') }}" tabindex="0">1</button>
|
||||
<button type="button" onclick="calculatorNumber('2')" class="calc-btn" aria-label="{{ _('Zwei') }}" tabindex="0">2</button>
|
||||
<button type="button" onclick="calculatorNumber('3')" class="calc-btn" aria-label="{{ _('Drei') }}" tabindex="0">3</button>
|
||||
<button type="button" onclick="calculatorEquals()" class="calc-btn calc-equals" aria-label="{{ _('Gleich (Taste: Enter oder Leertaste)') }}" tabindex="0">=</button>
|
||||
|
||||
<button type="button" onclick="calculatorNumber('0')" class="calc-btn calc-zero" aria-label="{{ _('Null') }}" tabindex="0">0</button>
|
||||
<button type="button" onclick="calculatorDecimal()" class="calc-btn" aria-label="{{ _('Komma (Taste: . oder ,)') }}" tabindex="0">.</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Help Modal Overlay -->
|
||||
@@ -1184,19 +1745,6 @@ footer br + a {
|
||||
© 2025 <a href="mailto:elpatron@mailbox.org?subject=Datumsrechner" style="color:#1e40af; text-decoration:underline;">Markus Busche</a>
|
||||
<div style="margin-top:0.5em; font-size:0.85em; color:#64748b;">v{{ app_version }}</div>
|
||||
</footer>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var werktageCheckbox = document.getElementById('werktage');
|
||||
var bundeslandSelect = document.getElementById('bundesland');
|
||||
if (werktageCheckbox && bundeslandSelect) {
|
||||
function toggleBundesland() {
|
||||
bundeslandSelect.disabled = !werktageCheckbox.checked;
|
||||
}
|
||||
werktageCheckbox.addEventListener('change', toggleBundesland);
|
||||
// Initial setzen
|
||||
toggleBundesland();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user