Calculator include to tournament and UI cleanup
This commit is contained in:
@@ -776,6 +776,26 @@
|
||||
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
|
||||
}
|
||||
|
||||
/* Nabijanje - Orange theme */
|
||||
.type-option[data-type="nabijanje"] {
|
||||
border-color: #f97316;
|
||||
}
|
||||
|
||||
.type-option[data-type="nabijanje"]:hover {
|
||||
border-color: #ea580c;
|
||||
box-shadow: 0 4px 15px rgba(249, 115, 22, 0.25);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.type-option[data-type="nabijanje"].selected {
|
||||
border-color: #ea580c;
|
||||
background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
|
||||
}
|
||||
|
||||
.type-option[data-type="nabijanje"]::before {
|
||||
background: linear-gradient(90deg, #f97316 0%, #fbbf24 100%);
|
||||
}
|
||||
|
||||
.type-option input[type="radio"] {
|
||||
margin-right: 10px;
|
||||
width: 18px;
|
||||
@@ -1833,6 +1853,13 @@
|
||||
<div class="type-description" data-i18n="tournament_types.40_targets_desc">Razširjeni format s 40 tarčami, 2 strela na tarčo (80 strelov skupaj)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="type-option" data-type="nabijanje" onclick="selectTournamentType('nabijanje')">
|
||||
<input type="radio" name="tournament_type" value="nabijanje">
|
||||
<div class="type-option-text">
|
||||
<div class="type-name">💥 Nabijanje</div>
|
||||
<div class="type-description">Prosti format z nastavljivo konfiguracijo tarč in strelov</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1944,6 +1971,11 @@
|
||||
const radio = event.currentTarget.querySelector('input[type="radio"]');
|
||||
if (radio) radio.checked = true;
|
||||
|
||||
const isNabijanje = type === 'nabijanje';
|
||||
document.getElementById('startLeagueBtn').style.display = isNabijanje ? 'none' : '';
|
||||
document.getElementById('startSingleBtn').textContent = isNabijanje
|
||||
? '💥 Odpri Nabijanje'
|
||||
: '🏅 ' + (window._i18n?.['league.start_single_tournament'] || 'Začni Posamezen Turnir');
|
||||
}
|
||||
|
||||
// Filter and search functions
|
||||
@@ -2451,8 +2483,13 @@
|
||||
|
||||
// Start single tournament
|
||||
async function startSingleTournament() {
|
||||
if (selectedTournamentType === 'nabijanje') {
|
||||
window.location.href = '/calculator';
|
||||
return;
|
||||
}
|
||||
|
||||
const enabledPlayers = players.filter(p => p.enabled);
|
||||
|
||||
|
||||
if (enabledPlayers.length < 1) {
|
||||
alert('Need at least 1 enabled player to start tournament');
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user