generated from nhcarrigan/template
feat: show net-zero badge on health check (#7)
### Explanation _No response_ ### Issue _No response_ ### Attestations - [ ] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/) - [ ] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/). - [ ] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/). ### Dependencies - [ ] I have pinned the dependencies to a specific patch version. ### Style - [ ] I have run the linter and resolved any errors. - [ ] My pull request uses an appropriate title, matching the conventional commit standards. - [ ] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request. ### Tests - [ ] My contribution adds new code, and I have added tests to cover it. - [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes. - [ ] All new and existing tests pass locally with my changes. - [ ] Code coverage remains at or above the configured threshold. ### Documentation _No response_ ### Versioning _No response_ Reviewed-on: https://codeberg.org/nhcarrigan/mod-bot/pulls/7 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit is contained in:
parent
73c4f2c168
commit
80b355fee5
@ -45,7 +45,110 @@ export const serve = async (bot: ExtendedClient) => {
|
|||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
|
|
||||||
app.get("/", (_req, res) => {
|
app.get("/", (_req, res) => {
|
||||||
res.send("bot online!");
|
res.send(`
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Naomi's Mod Bot</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="description" content="A paid moderation bot for Discord." />
|
||||||
|
<script
|
||||||
|
src="https://kit.fontawesome.com/f949111719.js"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
></script>
|
||||||
|
<script src="https://widgets.tree-nation.com/js/widgets/v1/widgets.min.js?v=1.0"></script>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--foreground: #04624f;
|
||||||
|
--background: #abfcecdd;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
body::before {
|
||||||
|
background: url(https://cdn.nhcarrigan.com/background.png);
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
content: "";
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
color: var(--foreground);
|
||||||
|
background-color: var(--background);
|
||||||
|
font-family: "JetBrains Mono", monospace;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 10px;
|
||||||
|
width: 95%;
|
||||||
|
max-width: 1080px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
color: var(--foreground);
|
||||||
|
background-color: var(--background);
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: unset;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
<h1>Naomi's Mod Bot</h1>
|
||||||
|
<section>
|
||||||
|
<p>A paid moderation bot for Discord.</p>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Links</h2>
|
||||||
|
<p>
|
||||||
|
<a href="https://codeberg.org/nhcarrigan/mod-bot">
|
||||||
|
<i class="fa-solid fa-code"></i> Source Code
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<a href="https://docs.nhcarrigan.com">
|
||||||
|
<i class="fa-solid fa-book"></i> Documentation
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<a href="https://chat.nhcarrigan.com">
|
||||||
|
<i class="fa-solid fa-circle-info"></i> Support
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>© Naomi Carrigan</p>
|
||||||
|
<a href="https://chat.nhcarrigan.com" target="_blank" rel="noreferrer">
|
||||||
|
<i class="fa-solid fa-comments"></i>
|
||||||
|
</a>
|
||||||
|
<div className="h-4/5" id="tree-nation-offset-website"></div>
|
||||||
|
<script id="tree-nation">
|
||||||
|
TreeNationOffsetWebsite({
|
||||||
|
code: "a17464e0cd351220",
|
||||||
|
lang: "en",
|
||||||
|
theme: "dark",
|
||||||
|
}).render("#tree-nation-offset-website");
|
||||||
|
</script>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
`);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/metrics", async (_req, res) => {
|
app.get("/metrics", async (_req, res) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user