[chore] little frontend tweaks

This commit is contained in:
tobi 2025-03-02 10:27:39 +01:00
commit 410fbf3dc6
4 changed files with 18 additions and 22 deletions

View file

@ -182,9 +182,7 @@ Array.from(document.getElementsByClassName("plyr-video")).forEach((video) => {
video._plyrContainer = player.elements.container;
});
document.addEventListener('DOMContentLoaded', () => {
const timeTags = document.getElementsByTagName('time');
Array.from(timeTags).forEach(timeTag => {
Array.from(document.getElementsByTagName('time')).forEach(timeTag => {
const datetime = timeTag.getAttribute('datetime');
const currentText = timeTag.textContent.trim();
// Only format if current text contains precise time
@ -199,5 +197,4 @@ document.addEventListener('DOMContentLoaded', () => {
hour12: false
});
}
});
});

View file

@ -180,7 +180,7 @@
{{- end }}
{{- end }}
</dl>
<a class="u-url u-uid" rel="me" href="/@{{- .account.Username -}}" class="hidden"></a>
<a class="u-url u-uid hidden" rel="me" href="/@{{- .account.Username -}}"></a>
</div>
</section>
<div class="column-split">

View file

@ -52,5 +52,4 @@
id="{{- .ID -}}{{- if .Pinned -}}-pinned{{- end -}}"
role="region"
aria-label="{{- template "ariaLabel" . -}}"
class="status expanded h-entry"
{{- end }}

View file

@ -23,14 +23,14 @@
<div class="stats-item published-at text-cutoff">
<dt class="sr-only">Published</dt>
<dd>
<time class="dt-published" datetime="{{- .CreatedAt -}}">{{- .CreatedAt -}}</time>
<time class="dt-published" datetime="{{- .CreatedAt -}}">{{- .CreatedAt | timestampPrecise -}}</time>
</dd>
</div>
{{- if .EditedAt -}}
<div class="stats-item edited-at text-cutoff">
<dt class="sr-only">Edited</dt>
<dd>
(edited <time class="dt-updated" datetime="{{- .EditedAt -}}">{{- .EditedAt -}}</time>)
(edited <time class="dt-updated" datetime="{{- .EditedAt -}}">{{- .EditedAt | timestampPrecise -}}</time>)
</dd>
</div>
{{ end }}