Browse Source

[feature] show status edits on frontend (#3678)

* add 'edited-at' field to status info web template

* make the edited-at text italic

* small change in phrasing
pull/3679/head
kim 1 year ago committed by GitHub
parent
commit
3720251fca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      web/source/css/status.css
  2. 8
      web/template/status_info.tmpl

6
web/source/css/status.css

@ -436,6 +436,10 @@ main {
display: flex;
flex-wrap: wrap;
column-gap: 1rem;
.edited-at {
font-style: italic;
}
}
.stats-item {
@ -443,7 +447,7 @@ main {
gap: 0.4rem;
}
.stats-item:not(.published-at) {
.stats-item:not(.published-at):not(.edited-at) {
z-index: 1;
user-select: none;
}

8
web/template/status_info.tmpl

@ -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>

Loading…
Cancel
Save