diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-02-25 23:15:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-25 23:15:04 -0500 |
| commit | 44f7f14736aaf77858ee71c80abeb3c13343d3c2 (patch) | |
| tree | 47dc895e50fa95b52a894bf0806e1a6c1edc8818 /web/src/pages | |
| parent | 9519602e73a53931be10438dcd990becea7989d9 (diff) | |
| parent | 5777f96394444dab18a81d6f085ac81df3e62008 (diff) | |
| download | AleeBot-44f7f14736aaf77858ee71c80abeb3c13343d3c2.tar.gz AleeBot-44f7f14736aaf77858ee71c80abeb3c13343d3c2.tar.bz2 AleeBot-44f7f14736aaf77858ee71c80abeb3c13343d3c2.zip | |
Merge pull request #36 from Alee14/beta
2.13 Release
Diffstat (limited to 'web/src/pages')
| -rw-r--r-- | web/src/pages/index.astro | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/web/src/pages/index.astro b/web/src/pages/index.astro new file mode 100644 index 0000000..f1dc6e7 --- /dev/null +++ b/web/src/pages/index.astro @@ -0,0 +1,45 @@ +--- +import Layout from '../layouts/Layout.astro'; +import { PendingQuotes } from '../components/Quotes'; + +--- + +<Layout> + <div class="container"> + <h1 id="version">AleeBot</h1> + <PendingQuotes client:load /> + </div> +</Layout> + +<style> + @import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100..900;1,100..900&display=swap'); + html, + body { + margin: 0; + width: 100%; + height: 100%; + font-family: "Exo 2", sans-serif; + } + + .container { + margin: 2em; + } + +</style> + +<script> + import { API_URL } from "astro:env/client" + document.addEventListener('DOMContentLoaded', async () => { + try { + const version = await fetch(`${API_URL}/api/version`).then((res) => res.json()); + const versionElement = document.getElementById('version'); + if (versionElement) { + versionElement.textContent = `AleeBot ${version}`; + } else { + console.error('Element with ID "version" not found.'); + } + } catch (e) { + console.error('Failed to fetch version:', e); + } + }); +</script> |
