the home site for me: also iteration 3 or 4 of my site

feat: add status widget to website

dunkirk.sh 40292eb6 923ec361

verified
Changed files
+52 -1
content
sass
css
templates
shortcodes
+2 -1
content/_index.md
···
+++
+++
-
<div style="display: flex; justify-content: center; margin: 2rem;">
+
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 2rem;">
<img src="/pfps/starry.webp" alt="kieran with a white and gray spotted kitten with a grainy background and star dust" width="512" height="512" class="u-photo"/>
+
{{ is() }}
</div>
# About me
+24
sass/css/mods.css
···
object-fit: cover;
}
+
.inlined-bubbles {
+
width: auto;
+
pointer-events: none;
+
display: block;
+
margin-top: 10px;
+
text-align: center;
+
}
+
+
.bubble {
+
padding: 0.7em 1.2em 0.7em 1.2em;
+
background: var(--accent);
+
border-bottom: 5px solid var(--bg-light);
+
border-radius: 7px 7px 10px 10px;
+
font-size: 1rem;
+
font-weight: bold;
+
color: var(--accent-text);
+
display: inline-block;
+
text-align: center;
+
}
+
+
.bubble a {
+
color: var(--accent-text);
+
}
+
:root {
--nightshade-violet: oklch(0.27 0.0242 287.67);
--purple-night: oklch(27.58% 0.0203 289.13);
+26
templates/shortcodes/is.md
···
+
<div class="bubble">
+
<span><a href="https://bsky.app/@doing.dunkirk.sh">Kieran is</a> <i id="status-text">"doing smthing interesting"</i></span>
+
</div>
+
+
<script>
+
document.addEventListener("DOMContentLoaded", () => {
+
fetch(
+
"https://bsky.social/xrpc/com.atproto.repo.listRecords?repo=dunkirk.sh&collection=a.status.update",
+
)
+
.then((response) => {
+
if (!response.ok) {
+
throw new Error("Network response was not ok");
+
}
+
return response.json();
+
})
+
.then((statusData) => {
+
if (statusData.records && statusData.records.length > 0) {
+
const latestStatus = `"${statusData.records[0].value.text}"`;
+
document.getElementById("status-text").textContent = latestStatus;
+
}
+
})
+
.catch((error) => {
+
console.error("Error fetching status update:", error);
+
});
+
});
+
</script>