Scoreboard/HTML/Original/eventList.html
2025-01-08 09:39:14 +00:00

58 lines
2.4 KiB
HTML

<!DOCTYPE html>
<head>
<link href="eventList.css" rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
integrity="5e2ESR8Ycmos6g3gAKr1Jvwye8sW4U1u/cAKulfVJnkakCcMqhOudbtPnvJ+nbv7" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.1/knockout-latest.js"
integrity="sha512-2AL/VEauKkZqQU9BHgnv48OhXcJPx9vdzxN1JrKDVc4FPU/MEE/BZ6d9l0mP7VmvLsjtYwqiYQpDskK9dG8KBA=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
<body>
<!--
TODO:
Add kick off time when match not started
Add match event support (across line) in black and white.
-->
<!-- ko if: eventList().length === 0 -->
<div> no events yet </div>
<!-- /ko-->
<!-- ko if: eventList().length > 0 -->
<div class="timeline" data-bind="foreach: eventList">
<!-- ko if: category === 'Match' -->
<div class="timeline-item match">
<div class="timeline-content-match">
<p data-bind="text: $parent.getEventMessage($data)"></p>
</div>
</div>
<!-- /ko -->
<!-- ko ifnot: category === 'Match' -->
<div class="timeline-item">
<div class="timeline-content"
data-bind="css: { away: category ==='Away' }, style: { 'border-color': category === 'Home' ? $parent.homeTeamColor() : $parent.awayTeamColor() }">
<button class="delete-btn" data-bind="click: () => $parent.deleteEvent(id)">
<i class="fa fa-trash"></i>
</button>
<p data-bind="text: $parent.getEventMessage($data)"></p>
</div>
<!-- ko if: eventType !== 'YellowCard' && eventType !== 'RedCard' -->
<span class="score-panel" data-bind="text: $parent.getScoreAtEvent($data.id)"></span>
<!-- /ko -->
<!-- ko if: eventType === 'YellowCard' || eventType === 'RedCard' -->
<i class="fa fa-circle icon" data-bind="css:{ yc: eventType ==='YellowCard', rc: eventType==='RedCard' }"></i>
<!-- /ko -->
</div>
<!-- /ko-->
</div>
<!-- /ko -->
<script src="eventList.js" type="text/javascript"></script>
</body>