Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
add final game section
Browse files Browse the repository at this point in the history
  • Loading branch information
Bao Zhiyuan committed Nov 21, 2024
1 parent 70bc9cb commit 8e064b8
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/build.mts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ function indexHtml(): string {
.map(e => renderGameCard(...e))
.join('\n')

const finalGameCards = FINAL_TEAMS.map(teamName =>
renderGameCard(teamName, metaInfos.get(teamName)!),
).join('\n')

return /*html*/ `
<!DOCTYPE html>
<html lang="en">
Expand Down Expand Up @@ -273,6 +277,12 @@ function indexHtml(): string {
}
}
.game-cards-final {
display: grid;
grid-template-columns: ${FINAL_TEAMS.map(() => '1fr').join(' ')};
gap: 1rem;
}
.game-cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
Expand Down Expand Up @@ -349,11 +359,13 @@ function indexHtml(): string {
<main>
<section class='intro-section'>
<h1>MoonBit Code JAM 2024</h1>
<p>决赛作品展示</p>
</section>
<div class='game-cards-final'>
${finalGameCards}
</div>
<section class='intro-section'>
<p>选手提交作品展示</p>
<div class='buttons'>
<a class='button' href='https://tianchi.aliyun.com/competition/entrance/532262'>立即报名</a>
<a class='button' href='https://github.com/moonbitlang/MoonBit-Code-JAM-2024'>提交作品</a>
</div>
</section>
<div class='game-cards'>
${gameCards}
Expand Down

0 comments on commit 8e064b8

Please sign in to comment.