Skip to content

Commit

Permalink
cotuongpc1: add banner
Browse files Browse the repository at this point in the history
  • Loading branch information
quyettvq committed Jul 27, 2024
1 parent 92bc5f7 commit c919f2b
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 17 deletions.
Binary file added public/img/cotuongpc1/banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 20 additions & 16 deletions src/cotuongpc1/CoTuongPc1.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import players from './data/players.json';
import matches from './data/matches.json';
import {Rules} from './rules/Rules';
import {createMatchId, datePlus, dateStringify, isDateInRange, roundNameAt} from './utils';
import {Banner} from './banner/Banner';

export let CoTuongPc1 = () => {
// Matches
Expand Down Expand Up @@ -86,22 +87,25 @@ export let CoTuongPc1 = () => {

return (
<div class="CoTuongPc1">
<h1>Giải vô địch Cờ tướng PC1 2024</h1>
<h2>Điều lệ giải đấu</h2>
<Rules />
<h2>Bảng xếp hạng</h2>
<RankingTable
players={players}
matches={matches}
matchesById={matchesById}
matchSchedules={matchSchedules}
currentRoundIndex={currentRoundIndex}
/>
<h2>Các vòng đấu</h2>
<RoundsAndMatches
rounds={rounds}
matchesById={matchesById}
/>
<Banner />
<main>
<h1>Giải VĐ Cờ Tướng PC1 2024</h1>
<h2>Điều lệ giải đấu</h2>
<Rules />
<h2>Bảng xếp hạng</h2>
<RankingTable
players={players}
matches={matches}
matchesById={matchesById}
matchSchedules={matchSchedules}
currentRoundIndex={currentRoundIndex}
/>
<h2>Các vòng đấu</h2>
<RoundsAndMatches
rounds={rounds}
matchesById={matchesById}
/>
</main>
</div>
);
};
12 changes: 11 additions & 1 deletion src/cotuongpc1/CoTuongPc1.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
.CoTuongPc1 {
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #222;
margin: 0;
padding: 0;
}

.CoTuongPc1 {
max-width: 70ch;

main {
padding: 0 0.5rem;
}

h1 {
font-weight: normal;
Expand Down
12 changes: 12 additions & 0 deletions src/cotuongpc1/banner/Banner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import './Banner.less';

export let Banner = () => {
return (
<div class="Banner">
<svg
viewBox="0 0 16 9"
style={{backgroundImage: 'url("/img/cotuongpc1/banner.jpg")'}}
/>
</div>
)
};
11 changes: 11 additions & 0 deletions src/cotuongpc1/banner/Banner.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.Banner {
overflow: hidden;

svg {
display: block;
width: 100%;
background-size: 100%;
background-repeat: no-repeat;
background-position: center;
}
}

0 comments on commit c919f2b

Please sign in to comment.