tangled
alpha
login
or
join now
dunkirk.sh
/
zera
5
fork
atom
the home site for me: also iteration 3 or 4 of my site
5
fork
atom
overview
issues
pulls
pipelines
feat: break the time into a new line if too long
dunkirk.sh
2 months ago
c3e56e41
ce87534c
verified
This commit was signed with the committer's
known signature
.
dunkirk.sh
SSH Key Fingerprint:
SHA256:DqcG0RXYExE26KiWo3VxJnsxswN1QNfTBvB+bdSpk80=
+27
-1
2 changed files
expand all
collapse all
unified
split
sass
css
mods.css
templates
shortcodes
is.md
+15
sass/css/mods.css
···
345
345
text-decoration: none;
346
346
}
347
347
348
348
+
.bubble > span {
349
349
+
display: flex;
350
350
+
flex-wrap: wrap;
351
351
+
justify-content: center;
352
352
+
gap: 0 0.3em;
353
353
+
}
354
354
+
355
355
+
#time-ago-wrap {
356
356
+
white-space: nowrap;
357
357
+
}
358
358
+
359
359
+
#time-ago-wrap.wrapped .time-dash {
360
360
+
display: none;
361
361
+
}
362
362
+
348
363
#time-ago {
349
364
font-weight: normal;
350
365
font-size: 0.8rem;
+12
-1
templates/shortcodes/is.md
···
1
1
<div class="bubble" style="visibility: hidden; opacity: 0;">
2
2
-
<span><a href="https://bsky.app/@doing.dunkirk.sh" id="verb-link">Kieran is</a> <i id="status-text"></i> - <time id="time-ago" datetime="" data-max-age="43200"></time></span>
2
2
+
<span><a href="https://bsky.app/@doing.dunkirk.sh" id="verb-link">Kieran is</a> <i id="status-text"></i><span id="time-ago-wrap"><span class="time-dash"> - </span><time id="time-ago" datetime="" data-max-age="43200"></time></span></span>
3
3
</div>
4
4
5
5
<script>
···
49
49
bubble.style.transform = "none";
50
50
bubble.style.opacity = "1";
51
51
}
52
52
+
checkTimeWrap();
52
53
}
53
54
}
54
55
})
···
56
57
console.error("Error fetching status update:", error);
57
58
});
58
59
}
60
60
+
function checkTimeWrap() {
61
61
+
const wrap = document.getElementById("time-ago-wrap");
62
62
+
const statusText = document.getElementById("status-text");
63
63
+
if (wrap && statusText) {
64
64
+
const wrapTop = wrap.getBoundingClientRect().top;
65
65
+
const statusTop = statusText.getBoundingClientRect().top;
66
66
+
wrap.classList.toggle("wrapped", wrapTop > statusTop);
67
67
+
}
68
68
+
}
59
69
document.addEventListener("DOMContentLoaded", fetchStatus);
70
70
+
window.addEventListener("resize", checkTimeWrap);
60
71
setInterval(fetchStatus, 3600000);
61
72
</script>