Skip to content

Commit

Permalink
Use HtmlLayout
Browse files Browse the repository at this point in the history
This just cuts down on duplication and adds a favicon.
  • Loading branch information
AdamLearns committed Feb 12, 2024
1 parent 76d1ab2 commit 9afdd41
Showing 1 changed file with 24 additions and 26 deletions.
50 changes: 24 additions & 26 deletions packages/web/src/pages/points.astro
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
---
import { BotDatabase } from "abbott-database"
import HtmlLayout from "../layouts/main.astro"
const botDatabase = new BotDatabase()
const topPoints = await botDatabase.getTopPointsWithTwitchNames()
---

<html lang="en">
<head>
<meta charset="utf8" />
</head>
<body class="m-4">
<h2 class="text-xl">
Point totals in <a
class="text-fuchsia-200 underline"
href=" https: twitch.tv AdamLearnsLive">Adam's Twitch channel</a
>
</h2>
<div class="mb-4 text-sm">
(note that points are only ever given by Adam or moderators and don't
really mean anything 🤫)
</div>
<ol class="mx-8 list-decimal">
{
topPoints.map(({ name, numPoints }) => (
<li>
{name}: {numPoints}
</li>
))
}
</ol>
</body>
</html>
<HtmlLayout pageTitle={"Adam Learns top points"}>
<h2 class="text-xl">
Point totals in <a
class="text-fuchsia-200 underline"
href=" https: twitch.tv AdamLearnsLive">Adam's Twitch channel</a
>
</h2>
<div class="mb-4 text-sm">
(note that points are only ever given by Adam or moderators and don't really
mean anything 🤫)
</div>
<ol class="mx-8 list-decimal">
{
topPoints.map(({ name, numPoints }) => (
<li>
{name}: {numPoints}
</li>
))
}
</ol>
</HtmlLayout>
<style>
body {
background-color: rgb(0, 0, 57);
color: white;
margin: 1rem;
}
</style>

0 comments on commit 9afdd41

Please sign in to comment.