mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Use nonbreaking spaces in word count
Word count value and unit should not be broken apart from each other.
This commit is contained in:
parent
db2410ed32
commit
e430cedff2
1 changed files with 2 additions and 2 deletions
|
@ -12,8 +12,8 @@ About
|
|||
{{- if gt . 60 -}}
|
||||
{{- $hours := div . 60 -}}
|
||||
{{- $minutes := mod . 60 -}}
|
||||
{{- $displayTime = (printf "%d hour and %d" $hours $minutes) -}}
|
||||
{{- $displayTime = (printf "%d hour and %d" $hours $minutes) | safeHTML -}}
|
||||
{{- end -}}
|
||||
; a{{ if lt . 10 }} short{{ else if and (gt . 20) (lt . 30) }} somewhat long{{ else if and (gt . 29) (lt . 60) }} long{{ else if gt . 59 }} very long{{ end }}
|
||||
<time itemprop="timeRequired" datetime="PT{{ . }}M">{{ $displayTime }} minute</time> read
|
||||
<time itemprop="timeRequired" datetime="PT{{ . }}M">{{ $displayTime }} minute</time> read
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue