mommy/src/config/html.ts
A Cottrill 068d2e0bbe
All checks were successful
Node.js CI / Lint and Test (push) Successful in 46s
fix: update source link location (#2)
### Explanation

It's silly to have the link to be Codeberg when the code isn't actually there.

### Issue

1

### Attestations

- [x] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/)
- [x] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/).
- [x] 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

- [x] I have run the linter and resolved any errors.
- [x] My pull request uses an appropriate title, matching the conventional commit standards.
- [x] 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.
- [x] Code coverage remains at or above the configured threshold.

### Documentation

_No response_

### Versioning

Patch - My pull request introduces bug fixes ONLY.

Reviewed-on: #2
Co-authored-by: A Cottrill <a.rcottrill521@gmail.com>
Co-committed-by: A Cottrill <a.rcottrill521@gmail.com>
2025-03-19 21:22:29 -07:00

96 lines
2.8 KiB
TypeScript

/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
/**
* This is the HTML rendered for the landing page.
*/
export const html = `
<!DOCTYPE html>
<html>
<head>
<title>Mommy</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Mommy loves you~!" />
<script src="https://cdn.nhcarrigan.com/headers/index.js" async defer></script>
<script>
const getMommy = (e) => {
e.preventDefault();
const input = document.getElementById("name");
const params = new URLSearchParams();
if (input?.value) {
params.append("name", input.value);
}
fetch('/api?' + params.toString(), {
method: "GET",
}).then(res => res.text()).then(data => {
const result = document.getElementById("result");
if (!result) {
throw new Error("Cannot find result element!")
}
result.innerText = data;
});
}
</script>
<style>
input, button {
background-color: var(--foreground);
color: var(--background);
border: none;
font-family: "OpenDyslexic";
}
input {
border-radius: 10px;
padding: 5px;
display: block;
margin: 5px auto;
border: 2px solid #c69ff9;
}
button:not(#audio-theme-button) {
cursor: url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
border-radius: 10px;
padding: 5px;
display: block;
margin: 5px auto;
}
</style>
</head>
<body>
<main>
<h1>Mommy</h1>
<section>
<p id="result">Mommy loves you~!</p>
</section>
<form>
<label for="name">Tell mommy your name?</label>
<input id="name" type="text" placeholder="optional"/>
<button onclick="getMommy(event)" type="text">I need some love...</button>
</form>
<a href="https://mommy-bot.nhcarrigan.com" target="_blank" style="display: inline-block; background-color: var(--foreground); color: var(--background); padding: 10px 20px; text-decoration: none; border-radius: 4px; margin: 5px;">
<i class="fas fa-robot"></i> Get the App
</a>
<section>
<h2>Links</h2>
<p>
<a href="https://git.nhcarrigan.com/nhcarrigan/mommy">
<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>
</body>
</html>`;