/* Previous styles remain the same */ body { font-family: system-ui, sans-serif; max-width: 1000px; margin: 0 auto; padding: 20px; } .test-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; } .test-row { display: contents; } .test-cell { background: #f5f5f5; padding: 10px; border-radius: 4px; } .test-cell label { display: flex; align-items: center; gap: 8px; cursor: pointer; } .column-sum { text-align: center; padding: 10px; background: #e9e9e9; border-radius: 4px; } .instructions { background: #f8f8f8; padding: 20px; border-radius: 8px; margin: 20px 0; } .instructions ol { margin: 0; padding-left: 20px; }

Test Osobowości

Sposób wykonania testu:

  1. W każdym rzędzie zaznacz jedną najbardziej pasującą do Ciebie odpowiedź. Podejdź do tego intuicyjnie, nie zastanawiaj się zbyt długo.
  2. Po wypełnieniu wszystkich odpowiedzi, system automatycznie policzy wyniki w każdej kolumnie.
Suma kolumny 1: 0
Suma kolumny 2: 0
Suma kolumny 3: 0
Suma kolumny 4: 0

Klucz odpowiedzi poda Trener

const form = document.getElementById(’personalityTest’); const sums = { col1: document.getElementById(’sum1′), col2: document.getElementById(’sum2′), col3: document.getElementById(’sum3′), col4: document.getElementById(’sum4′) }; function updateSums() { const counts = { col1: 0, col2: 0, col3: 0, col4: 0 }; const radios = form.querySelectorAll(’input[type=”radio”]:checked’); radios.forEach(radio => { counts[radio.value]++; }); sums.col1.textContent = `Suma kolumny 1: ${counts.col1}`; sums.col2.textContent = `Suma kolumny 2: ${counts.col2}`; sums.col3.textContent = `Suma kolumny 3: ${counts.col3}`; sums.col4.textContent = `Suma kolumny 4: ${counts.col4}`; } form.addEventListener(’change’, updateSums);