Commit d5c60c34 authored by Mahmoud Aglan's avatar Mahmoud Aglan

copy: the public live pages speak like an Egyptian game

Live, embed, standings, pairings, bracket, players, print and venue-screen
text is short Egyptian Arabic with the words players use (لايف، ماتش،
الشجرة، راحة، باط), matching the player app. Text only: no markup or
styling changed.

Also: the standings table checked an undefined $medals (left from the emoji
medals), raising a warning on every render; the rank column shows the
place, and the podium above keeps the medal icons.
Co-Authored-By: 's avatarClaude Opus 5.5 <noreply@anthropic.com>
parent da912f8d
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
const cls = ['lb-bracket-seat', s.name === null ? 'is-empty' : '', (m.winner_id && s.id && m.winner_id === s.id) ? 'is-winner' : ''].join(' '); const cls = ['lb-bracket-seat', s.name === null ? 'is-empty' : '', (m.winner_id && s.id && m.winner_id === s.id) ? 'is-winner' : ''].join(' ');
const seed = s.seed ? '<span class="lb-bracket-seed">' + esc(s.seed) + '</span> ' : ''; const seed = s.seed ? '<span class="lb-bracket-seed">' + esc(s.seed) + '</span> ' : '';
const score = showScore && s.name !== null && fmt(s.score) !== '' ? '<span class="lb-bracket-score">' + esc(fmt(s.score)) + '</span>' : ''; const score = showScore && s.name !== null && fmt(s.score) !== '' ? '<span class="lb-bracket-score">' + esc(fmt(s.score)) + '</span>' : '';
return '<div class="' + cls + '"><span>' + seed + esc(s.name || 'في الانتظار') + '</span>' + score + '</div>'; return '<div class="' + cls + '"><span>' + seed + esc(s.name || 'مستني') + '</span>' + score + '</div>';
}).join(''); }).join('');
const isLive = status === 'in_progress' || status === 'tiebreak'; const isLive = status === 'in_progress' || status === 'tiebreak';
return '<div class="lb-bracket-match' + (isLive ? ' is-live' : '') + '">' + seats + '</div>'; return '<div class="lb-bracket-match' + (isLive ? ' is-live' : '') + '">' + seats + '</div>';
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
const total = rounds[rounds.length - 1]; const total = rounds[rounds.length - 1];
let html = rounds.map(r => '<div class="lb-bracket-round"><div class="lb-bracket-round-title">' + esc(roundName(r, total)) + '</div>' + let html = rounds.map(r => '<div class="lb-bracket-round"><div class="lb-bracket-round-title">' + esc(roundName(r, total)) + '</div>' +
main[r].sort((a, b) => (a.match_number || 0) - (b.match_number || 0)).map(matchHtml).join('') + '</div>').join(''); main[r].sort((a, b) => (a.match_number || 0) - (b.match_number || 0)).map(matchHtml).join('') + '</div>').join('');
if (extra.length) html += '<div class="lb-bracket-round"><div class="lb-bracket-round-title">المركز الثالث</div>' + extra.map(matchHtml).join('') + '</div>'; if (extra.length) html += '<div class="lb-bracket-round"><div class="lb-bracket-round-title">المركز التالت</div>' + extra.map(matchHtml).join('') + '</div>';
container.innerHTML = html; container.innerHTML = html;
} }
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<div class="ann-body"> <div class="ann-body">
${ann.title ? `<strong class="ann-title">${escapeHtml(ann.title)}</strong>` : ''} ${ann.title ? `<strong class="ann-title">${escapeHtml(ann.title)}</strong>` : ''}
<p class="ann-content">${escapeHtml(ann.content)}</p> <p class="ann-content">${escapeHtml(ann.content)}</p>
<span class="ann-time">الآن</span> <span class="ann-time">دلوقتي</span>
</div> </div>
`; `;
bubble.style.animation = 'fadeInUp 0.4s ease'; bubble.style.animation = 'fadeInUp 0.4s ease';
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
const pts = (Math.round(player.points * 2) / 2).toString().replace(/^0\.5$/, '½').replace('.5', '½'); const pts = (Math.round(player.points * 2) / 2).toString().replace(/^0\.5$/, '½').replace('.5', '½');
bits.push(pts + ' نقطة'); bits.push(pts + ' نقطة');
} }
if (player.games) bits.push(player.games + ' مباراة'); if (player.games) bits.push(player.games + ' ماتش');
meta.textContent = bits.join(' · '); meta.textContent = bits.join(' · ');
} }
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
document.getElementById('h2h-name-a').textContent = record.names[a] || ''; document.getElementById('h2h-name-a').textContent = record.names[a] || '';
document.getElementById('h2h-name-b').textContent = record.names[b] || ''; document.getElementById('h2h-name-b').textContent = record.names[b] || '';
document.getElementById('h2h-scores').textContent = document.getElementById('h2h-scores').textContent =
games.length ? fmt(scoreA) + ' - ' + fmt(scoreB) : 'لم يلتقيا'; games.length ? fmt(scoreA) + ' - ' + fmt(scoreB) : 'ملعبوش مع بعض';
document.getElementById('h2h-games').innerHTML = rows.join(''); document.getElementById('h2h-games').innerHTML = rows.join('');
panel.hidden = false; panel.hidden = false;
} }
...@@ -372,6 +372,6 @@ document.addEventListener('click', (e) => { ...@@ -372,6 +372,6 @@ document.addEventListener('click', (e) => {
const expanded = wrap.classList.toggle('is-expanded'); const expanded = wrap.classList.toggle('is-expanded');
btn.setAttribute('aria-expanded', expanded ? 'true' : 'false'); btn.setAttribute('aria-expanded', expanded ? 'true' : 'false');
btn.textContent = expanded btn.textContent = expanded
? 'عرض أفضل 20 فقط' ? 'أول 20 بس'
: `عرض كل اللاعبين (${wrap.querySelectorAll('tbody tr').length})`; : `شوف الكل (${wrap.querySelectorAll('tbody tr').length})`;
}); });
...@@ -110,8 +110,8 @@ ...@@ -110,8 +110,8 @@
} else { } else {
grid = `<div class="scr-board-wrap"><div class="scr-board is-empty"><span>${b.state === 'waiting' ? 'لسه ما بدأتش' : (b.state === 'bye' ? 'راحة' : '')}</span></div></div>`; grid = `<div class="scr-board-wrap"><div class="scr-board is-empty"><span>${b.state === 'waiting' ? 'لسه ما بدأتش' : (b.state === 'bye' ? 'راحة' : '')}</span></div></div>`;
} }
const tag = b.state === 'live' ? '<span class="scr-tag is-live"><span class="pulse-dot"></span> جارية</span>' const tag = b.state === 'live' ? '<span class="scr-tag is-live"><span class="pulse-dot"></span> لايف</span>'
: b.state === 'done' ? '<span class="scr-tag">انتهت</span>' : b.state === 'done' ? '<span class="scr-tag">خلصت</span>'
: b.state === 'waiting' ? '<span class="scr-tag">مستنية</span>' : ''; : b.state === 'waiting' ? '<span class="scr-tag">مستنية</span>' : '';
const kind = b.game_kind && b.game_kind !== 'regular' ? `<span class="scr-tag is-kind">${b.game_kind === 'armageddon' ? 'أرماجدون' : 'فاصلة'}</span>` : ''; const kind = b.game_kind && b.game_kind !== 'regular' ? `<span class="scr-tag is-kind">${b.game_kind === 'armageddon' ? 'أرماجدون' : 'فاصلة'}</span>` : '';
return `<article class="scr-card${b.state === 'live' ? ' is-live' : ''}"> return `<article class="scr-card${b.state === 'live' ? ' is-live' : ''}">
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
const list = d ? d.boards : []; const list = d ? d.boards : [];
const pages = Math.max(1, Math.ceil(list.length / BOARDS_PAGE)); const pages = Math.max(1, Math.ceil(list.length / BOARDS_PAGE));
const p = Math.min(page, pages - 1); const p = Math.min(page, pages - 1);
els.boardsTitle.textContent = pages > 1 ? `مباريات الجولة (${p + 1} من ${pages})` : 'مباريات الجولة'; els.boardsTitle.textContent = pages > 1 ? `ماتشات الجولة (${p + 1} من ${pages})` : 'ماتشات الجولة';
els.boards.innerHTML = list.slice(p * BOARDS_PAGE, (p + 1) * BOARDS_PAGE).map(b => { els.boards.innerHTML = list.slice(p * BOARDS_PAGE, (p + 1) * BOARDS_PAGE).map(b => {
const res = RESULT[b.result]; const res = RESULT[b.result];
const mid = b.state === 'bye' ? 'راحة' : res ? `${res[0]} - ${res[1]}` : (b.state === 'live' ? '<span class="pulse-dot"></span>' : ''); const mid = b.state === 'bye' ? 'راحة' : res ? `${res[0]} - ${res[1]}` : (b.state === 'live' ? '<span class="pulse-dot"></span>' : '');
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
if (d.round.status === 'pending' && d.round.scheduled_start_at) { if (d.round.status === 'pending' && d.round.scheduled_start_at) {
text += ' · تبدأ ' + new Intl.DateTimeFormat('ar-EG-u-nu-latn', { timeZone: 'Africa/Cairo', hour: 'numeric', minute: '2-digit' }).format(new Date(d.round.scheduled_start_at)); text += ' · تبدأ ' + new Intl.DateTimeFormat('ar-EG-u-nu-latn', { timeZone: 'Africa/Cairo', hour: 'numeric', minute: '2-digit' }).format(new Date(d.round.scheduled_start_at));
} else if (games) { } else if (games) {
text += ` · ${done} من ${games} خلصت` + (live ? ` · ${live} جارية` : ''); text += ` · ${done} من ${games} خلصت` + (live ? ` · ${live} لايف` : '');
} }
} else if (status === 'registration') text = 'التسجيل مفتوح'; } else if (status === 'registration') text = 'التسجيل مفتوح';
els.round.textContent = text || ' '; els.round.textContent = text || ' ';
......
...@@ -54,7 +54,7 @@ class LiveTournamentsController ...@@ -54,7 +54,7 @@ class LiveTournamentsController
$metaTags = [ $metaTags = [
'title' => $tournament['name'] . ' — El3ab Live', 'title' => $tournament['name'] . ' — El3ab Live',
'description' => $description !== '' ? mb_substr($description, 0, 200) : 'بطولة مباشرة على منصة El3ab', 'description' => $description !== '' ? mb_substr($description, 0, 200) : 'بطولة لايف على El3ab',
'image' => $image, 'image' => $image,
'url' => $liveUrl, 'url' => $liveUrl,
]; ];
...@@ -127,7 +127,7 @@ class LiveTournamentsController ...@@ -127,7 +127,7 @@ class LiveTournamentsController
$content = $this->renderView('_bracket', compact('tournament', 'bracket', 'liveTheme')); $content = $this->renderView('_bracket', compact('tournament', 'bracket', 'liveTheme'));
$this->renderPublicLayout($content, [ $this->renderPublicLayout($content, [
'pageTitle' => $tournament['name'] . ' - القرعة', 'pageTitle' => $tournament['name'] . ' - الشجرة',
'liveTheme' => $liveTheme, 'liveTheme' => $liveTheme,
'liveCustomCss' => $tournament['live_custom_css'] ?? '', 'liveCustomCss' => $tournament['live_custom_css'] ?? '',
'loadBracket' => true, 'loadBracket' => true,
...@@ -144,7 +144,7 @@ class LiveTournamentsController ...@@ -144,7 +144,7 @@ class LiveTournamentsController
$content = $this->renderView('_players', compact('tournament', 'players', 'liveTheme')); $content = $this->renderView('_players', compact('tournament', 'players', 'liveTheme'));
$this->renderPublicLayout($content, [ $this->renderPublicLayout($content, [
'pageTitle' => $tournament['name'] . ' - اللاعبون', 'pageTitle' => $tournament['name'] . ' - اللاعيبة',
'liveTheme' => $liveTheme, 'liveTheme' => $liveTheme,
'liveCustomCss' => $tournament['live_custom_css'] ?? '', 'liveCustomCss' => $tournament['live_custom_css'] ?? '',
]); ]);
......
<?php if (empty($announcements)): ?> <?php if (empty($announcements)): ?>
<div class="empty-state">لا توجد إعلانات</div> <div class="empty-state">مفيش إعلانات</div>
<?php else: ?> <?php else: ?>
<div class="announcements-feed" id="announcements-feed"> <div class="announcements-feed" id="announcements-feed">
<?php foreach ($announcements as $ann): <?php foreach ($announcements as $ann):
......
...@@ -5,7 +5,7 @@ $arenaGames = $arenaData['games'] ?? []; ...@@ -5,7 +5,7 @@ $arenaGames = $arenaData['games'] ?? [];
?> ?>
<?php if (empty($arenaStandings)): ?> <?php if (empty($arenaStandings)): ?>
<div class="empty-state">لا توجد بيانات أرينا</div> <div class="empty-state">لسه مفيش ماتشات أرينا</div>
<?php else: ?> <?php else: ?>
<div class="arena-board"> <div class="arena-board">
<div class="arena-standings"> <div class="arena-standings">
...@@ -14,8 +14,8 @@ $arenaGames = $arenaData['games'] ?? []; ...@@ -14,8 +14,8 @@ $arenaGames = $arenaData['games'] ?? [];
<tr> <tr>
<th>#</th> <th>#</th>
<th>اللاعب</th> <th>اللاعب</th>
<th>النقاط</th> <th>النقط</th>
<th>المباريات</th> <th>الماتشات</th>
<th>الأداء</th> <th>الأداء</th>
</tr> </tr>
</thead> </thead>
...@@ -42,7 +42,7 @@ $arenaGames = $arenaData['games'] ?? []; ...@@ -42,7 +42,7 @@ $arenaGames = $arenaData['games'] ?? [];
</div> </div>
<?php if (!empty($arenaGames)): ?> <?php if (!empty($arenaGames)): ?>
<div class="arena-recent"> <div class="arena-recent">
<h4>آخر المباريات</h4> <h4>آخر الماتشات</h4>
<div class="arena-games-feed"> <div class="arena-games-feed">
<?php foreach (array_slice($arenaGames, 0, 10) as $game): ?> <?php foreach (array_slice($arenaGames, 0, 10) as $game): ?>
<div class="arena-game-item"> <div class="arena-game-item">
......
...@@ -61,7 +61,7 @@ $drawMatch = function (array $m) use ($seat, $fmt) { ...@@ -61,7 +61,7 @@ $drawMatch = function (array $m) use ($seat, $fmt) {
<div class="lb-bracket-match<?= ($m['status'] ?? '') === 'in_progress' || ($m['status'] ?? '') === 'tiebreak' ? ' is-live' : '' ?>"> <div class="lb-bracket-match<?= ($m['status'] ?? '') === 'in_progress' || ($m['status'] ?? '') === 'tiebreak' ? ' is-live' : '' ?>">
<?php foreach ([$a, $b] as $s): ?> <?php foreach ([$a, $b] as $s): ?>
<div class="lb-bracket-seat <?= $s['name'] === null ? 'is-empty' : '' ?> <?= ($winner && $s['id'] && $winner === $s['id']) ? 'is-winner' : '' ?>"> <div class="lb-bracket-seat <?= $s['name'] === null ? 'is-empty' : '' ?> <?= ($winner && $s['id'] && $winner === $s['id']) ? 'is-winner' : '' ?>">
<span><?php if ($s['seed']): ?><span class="lb-bracket-seed"><?= (int)$s['seed'] ?></span> <?php endif; ?><?= htmlspecialchars($s['name'] ?? 'في الانتظار') ?></span> <span><?php if ($s['seed']): ?><span class="lb-bracket-seed"><?= (int)$s['seed'] ?></span> <?php endif; ?><?= htmlspecialchars($s['name'] ?? 'مستني') ?></span>
<?php if ($showScore && $s['name'] !== null && $fmt($s['score']) !== ''): ?><span class="lb-bracket-score"><?= htmlspecialchars($fmt($s['score'])) ?></span><?php endif; ?> <?php if ($showScore && $s['name'] !== null && $fmt($s['score']) !== ''): ?><span class="lb-bracket-score"><?= htmlspecialchars($fmt($s['score'])) ?></span><?php endif; ?>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
...@@ -71,7 +71,7 @@ $drawMatch = function (array $m) use ($seat, $fmt) { ...@@ -71,7 +71,7 @@ $drawMatch = function (array $m) use ($seat, $fmt) {
?> ?>
<?php if (empty($byRound)): ?> <?php if (empty($byRound)): ?>
<div class="empty-state">لم تُسحب القرعة بعد</div> <div class="empty-state">لسه مفيش قرعة</div>
<?php else: ?> <?php else: ?>
<div class="lb-bracket" id="bracket-svg-container" data-tournament-id="<?= htmlspecialchars($tournament['id'] ?? '') ?>" <div class="lb-bracket" id="bracket-svg-container" data-tournament-id="<?= htmlspecialchars($tournament['id'] ?? '') ?>"
data-matches="<?= htmlspecialchars(json_encode($bracket, JSON_UNESCAPED_UNICODE)) ?>"> data-matches="<?= htmlspecialchars(json_encode($bracket, JSON_UNESCAPED_UNICODE)) ?>">
...@@ -83,7 +83,7 @@ $drawMatch = function (array $m) use ($seat, $fmt) { ...@@ -83,7 +83,7 @@ $drawMatch = function (array $m) use ($seat, $fmt) {
<?php endforeach; ?> <?php endforeach; ?>
<?php if ($extra): ?> <?php if ($extra): ?>
<div class="lb-bracket-round"> <div class="lb-bracket-round">
<div class="lb-bracket-round-title">المركز الثالث</div> <div class="lb-bracket-round-title">المركز التالت</div>
<?php foreach ($extra as $m) echo $drawMatch($m); ?> <?php foreach ($extra as $m) echo $drawMatch($m); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
......
...@@ -6,7 +6,7 @@ if ($startTimestamp <= time()) return; ...@@ -6,7 +6,7 @@ if ($startTimestamp <= time()) return;
?> ?>
<div class="countdown-section" data-target="<?= date('c', $startTimestamp) ?>"> <div class="countdown-section" data-target="<?= date('c', $startTimestamp) ?>">
<h3 class="countdown-label">تبدأ البطولة خلال</h3> <h3 class="countdown-label">البطولة تبدأ بعد</h3>
<div class="countdown-clock"> <div class="countdown-clock">
<div class="countdown-unit"> <div class="countdown-unit">
<span class="countdown-value" id="countdown-days">00</span> <span class="countdown-value" id="countdown-days">00</span>
......
...@@ -16,7 +16,7 @@ $left = $max > 0 ? max(0, $max - $taken) : null; ...@@ -16,7 +16,7 @@ $left = $max > 0 ? max(0, $max - $taken) : null;
<h2 class="lb-cta-title" id="lb-cta-title">التسجيل مفتوح</h2> <h2 class="lb-cta-title" id="lb-cta-title">التسجيل مفتوح</h2>
<p class="lb-cta-sub"> <p class="lb-cta-sub">
<?= $fee > 0 ? 'الاشتراك ' . number_format($fee) . ' عملة' : 'الاشتراك مجاني' ?> <?= $fee > 0 ? 'الاشتراك ' . number_format($fee) . ' عملة' : 'الاشتراك مجاني' ?>
<?php if ($left !== null): ?> · <?= $left > 0 ? 'باقي ' . number_format($left) . ' مكان' : 'الأماكن كملت، فيه قائمة انتظار' ?><?php endif; ?> <?php if ($left !== null): ?> · <?= $left > 0 ? 'فاضل ' . number_format($left) . ' مكان' : 'الأماكن كملت، فيه قائمة انتظار' ?><?php endif; ?>
<?php if (($cta['access'] ?? 'public') === 'code_only'): ?> · بالكود بس<?php endif; ?> <?php if (($cta['access'] ?? 'public') === 'code_only'): ?> · بالكود بس<?php endif; ?>
</p> </p>
</div> </div>
......
<?php if (empty($gallery)): ?> <?php if (empty($gallery)): ?>
<div class="empty-state">لا توجد صور</div> <div class="empty-state">مفيش صور</div>
<?php else: ?> <?php else: ?>
<div class="gallery-grid"> <div class="gallery-grid">
<?php foreach ($gallery as $item): ?> <?php foreach ($gallery as $item): ?>
......
<?php <?php
$groups = $data['groups'] ?? []; $groups = $data['groups'] ?? [];
if (empty($groups)): ?> if (empty($groups)): ?>
<div class="empty-state">لا توجد مجموعات</div> <div class="empty-state">مفيش مجموعات</div>
<?php else: ?> <?php else: ?>
<div class="groups-grid"> <div class="groups-grid">
<?php foreach ($groups as $groupName => $groupPlayers): ?> <?php foreach ($groups as $groupName => $groupPlayers): ?>
...@@ -12,7 +12,7 @@ if (empty($groups)): ?> ...@@ -12,7 +12,7 @@ if (empty($groups)): ?>
<tr> <tr>
<th>#</th> <th>#</th>
<th>اللاعب</th> <th>اللاعب</th>
<th>نقاط</th> <th>نقط</th>
<th>م</th> <th>م</th>
</tr> </tr>
</thead> </thead>
......
...@@ -52,7 +52,7 @@ asort($names, SORT_NATURAL | SORT_FLAG_CASE); ...@@ -52,7 +52,7 @@ asort($names, SORT_NATURAL | SORT_FLAG_CASE);
<h4 class="widget-title">مقارنة لاعبين</h4> <h4 class="widget-title">مقارنة لاعبين</h4>
<?php if (count($names) < 2): ?> <?php if (count($names) < 2): ?>
<p class="h2h-empty">تظهر المقارنة بعد أول جولة.</p> <p class="h2h-empty">المقارنة تظهر بعد أول جولة</p>
<?php else: ?> <?php else: ?>
<script type="application/json" id="h2h-data"><?= json_encode( <script type="application/json" id="h2h-data"><?= json_encode(
['names' => $names, 'games' => $games], ['names' => $names, 'games' => $games],
...@@ -61,14 +61,14 @@ asort($names, SORT_NATURAL | SORT_FLAG_CASE); ...@@ -61,14 +61,14 @@ asort($names, SORT_NATURAL | SORT_FLAG_CASE);
<div class="h2h-selectors"> <div class="h2h-selectors">
<select id="h2h-player-a" class="h2h-select" aria-label="اللاعب الأول"> <select id="h2h-player-a" class="h2h-select" aria-label="اللاعب الأول">
<option value="">اختر لاعب...</option> <option value="">اختار لاعب</option>
<?php foreach ($names as $id => $n): ?> <?php foreach ($names as $id => $n): ?>
<option value="<?= htmlspecialchars((string)$id) ?>"><?= htmlspecialchars($n) ?></option> <option value="<?= htmlspecialchars((string)$id) ?>"><?= htmlspecialchars($n) ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<span class="h2h-vs">VS</span> <span class="h2h-vs">VS</span>
<select id="h2h-player-b" class="h2h-select" aria-label="اللاعب الثاني"> <select id="h2h-player-b" class="h2h-select" aria-label="اللاعب التاني">
<option value="">اختر لاعب...</option> <option value="">اختار لاعب</option>
<?php foreach ($names as $id => $n): ?> <?php foreach ($names as $id => $n): ?>
<option value="<?= htmlspecialchars((string)$id) ?>"><?= htmlspecialchars($n) ?></option> <option value="<?= htmlspecialchars((string)$id) ?>"><?= htmlspecialchars($n) ?></option>
<?php endforeach; ?> <?php endforeach; ?>
......
...@@ -4,9 +4,9 @@ $orgLogo = $org['logo_url'] ?? ''; ...@@ -4,9 +4,9 @@ $orgLogo = $org['logo_url'] ?? '';
$statusLabels = [ $statusLabels = [
'draft' => 'مسودة', 'draft' => 'مسودة',
'registration' => 'التسجيل مفتوح', 'registration' => 'التسجيل مفتوح',
'in_progress' => 'جارية الآن', 'in_progress' => 'لايف',
'completed' => 'انتهت', 'completed' => 'خلصت',
'cancelled' => 'ملغية', 'cancelled' => 'اتلغت',
]; ];
$statusClasses = [ $statusClasses = [
'registration' => 'status-registration', 'registration' => 'status-registration',
...@@ -22,14 +22,14 @@ $playerCount = (int)($stats['players'] ?? 0); ...@@ -22,14 +22,14 @@ $playerCount = (int)($stats['players'] ?? 0);
$prize = (int)($tournament['prize_pool_coins'] ?? $tournament['prize_pool'] ?? 0); $prize = (int)($tournament['prize_pool_coins'] ?? $tournament['prize_pool'] ?? 0);
$modeLabels = [ $modeLabels = [
'swiss' => 'نظام سويسري', 'swiss' => 'سويسري',
'elimination' => 'خروج المغلوب', 'elimination' => 'خروج المغلوب',
'single_elimination' => 'خروج المغلوب', 'single_elimination' => 'خروج المغلوب',
'double_elimination' => 'خروج المغلوب المزدوج', 'double_elimination' => 'خروج مزدوج',
'round_robin' => 'دوري كامل', 'round_robin' => 'دوري',
'arena' => 'أرينا', 'arena' => 'أرينا',
'group_stage' => 'مجموعات', 'group_stage' => 'مجموعات',
'multi_phase' => 'متعدد المراحل', 'multi_phase' => 'على مراحل',
]; ];
/** /**
...@@ -124,19 +124,19 @@ $speedLabel = match (true) { ...@@ -124,19 +124,19 @@ $speedLabel = match (true) {
<?php if ($roundsTotal): ?> <?php if ($roundsTotal): ?>
<div class="lb-stat"> <div class="lb-stat">
<div class="lb-stat-value"><?= max(0, (int)($stats['rounds_played'] ?? 0)) ?>/<?= $roundsTotal ?></div> <div class="lb-stat-value"><?= max(0, (int)($stats['rounds_played'] ?? 0)) ?>/<?= $roundsTotal ?></div>
<div class="lb-stat-label">جولات مكتملة</div> <div class="lb-stat-label">جولات خلصت</div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($stats['games_total'])): ?> <?php if (!empty($stats['games_total'])): ?>
<div class="lb-stat"> <div class="lb-stat">
<div class="lb-stat-value"><?= (int)$stats['games_completed'] ?></div> <div class="lb-stat-value"><?= (int)$stats['games_completed'] ?></div>
<div class="lb-stat-label">مباراة انتهت</div> <div class="lb-stat-label">ماتش خلص</div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($stats['games_live'])): ?> <?php if (!empty($stats['games_live'])): ?>
<div class="lb-stat is-live"> <div class="lb-stat is-live">
<div class="lb-stat-value"><?= (int)$stats['games_live'] ?></div> <div class="lb-stat-value"><?= (int)$stats['games_live'] ?></div>
<div class="lb-stat-label">جارية الآن</div> <div class="lb-stat-label">لايف</div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if ($prize > 0): ?> <?php if ($prize > 0): ?>
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
$description = $tournament['description'] ?? ''; $description = $tournament['description'] ?? '';
$rules = $tournament['rules'] ?? ''; $rules = $tournament['rules'] ?? '';
$modeDescriptions = [ $modeDescriptions = [
'swiss' => 'نظام سويسري: يتم اقتران اللاعبين ذوي النقاط المتقاربة في كل جولة. لا يُقصى أي لاعب.', 'swiss' => 'سويسري: كل جولة بتقابل حد نقطه قريبة من نقطك، ومحدش بيخرج.',
'elimination' => 'خروج المغلوب: الخاسر يخرج من البطولة. الفائز يتقدم للجولة التالية.', 'elimination' => 'خروج المغلوب: اللي يخسر يخرج، واللي يكسب يكمل.',
'round_robin' => 'دوري كامل: كل لاعب يلعب ضد جميع اللاعبين الآخرين.', 'round_robin' => 'دوري: كل لاعب بيلعب مع الكل.',
'arena' => 'أرينا: مباريات سريعة متتالية. كلما لعبت أكثر، زادت فرصتك.', 'arena' => 'أرينا: ماتشات سريعة ورا بعض، وكل ما تلعب أكتر فرصتك تزيد.',
'group_stage' => 'مجموعات: يتم تقسيم اللاعبين إلى مجموعات، والأوائل يتأهلون.', 'group_stage' => 'مجموعات: اللاعيبة بيتقسموا مجموعات، والأوائل بيطلعوا.',
'multi_phase' => 'متعدد المراحل: مراحل متتالية بأنظمة مختلفة.', 'multi_phase' => 'على مراحل: كل مرحلة بنظام مختلف.',
]; ];
$mode = $tournament['tournament_mode'] ?? 'swiss'; $mode = $tournament['tournament_mode'] ?? 'swiss';
?> ?>
...@@ -20,7 +20,7 @@ $mode = $tournament['tournament_mode'] ?? 'swiss'; ...@@ -20,7 +20,7 @@ $mode = $tournament['tournament_mode'] ?? 'swiss';
<?php if ($description): ?> <?php if ($description): ?>
<div class="info-description"> <div class="info-description">
<h4>الوصف</h4> <h4>التفاصيل</h4>
<div class="info-text"><?= nl2br(htmlspecialchars($description)) ?></div> <div class="info-text"><?= nl2br(htmlspecialchars($description)) ?></div>
</div> </div>
<?php endif; ?> <?php endif; ?>
......
...@@ -29,14 +29,14 @@ $nameOf = function ($pairing, string $side) { ...@@ -29,14 +29,14 @@ $nameOf = function ($pairing, string $side) {
}; };
$reasonLabels = [ $reasonLabels = [
'checkmate' => 'كش مات', 'resign' => 'انسحاب', 'timeout' => 'انتهى الوقت', 'checkmate' => 'كش مات', 'resign' => 'استسلام', 'timeout' => 'الوقت خلص',
'abandon' => 'انسحاب', 'stalemate' => 'تعادل بالجمود', 'agreement' => 'تعادل بالاتفاق', 'abandon' => 'انسحاب', 'stalemate' => 'باط', 'agreement' => 'تعادل بالاتفاق',
'forfeit' => 'عدم حضور', 'forfeit' => 'غياب',
]; ];
?> ?>
<?php if (empty($pairingsList)): ?> <?php if (empty($pairingsList)): ?>
<div class="empty-state">لا توجد مباريات في هذه الجولة بعد</div> <div class="empty-state">لسه مفيش ماتشات في الجولة دي</div>
<?php else: ?> <?php else: ?>
<div class="lb-boards"> <div class="lb-boards">
...@@ -79,13 +79,13 @@ $reasonLabels = [ ...@@ -79,13 +79,13 @@ $reasonLabels = [
<div class="lb-board-tag"> <div class="lb-board-tag">
<?php if ($isLive): ?> <?php if ($isLive): ?>
<span class="pulse-dot"></span> جارية الآن <span class="pulse-dot"></span> لايف
<?php elseif ($isBye): ?> <?php elseif ($isBye): ?>
مقعد فارغ راحة
<?php elseif ($reason && isset($reasonLabels[$reason])): ?> <?php elseif ($reason && isset($reasonLabels[$reason])): ?>
<?= htmlspecialchars($reasonLabels[$reason]) ?> <?= htmlspecialchars($reasonLabels[$reason]) ?>
<?php else: ?> <?php else: ?>
انتهت خلص
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="modal-player-stats" id="modal-player-stats"> <div class="modal-player-stats" id="modal-player-stats">
<div class="modal-stat"> <div class="modal-stat">
<span class="modal-stat-value" id="modal-wins">0</span> <span class="modal-stat-value" id="modal-wins">0</span>
<span class="modal-stat-label">انتصارات</span> <span class="modal-stat-label">كسب</span>
</div> </div>
<div class="modal-stat"> <div class="modal-stat">
<span class="modal-stat-value" id="modal-draws">0</span> <span class="modal-stat-value" id="modal-draws">0</span>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
<div class="modal-stat"> <div class="modal-stat">
<span class="modal-stat-value" id="modal-losses">0</span> <span class="modal-stat-value" id="modal-losses">0</span>
<span class="modal-stat-label">هزائم</span> <span class="modal-stat-label">خسارة</span>
</div> </div>
</div> </div>
<div class="modal-player-games" id="modal-player-games"></div> <div class="modal-player-games" id="modal-player-games"></div>
......
...@@ -30,7 +30,7 @@ usort($list, function ($a, $b) use ($read) { ...@@ -30,7 +30,7 @@ usort($list, function ($a, $b) use ($read) {
?> ?>
<?php if (empty($list)): ?> <?php if (empty($list)): ?>
<div class="empty-state">لا يوجد لاعبون مسجلون بعد</div> <div class="empty-state">لسه محدش اتسجل</div>
<?php else: ?> <?php else: ?>
<div class="lb-field"> <div class="lb-field">
<?php foreach ($list as $i => $p): <?php foreach ($list as $i => $p):
......
<?php <?php
$slug = $tournament['slug'] ?? $tournament['id']; $slug = $tournament['slug'] ?? $tournament['id'];
$shareUrl = ($_SERVER['REQUEST_SCHEME'] ?? 'https') . '://' . ($_SERVER['HTTP_HOST'] ?? '') . '/live/' . $slug; $shareUrl = ($_SERVER['REQUEST_SCHEME'] ?? 'https') . '://' . ($_SERVER['HTTP_HOST'] ?? '') . '/live/' . $slug;
$shareText = $tournament['name'] . ' - بطولة مباشرة على El3ab'; $shareText = $tournament['name'] . ' - لايف على El3ab';
$qrSvg = QRCodeService::generateSvg($shareUrl, 150); $qrSvg = QRCodeService::generateSvg($shareUrl, 150);
?> ?>
<div class="sharing-widget lb-share"> <div class="sharing-widget lb-share">
<div class="lb-share-head"> <div class="lb-share-head">
<h4 class="widget-title">تابع البطولة مباشرة</h4> <h4 class="widget-title">تابع البطولة لايف</h4>
<p class="lb-share-hint">امسح الرمز أو انسخ الرابط — يفتح هذه الصفحة كما هي، بلا تسجيل دخول.</p> <p class="lb-share-hint">امسح الكود أو انسخ اللينك، من غير تسجيل دخول</p>
</div> </div>
<?php /* The QR is the point of the card at a venue, so it leads rather than <?php /* The QR is the point of the card at a venue, so it leads rather than
...@@ -17,7 +17,7 @@ $qrSvg = QRCodeService::generateSvg($shareUrl, 150); ...@@ -17,7 +17,7 @@ $qrSvg = QRCodeService::generateSvg($shareUrl, 150);
<div class="share-url-box lb-share-row"> <div class="share-url-box lb-share-row">
<input type="text" readonly value="<?= htmlspecialchars($shareUrl) ?>" class="share-url-input lb-share-url" id="share-url"> <input type="text" readonly value="<?= htmlspecialchars($shareUrl) ?>" class="share-url-input lb-share-url" id="share-url">
<button class="share-copy-btn lb-share-btn" data-copy="<?= htmlspecialchars($shareUrl) ?>" title="نسخ الرابط"> <button class="share-copy-btn lb-share-btn" data-copy="<?= htmlspecialchars($shareUrl) ?>" title="انسخ اللينك">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</button> </button>
</div> </div>
...@@ -36,7 +36,7 @@ $qrSvg = QRCodeService::generateSvg($shareUrl, 150); ...@@ -36,7 +36,7 @@ $qrSvg = QRCodeService::generateSvg($shareUrl, 150);
<div class="share-embed lb-share-embed"> <div class="share-embed lb-share-embed">
<details> <details>
<summary>كود التضمين</summary> <summary>حطها في موقعك</summary>
<textarea readonly class="embed-code" rows="3"><iframe src="<?= htmlspecialchars($shareUrl) ?>/embed" width="100%" height="600" frameborder="0"></iframe></textarea> <textarea readonly class="embed-code" rows="3"><iframe src="<?= htmlspecialchars($shareUrl) ?>/embed" width="100%" height="600" frameborder="0"></iframe></textarea>
</details> </details>
</div> </div>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
if (empty($sponsors)) return; if (empty($sponsors)) return;
$tierLabels = [ $tierLabels = [
'title' => 'الراعي الرسمي', 'presenting' => 'الراعي المقدّم', 'gold' => 'راعي ذهبي', 'silver' => 'راعي فضي', 'title' => 'الراعي الرسمي', 'presenting' => 'راعي رئيسي', 'gold' => 'راعي ذهبي', 'silver' => 'راعي فضي',
'bronze' => 'راعي برونزي', 'partner' => 'شريك', 'media' => 'الشريك الإعلامي', 'venue' => 'شريك المكان', 'bronze' => 'راعي برونزي', 'partner' => 'شريك', 'media' => 'الشريك الإعلامي', 'venue' => 'شريك المكان',
]; ];
$size = fn(string $tier) => match ($tier) { 'title', 'presenting' => 'is-lead', 'gold', 'silver' => 'is-mid', default => 'is-small' }; $size = fn(string $tier) => match ($tier) { 'title', 'presenting' => 'is-lead', 'gold', 'silver' => 'is-mid', default => 'is-small' };
......
...@@ -59,7 +59,7 @@ foreach ($rows as $r) { ...@@ -59,7 +59,7 @@ foreach ($rows as $r) {
?> ?>
<?php if (empty($rows)): ?> <?php if (empty($rows)): ?>
<div class="empty-state">لا يوجد ترتيب بعد — سيظهر فور انتهاء أول مباراة</div> <div class="empty-state">الترتيب يظهر بعد أول ماتش</div>
<?php else: ?> <?php else: ?>
<?php /* The top three, sized to be read from across a hall. */ ?> <?php /* The top three, sized to be read from across a hall. */ ?>
...@@ -87,7 +87,7 @@ foreach ($rows as $r) { ...@@ -87,7 +87,7 @@ foreach ($rows as $r) {
<tr> <tr>
<th class="col-rank">#</th> <th class="col-rank">#</th>
<th class="col-player">اللاعب</th> <th class="col-player">اللاعب</th>
<th class="col-pts">النقاط</th> <th class="col-pts">النقط</th>
<th class="col-games">م</th> <th class="col-games">م</th>
<th class="col-wins">ف</th> <th class="col-wins">ف</th>
<th class="col-draws">ت</th> <th class="col-draws">ت</th>
...@@ -112,11 +112,7 @@ foreach ($rows as $r) { ...@@ -112,11 +112,7 @@ foreach ($rows as $r) {
aria-label="<?= htmlspecialchars($p['name']) ?> — تفاصيل اللاعب" aria-label="<?= htmlspecialchars($p['name']) ?> — تفاصيل اللاعب"
data-player-id="<?= htmlspecialchars($p['id']) ?>" data-player-id="<?= htmlspecialchars($p['id']) ?>"
data-player="<?= htmlspecialchars($card) ?>"> data-player="<?= htmlspecialchars($card) ?>">
<td class="col-rank"> <td class="col-rank"><?= $p['rank'] ?></td>
<?php if (isset($medals[$p['rank']])): ?>
<span class="medal" aria-label="المركز <?= $p['rank'] ?>"><?= $medals[$p['rank']] ?></span>
<?php else: ?><?= $p['rank'] ?><?php endif; ?>
</td>
<td class="col-player"> <td class="col-player">
<div class="lb-player-cell"> <div class="lb-player-cell">
<?php if ($p['avatar']): ?> <?php if ($p['avatar']): ?>
...@@ -157,7 +153,7 @@ foreach ($rows as $r) { ...@@ -157,7 +153,7 @@ foreach ($rows as $r) {
<?php if (count($rows) > $TOP_VISIBLE): ?> <?php if (count($rows) > $TOP_VISIBLE): ?>
<button type="button" class="lb-showall" data-showall <button type="button" class="lb-showall" data-showall
aria-expanded="false" aria-controls="standings-wrap"> aria-expanded="false" aria-controls="standings-wrap">
عرض كل اللاعبين (<?= count($rows) ?>) شوف الكل (<?= count($rows) ?>)
</button> </button>
<?php endif; ?> <?php endif; ?>
</div> </div>
......
...@@ -29,17 +29,17 @@ $drawPct = 100 - $decPct; ...@@ -29,17 +29,17 @@ $drawPct = 100 - $decPct;
// round and live-game count; repeating them here reads as a page that does not // round and live-game count; repeating them here reads as a page that does not
// know what it has already said. This section covers what the hero cannot fit. // know what it has already said. This section covers what the hero cannot fit.
$metrics = [ $metrics = [
['value' => $games, 'label' => 'إجمالي المباريات'], ['value' => $games, 'label' => 'الماتشات'],
['value' => $done, 'label' => 'انتهت'], ['value' => $done, 'label' => 'خلصت'],
['value' => $decisive, 'label' => 'حُسمت بفوز'], ['value' => $decisive, 'label' => 'اتحسمت'],
['value' => $draws, 'label' => 'تعادل'], ['value' => $draws, 'label' => 'تعادل'],
]; ];
if ($byes > 0) $metrics[] = ['value' => $byes, 'label' => 'مقاعد فارغة']; if ($byes > 0) $metrics[] = ['value' => $byes, 'label' => 'راحة'];
if ($live > 0) $metrics[] = ['value' => $live, 'label' => 'جارية الآن', 'live' => true]; if ($live > 0) $metrics[] = ['value' => $live, 'label' => 'لايف', 'live' => true];
// Nothing has been played: the split bar and a row of zeroes say nothing. // Nothing has been played: the split bar and a row of zeroes say nothing.
if ($games === 0) { if ($games === 0) {
echo '<div class="empty-state">لم تُلعب أي مباراة بعد</div>'; echo '<div class="empty-state">لسه مفيش ماتشات</div>';
return; return;
} }
?> ?>
...@@ -56,11 +56,11 @@ if ($games === 0) { ...@@ -56,11 +56,11 @@ if ($games === 0) {
<?php if ($decisive + $draws > 0): ?> <?php if ($decisive + $draws > 0): ?>
<div class="lb-split"> <div class="lb-split">
<div class="lb-split-head"> <div class="lb-split-head">
<span class="lb-split-key"><span class="lb-split-swatch is-decisive"></span> حُسمت <strong><?= $decisive ?></strong></span> <span class="lb-split-key"><span class="lb-split-swatch is-decisive"></span> اتحسمت <strong><?= $decisive ?></strong></span>
<span class="lb-split-key"><span class="lb-split-swatch is-draw"></span> تعادل <strong><?= $draws ?></strong></span> <span class="lb-split-key"><span class="lb-split-swatch is-draw"></span> تعادل <strong><?= $draws ?></strong></span>
</div> </div>
<div class="lb-split-bar" role="img" <div class="lb-split-bar" role="img"
aria-label="<?= $decPct ?>٪ من المباريات حُسمت و<?= $drawPct ?>٪ انتهت بالتعادل"> aria-label="<?= $decPct ?>٪ اتحسمت و<?= $drawPct ?>٪ تعادل">
<span class="lb-split-seg is-decisive" style="inline-size: <?= $decPct ?>%"></span> <span class="lb-split-seg is-decisive" style="inline-size: <?= $decPct ?>%"></span>
<span class="lb-split-seg is-draw" style="inline-size: <?= $drawPct ?>%"></span> <span class="lb-split-seg is-draw" style="inline-size: <?= $drawPct ?>%"></span>
</div> </div>
......
...@@ -41,7 +41,7 @@ $roundState = function (array $round): string { ...@@ -41,7 +41,7 @@ $roundState = function (array $round): string {
return $withResult === count($pairings) ? 'completed' : 'in_progress'; return $withResult === count($pairings) ? 'completed' : 'in_progress';
}; };
$stateLabel = ['completed' => 'مكتملة', 'in_progress' => 'جارية', 'paired' => 'القرعة جاهزة', 'upcoming' => 'قادمة']; $stateLabel = ['completed' => 'خلصت', 'in_progress' => 'شغالة', 'paired' => 'اتوزّعت', 'upcoming' => 'لسه'];
$completed = 0; $completed = 0;
foreach ($rounds as $r) if ($roundState($r) === 'completed') $completed++; foreach ($rounds as $r) if ($roundState($r) === 'completed') $completed++;
...@@ -50,12 +50,12 @@ $pct = $total > 0 ? (int)round($completed / $total * 100) : 0; ...@@ -50,12 +50,12 @@ $pct = $total > 0 ? (int)round($completed / $total * 100) : 0;
?> ?>
<?php if (empty($rounds)): ?> <?php if (empty($rounds)): ?>
<div class="empty-state">لم تبدأ أي جولة بعد</div> <div class="empty-state">الجولات لسه مبدأتش</div>
<?php else: ?> <?php else: ?>
<div class="lb-progress lb-timeline-progress"> <div class="lb-progress lb-timeline-progress">
<div class="lb-progress-head"> <div class="lb-progress-head">
<span class="lb-progress-round"><?= $completed ?> من <?= $total ?> جولات مكتملة</span> <span class="lb-progress-round"><?= $completed ?> من <?= $total ?> جولات خلصت</span>
<span class="lb-progress-pct"><?= $pct ?>%</span> <span class="lb-progress-pct"><?= $pct ?>%</span>
</div> </div>
<div class="lb-progress-track"> <div class="lb-progress-track">
...@@ -80,7 +80,7 @@ $pct = $total > 0 ? (int)round($completed / $total * 100) : 0; ...@@ -80,7 +80,7 @@ $pct = $total > 0 ? (int)round($completed / $total * 100) : 0;
<?php if (!empty($pairings)): ?> <?php if (!empty($pairings)): ?>
<details class="lb-round-details"<?= $state === 'in_progress' ? ' open' : '' ?>> <details class="lb-round-details"<?= $state === 'in_progress' ? ' open' : '' ?>>
<summary><?= count($pairings) ?> مباراة</summary> <summary><?= count($pairings) ?> ماتش</summary>
<div class="lb-round-games"> <div class="lb-round-games">
<?php foreach ($pairings as $p): ?> <?php foreach ($pairings as $p): ?>
<div class="lb-round-game<?= empty($p['result']) && empty($p['is_bye']) ? ' is-live' : '' ?>"> <div class="lb-round-game<?= empty($p['result']) && empty($p['is_bye']) ? ' is-live' : '' ?>">
......
...@@ -7,7 +7,7 @@ $mode = $data['mode'] ?? 'swiss'; ...@@ -7,7 +7,7 @@ $mode = $data['mode'] ?? 'swiss';
<div class="live-embed" data-tournament-id="<?= htmlspecialchars($tournament['id']) ?>" data-status="<?= $status ?>"> <div class="live-embed" data-tournament-id="<?= htmlspecialchars($tournament['id']) ?>" data-status="<?= $status ?>">
<div class="embed-header"> <div class="embed-header">
<h2 class="embed-title"><?= htmlspecialchars($tournament['name']) ?></h2> <h2 class="embed-title"><?= htmlspecialchars($tournament['name']) ?></h2>
<span class="embed-badge status-<?= $status ?>"><?= $status === 'in_progress' ? 'مباشر' : ($status === 'completed' ? 'انتهت' : 'قريباً') ?></span> <span class="embed-badge status-<?= $status ?>"><?= $status === 'in_progress' ? 'لايف' : ($status === 'completed' ? 'خلصت' : 'قريب') ?></span>
</div> </div>
<?php if (!empty($visibility['standings']) && !empty($data['standings'])): ?> <?php if (!empty($visibility['standings']) && !empty($data['standings'])): ?>
...@@ -24,7 +24,7 @@ $mode = $data['mode'] ?? 'swiss'; ...@@ -24,7 +24,7 @@ $mode = $data['mode'] ?? 'swiss';
<div class="embed-footer"> <div class="embed-footer">
<a href="/live/<?= htmlspecialchars($tournament['slug'] ?? $tournament['id']) ?>" target="_blank" class="embed-link"> <a href="/live/<?= htmlspecialchars($tournament['slug'] ?? $tournament['id']) ?>" target="_blank" class="embed-link">
عرض البطولة كاملة على El3ab شوف البطولة كلها على El3ab
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><path d="M15 3h6v6"/><path d="M10 14 21 3"/></svg> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><path d="M15 3h6v6"/><path d="M10 14 21 3"/></svg>
</a> </a>
</div> </div>
......
...@@ -49,7 +49,7 @@ $signup = $data['signup'] ?? ['open' => false]; ...@@ -49,7 +49,7 @@ $signup = $data['signup'] ?? ['open' => false];
<?php if (!empty($visibility['pairings']) && $status === 'in_progress'): ?> <?php if (!empty($visibility['pairings']) && $status === 'in_progress'): ?>
<section class="live-section" id="pairings-section"> <section class="live-section" id="pairings-section">
<h2 class="section-title"><span class="pulse-dot"></span> المباريات الجارية</h2> <h2 class="section-title"><span class="pulse-dot"></span> ماتشات لايف</h2>
<?php $pairings = $data['pairings'] ?? []; require __DIR__ . '/_pairings.php'; ?> <?php $pairings = $data['pairings'] ?? []; require __DIR__ . '/_pairings.php'; ?>
</section> </section>
<?php endif; ?> <?php endif; ?>
...@@ -102,7 +102,7 @@ $signup = $data['signup'] ?? ['open' => false]; ...@@ -102,7 +102,7 @@ $signup = $data['signup'] ?? ['open' => false];
<?php if (!empty($visibility['players']) && !empty($data['players'])): ?> <?php if (!empty($visibility['players']) && !empty($data['players'])): ?>
<section class="live-section" id="players-section"> <section class="live-section" id="players-section">
<h2 class="section-title">اللاعبون</h2> <h2 class="section-title">اللاعيبة</h2>
<?php $players = $data['players'] ?? []; require __DIR__ . '/_players.php'; ?> <?php $players = $data['players'] ?? []; require __DIR__ . '/_players.php'; ?>
</section> </section>
<?php endif; ?> <?php endif; ?>
...@@ -123,14 +123,14 @@ $signup = $data['signup'] ?? ['open' => false]; ...@@ -123,14 +123,14 @@ $signup = $data['signup'] ?? ['open' => false];
<?php if (!empty($visibility['gallery']) && !empty($data['gallery'])): ?> <?php if (!empty($visibility['gallery']) && !empty($data['gallery'])): ?>
<section class="live-section" id="gallery-section"> <section class="live-section" id="gallery-section">
<h2 class="section-title">معرض الصور</h2> <h2 class="section-title">الصور</h2>
<?php $gallery = $data['gallery']; require __DIR__ . '/_gallery.php'; ?> <?php $gallery = $data['gallery']; require __DIR__ . '/_gallery.php'; ?>
</section> </section>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($visibility['rules']) && !empty($tournament['description'])): ?> <?php if (!empty($visibility['rules']) && !empty($tournament['description'])): ?>
<section class="live-section" id="info-section"> <section class="live-section" id="info-section">
<h2 class="section-title">القوانين والمعلومات</h2> <h2 class="section-title">عن البطولة</h2>
<?php require __DIR__ . '/_info.php'; ?> <?php require __DIR__ . '/_info.php'; ?>
</section> </section>
<?php endif; ?> <?php endif; ?>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
$name = ($tournament['name_ar'] ?? '') ?: $tournament['name']; $name = ($tournament['name_ar'] ?? '') ?: $tournament['name'];
$tid = $tournament['id']; $tid = $tournament['id'];
$tierLabels = [ $tierLabels = [
'title' => 'الراعي الرسمي', 'presenting' => 'الراعي المقدّم', 'gold' => 'راعي ذهبي', 'silver' => 'راعي فضي', 'title' => 'الراعي الرسمي', 'presenting' => 'راعي رئيسي', 'gold' => 'راعي ذهبي', 'silver' => 'راعي فضي',
'bronze' => 'راعي برونزي', 'partner' => 'شريك', 'media' => 'الشريك الإعلامي', 'venue' => 'شريك المكان', 'bronze' => 'راعي برونزي', 'partner' => 'شريك', 'media' => 'الشريك الإعلامي', 'venue' => 'شريك المكان',
]; ];
?> ?>
...@@ -52,16 +52,16 @@ $tierLabels = [ ...@@ -52,16 +52,16 @@ $tierLabels = [
</header> </header>
<main class="scr-stage" aria-live="polite"> <main class="scr-stage" aria-live="polite">
<section class="scr-panel" data-panel="featured" aria-label="المباريات المميزة"> <section class="scr-panel" data-panel="featured" aria-label="أهم الماتشات">
<h2 class="scr-panel-title">المباريات المميزة</h2> <h2 class="scr-panel-title">أهم الماتشات</h2>
<div class="scr-featured" id="scr-featured"></div> <div class="scr-featured" id="scr-featured"></div>
</section> </section>
<section class="scr-panel" data-panel="standings" aria-label="الترتيب"> <section class="scr-panel" data-panel="standings" aria-label="الترتيب">
<h2 class="scr-panel-title">الترتيب</h2> <h2 class="scr-panel-title">الترتيب</h2>
<div class="scr-table" id="scr-standings"></div> <div class="scr-table" id="scr-standings"></div>
</section> </section>
<section class="scr-panel" data-panel="boards" aria-label="مباريات الجولة"> <section class="scr-panel" data-panel="boards" aria-label="ماتشات الجولة">
<h2 class="scr-panel-title" id="scr-boards-title">مباريات الجولة</h2> <h2 class="scr-panel-title" id="scr-boards-title">ماتشات الجولة</h2>
<div class="scr-boards" id="scr-boards"></div> <div class="scr-boards" id="scr-boards"></div>
</section> </section>
<section class="scr-panel" data-panel="idle" aria-label="البطولة"> <section class="scr-panel" data-panel="idle" aria-label="البطولة">
...@@ -74,7 +74,7 @@ $tierLabels = [ ...@@ -74,7 +74,7 @@ $tierLabels = [
<aside class="scr-qr"> <aside class="scr-qr">
<div class="scr-qr-code"><?= $qr ?></div> <div class="scr-qr-code"><?= $qr ?></div>
<p><?= $signup ? 'امسح وسجّل' : 'تابع مباشر' ?></p> <p><?= $signup ? 'امسح وسجّل' : 'تابع لايف' ?></p>
</aside> </aside>
<?php if (!empty($sponsors)): ?> <?php if (!empty($sponsors)): ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment