Leverage <time> element
Sample of using the `time` element instead of `abbr` for displaying timestamps. The `time` element can also represent durations. So the sample used here is suboptimal. Rather than the duration time lising the `lastBuildStartedAt` time in the `datetime` attribute, it ought to be a [valid `duration` value](https://www.w3.org/html/wg/drafts/html/master/infrastructure.html#valid-duration-string). However, I didn't see any existing helpers for formatting according to a machine-readable duration value.
This commit is contained in:
parent
3fef8fdd0e
commit
b481946000
|
@ -22,16 +22,16 @@
|
|||
<p>
|
||||
<span class="icon-clock"></span>
|
||||
<span class="label-align">Duration:
|
||||
<abbr class="duration" title={{repo.lastBuildStartedAt}}>
|
||||
<time class="duration" datetime={{repo.lastBuildStartedAt}} title={{repo.lastBuildStartedAt}}>
|
||||
{{format-duration repo.lastBuildDuration}}
|
||||
</abbr></span>
|
||||
</time></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="icon-calendar"></span>
|
||||
<span class="label-align">Finished:
|
||||
<abbr class="finished_at timeago" title={{repo.lastBuildFinishedAt}}>
|
||||
<time class="finished_at timeago" datetime={{repo.lastBuildFinishedAt}} title={{repo.lastBuildFinishedAt}}>
|
||||
{{format-time repo.lastBuildFinishedAt}}
|
||||
</abbr></span>
|
||||
</time></span>
|
||||
</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user