Skip to content

Commit

Permalink
[feature] show status edits on frontend (#3678)
Browse files Browse the repository at this point in the history
* add 'edited-at' field to status info web template

* make the edited-at text italic

* small change in phrasing
  • Loading branch information
NyaaaWhatsUpDoc authored Jan 24, 2025
1 parent 5b765d7 commit 3720251
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/source/css/status.css
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,18 @@ main {
display: flex;
flex-wrap: wrap;
column-gap: 1rem;

.edited-at {
font-style: italic;
}
}

.stats-item {
display: flex;
gap: 0.4rem;
}

.stats-item:not(.published-at) {
.stats-item:not(.published-at):not(.edited-at) {
z-index: 1;
user-select: none;
}
Expand Down
8 changes: 8 additions & 0 deletions web/template/status_info.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
<time datetime="{{- .CreatedAt -}}">{{- .CreatedAt | timestampPrecise -}}</time>
</dd>
</div>
{{- if .EditedAt -}}
<div class="stats-item edited-at text-cutoff">
<dt class="sr-only">Edited</dt>
<dd>
(last edited <time datetime="{{- .EditedAt -}}">{{- .EditedAt | timestampPrecise -}}</time>)
</dd>
</div>
{{ end }}
<div class="stats-grouping">
<div class="stats-item" title="Replies">
<dt>
Expand Down

0 comments on commit 3720251

Please sign in to comment.