forked from tangled.org/core
this repo has no description

appview/pages: use consistent time component

Creates a new template fragment, repo/fragments/time, that is a component based on the <time> HTML element. The <time> element is already used for most datetimes, but inconsistently; some define `title` attributes and/or `datetime` attributes, most don't. The goal here is to standardize with a single component so every date has a consistent interaction. The datetime is ISO 8601 formatted as per the spec, the `title` (shown on hover) is a modified long format similar to GitHub's, and the content is a relative format %s ago (`timeFmt` - two `shortTimeFmt` variants also exist to preserve existing behavior).

uncenter.dev 21c3a580 83937565

verified
+4 -1
appview/pages/funcmap.go
··· 107 }, 108 "timeFmt": humanize.Time, 109 "longTimeFmt": func(t time.Time) string { 110 - return t.Format("2006-01-02 * 3:04 PM") 111 }, 112 "commaFmt": humanize.Comma, 113 "shortTimeFmt": func(t time.Time) string {
··· 107 }, 108 "timeFmt": humanize.Time, 109 "longTimeFmt": func(t time.Time) string { 110 + return t.Format("Jan 2, 2006, 3:04 PM MST") 111 + }, 112 + "iso8601Fmt": func(t time.Time) string { 113 + return t.Format("2006-01-02T15:04:05-07:00") 114 }, 115 "commaFmt": humanize.Comma, 116 "shortTimeFmt": func(t time.Time) string {
+2 -2
appview/pages/templates/knot.html
··· 26 </dd> 27 28 <dt class="font-bold">opened</dt> 29 - <dd>{{ .Registration.Created | timeFmt }}</dd> 30 31 {{ if .Registration.Registered }} 32 <dt class="font-bold">registered</dt> 33 - <dd>{{ .Registration.Registered | timeFmt }}</dd> 34 {{ else }} 35 <dt class="font-bold">status</dt> 36 <dd class="text-yellow-800 dark:text-yellow-200 bg-yellow-100 dark:bg-yellow-900 rounded px-2 py-1 inline-block">
··· 26 </dd> 27 28 <dt class="font-bold">opened</dt> 29 + <dd>{{ template "repo/fragments/time" .Registration.Created }}</dd> 30 31 {{ if .Registration.Registered }} 32 <dt class="font-bold">registered</dt> 33 + <dd>{{ template "repo/fragments/time" .Registration.Registered }}</dd> 34 {{ else }} 35 <dt class="font-bold">status</dt> 36 <dd class="text-yellow-800 dark:text-yellow-200 bg-yellow-100 dark:bg-yellow-900 rounded px-2 py-1 inline-block">
+2 -2
appview/pages/templates/knots.html
··· 44 </a> 45 </div> 46 <p class="text-sm text-gray-500 dark:text-gray-400">owned by {{ .ByDid }}</p> 47 - <p class="text-sm text-gray-500 dark:text-gray-400">registered {{ .Registered | timeFmt }}</p> 48 </div> 49 </div> 50 {{ end }} ··· 70 </div> 71 </div> 72 <p class="text-sm text-gray-500 dark:text-gray-400">opened by {{ .ByDid }}</p> 73 - <p class="text-sm text-gray-500 dark:text-gray-400">created {{ .Created | timeFmt }}</p> 74 </div> 75 <div class="flex gap-2 items-center"> 76 <button
··· 44 </a> 45 </div> 46 <p class="text-sm text-gray-500 dark:text-gray-400">owned by {{ .ByDid }}</p> 47 + <p class="text-sm text-gray-500 dark:text-gray-400">registered {{ template "repo/fragments/time" .Registered }}</p> 48 </div> 49 </div> 50 {{ end }} ··· 70 </div> 71 </div> 72 <p class="text-sm text-gray-500 dark:text-gray-400">opened by {{ .ByDid }}</p> 73 + <p class="text-sm text-gray-500 dark:text-gray-400">created {{ template "repo/fragments/time" .Created }}</p> 74 </div> 75 <div class="flex gap-2 items-center"> 76 <button
+2 -2
appview/pages/templates/repo/branches.html
··· 59 </td> 60 <td class="py-3 whitespace-nowrap text-gray-500 dark:text-gray-400"> 61 {{ if .Commit }} 62 - {{ .Commit.Committer.When | timeFmt }} 63 {{ end }} 64 </td> 65 </tr> ··· 98 </a> 99 </span> 100 <div class="inline-block px-1 select-none after:content-['·']"></div> 101 - <span>{{ .Commit.Committer.When | timeFmt }}</span> 102 </div> 103 {{ end }} 104 </div>
··· 59 </td> 60 <td class="py-3 whitespace-nowrap text-gray-500 dark:text-gray-400"> 61 {{ if .Commit }} 62 + {{ template "repo/fragments/time" .Commit.Committer.When }} 63 {{ end }} 64 </td> 65 </tr> ··· 98 </a> 99 </span> 100 <div class="inline-block px-1 select-none after:content-['·']"></div> 101 + {{ template "repo/fragments/time" .Commit.Committer.When }} 102 </div> 103 {{ end }} 104 </div>
+1 -1
appview/pages/templates/repo/commit.html
··· 34 <a href="mailto:{{ $commit.Author.Email }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $commit.Author.Name }}</a> 35 {{ end }} 36 <span class="px-1 select-none before:content-['\00B7']"></span> 37 - {{ timeFmt $commit.Author.When }} 38 <span class="px-1 select-none before:content-['\00B7']"></span> 39 </p> 40
··· 34 <a href="mailto:{{ $commit.Author.Email }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $commit.Author.Name }}</a> 35 {{ end }} 36 <span class="px-1 select-none before:content-['\00B7']"></span> 37 + {{ template "repo/fragments/time" $commit.Author.When }} 38 <span class="px-1 select-none before:content-['\00B7']"></span> 39 </p> 40
+1 -1
appview/pages/templates/repo/compare/new.html
··· 19 <a href="/{{ $.RepoInfo.FullName }}/compare?head={{ $br.Name | urlquery }}" class="no-underline hover:no-underline"> 20 <div class="flex items-center justify-between p-2"> 21 {{ $br.Name }} 22 - <time class="text-gray-500 dark:text-gray-400">{{ timeFmt $br.Commit.Committer.When }}</time> 23 </div> 24 </a> 25 {{ end }}
··· 19 <a href="/{{ $.RepoInfo.FullName }}/compare?head={{ $br.Name | urlquery }}" class="no-underline hover:no-underline"> 20 <div class="flex items-center justify-between p-2"> 21 {{ $br.Name }} 22 + <span class="text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" $br.Commit.Committer.When }}</span> 23 </div> 24 </a> 25 {{ end }}
+1 -1
appview/pages/templates/repo/empty.html
··· 17 <a href="/{{ $.RepoInfo.FullName }}/tree/{{$br.Name | urlquery }}" class="no-underline hover:no-underline"> 18 <div class="flex items-center justify-between p-2"> 19 {{ $br.Name }} 20 - <time class="text-gray-500 dark:text-gray-400">{{ timeFmt $br.Commit.Committer.When }}</time> 21 </div> 22 </a> 23 {{ end }}
··· 17 <a href="/{{ $.RepoInfo.FullName }}/tree/{{$br.Name | urlquery }}" class="no-underline hover:no-underline"> 18 <div class="flex items-center justify-between p-2"> 19 {{ $br.Name }} 20 + <span class="text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" $br.Commit.Committer.When }}</span> 21 </div> 22 </a> 23 {{ end }}
+2 -2
appview/pages/templates/repo/fragments/artifact.html
··· 10 </div> 11 12 <div id="right-side" class="text-gray-500 dark:text-gray-400 flex items-center flex-shrink-0 gap-2 text-sm"> 13 - <span title="{{ longTimeFmt .Artifact.CreatedAt }}" class="hidden md:inline">{{ timeFmt .Artifact.CreatedAt }}</span> 14 - <span title="{{ longTimeFmt .Artifact.CreatedAt }}" class=" md:hidden">{{ shortTimeFmt .Artifact.CreatedAt }}</span> 15 16 <span class="select-none after:content-['·'] hidden md:inline"></span> 17 <span class="truncate max-w-[100px] hidden md:inline">{{ .Artifact.MimeType }}</span>
··· 10 </div> 11 12 <div id="right-side" class="text-gray-500 dark:text-gray-400 flex items-center flex-shrink-0 gap-2 text-sm"> 13 + <span class="hidden md:inline">{{ template "repo/fragments/time" .Artifact.CreatedAt }}</span> 14 + <span class=" md:hidden">{{ template "repo/fragments/shortTime" .Artifact.CreatedAt }}</span> 15 16 <span class="select-none after:content-['·'] hidden md:inline"></span> 17 <span class="truncate max-w-[100px] hidden md:inline">{{ .Artifact.MimeType }}</span>
+15
appview/pages/templates/repo/fragments/time.html
···
··· 1 + {{ define "repo/fragments/timeWrapper" }} 2 + <time datetime="{{ .Time | iso8601Fmt }}" title="{{ .Time | longTimeFmt }}">{{ .Content }}</time> 3 + {{ end }} 4 + 5 + {{ define "repo/fragments/time" }} 6 + {{ template "repo/fragments/timeWrapper" (dict "Time" . "Content" (. | timeFmt)) }} 7 + {{ end }} 8 + 9 + {{ define "repo/fragments/shortTime" }} 10 + {{ template "repo/fragments/timeWrapper" (dict "Time" . "Content" (. | shortTimeFmt)) }} 11 + {{ end }} 12 + 13 + {{ define "repo/fragments/shortTimeAgo" }} 14 + {{ template "repo/fragments/timeWrapper" (dict "Time" . "Content" (print (. | shortTimeFmt) " ago")) }} 15 + {{ end }}
+5 -9
appview/pages/templates/repo/index.html
··· 149 </a> 150 151 {{ if .LastCommit }} 152 - <time class="text-xs text-gray-500 dark:text-gray-400" 153 - >{{ timeFmt .LastCommit.When }}</time 154 - > 155 {{ end }} 156 </div> 157 </div> ··· 172 </a> 173 174 {{ if .LastCommit }} 175 - <time class="text-xs text-gray-500 dark:text-gray-400" 176 - >{{ timeFmt .LastCommit.When }}</time 177 - > 178 {{ end }} 179 </div> 180 </div> ··· 273 > 274 </span> 275 <div class="inline-block px-1 select-none after:content-['·']"></div> 276 - <span>{{ timeFmt .Committer.When }}</span> 277 278 <!-- tags/branches --> 279 {{ $tagsForCommit := index $.TagMap .Hash.String }} ··· 320 </a> 321 {{ if .Commit }} 322 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span> 323 - <time class="text-xs text-gray-500 dark:text-gray-400">{{ timeFmt .Commit.Committer.When }}</time> 324 {{ end }} 325 {{ if .IsDefault }} 326 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span> ··· 366 </div> 367 <div> 368 {{ with .Tag }} 369 - <time class="text-xs text-gray-500 dark:text-gray-400">{{ timeFmt .Tagger.When }}</time> 370 {{ end }} 371 {{ if eq $idx 0 }} 372 {{ with .Tag }}<span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span>{{ end }}
··· 149 </a> 150 151 {{ if .LastCommit }} 152 + <span class="text-xs text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" .LastCommit.When }}</span> 153 {{ end }} 154 </div> 155 </div> ··· 170 </a> 171 172 {{ if .LastCommit }} 173 + <span class="text-xs text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" .LastCommit.When }}</span> 174 {{ end }} 175 </div> 176 </div> ··· 269 > 270 </span> 271 <div class="inline-block px-1 select-none after:content-['·']"></div> 272 + {{ template "repo/fragments/time" .Committer.When }} 273 274 <!-- tags/branches --> 275 {{ $tagsForCommit := index $.TagMap .Hash.String }} ··· 316 </a> 317 {{ if .Commit }} 318 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span> 319 + <span class="text-xs text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" .Commit.Committer.When }}</span> 320 {{ end }} 321 {{ if .IsDefault }} 322 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span> ··· 362 </div> 363 <div> 364 {{ with .Tag }} 365 + <span class="text-xs text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" .Tagger.When }}</span> 366 {{ end }} 367 {{ if eq $idx 0 }} 368 {{ with .Tag }}<span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span>{{ end }}
+1 -1
appview/pages/templates/repo/issues/fragments/editIssueComment.html
··· 19 href="#{{ .CommentId }}" 20 class="text-gray-500 hover:text-gray-500 hover:underline no-underline" 21 id="{{ .CommentId }}"> 22 - {{ .Created | timeFmt }} 23 </a> 24 25 <button
··· 19 href="#{{ .CommentId }}" 20 class="text-gray-500 hover:text-gray-500 hover:underline no-underline" 21 id="{{ .CommentId }}"> 22 + {{ template "repo/fragments/time" .Created }} 23 </a> 24 25 <button
+3 -3
appview/pages/templates/repo/issues/fragments/issueComment.html
··· 11 class="text-gray-500 dark:text-gray-400 hover:text-gray-500 dark:hover:text-gray-400 hover:underline no-underline" 12 id="{{ .CommentId }}"> 13 {{ if .Deleted }} 14 - deleted {{ .Deleted | timeFmt }} 15 {{ else if .Edited }} 16 - edited {{ .Edited | timeFmt }} 17 {{ else }} 18 - {{ .Created | timeFmt }} 19 {{ end }} 20 </a> 21
··· 11 class="text-gray-500 dark:text-gray-400 hover:text-gray-500 dark:hover:text-gray-400 hover:underline no-underline" 12 id="{{ .CommentId }}"> 13 {{ if .Deleted }} 14 + deleted {{ template "repo/fragments/time" .Deleted }} 15 {{ else if .Edited }} 16 + edited {{ template "repo/fragments/time" .Edited }} 17 {{ else }} 18 + {{ template "repo/fragments/time" .Created }} 19 {{ end }} 20 </a> 21
+1 -3
appview/pages/templates/repo/issues/issue.html
··· 35 {{ $owner := didOrHandle .Issue.OwnerDid .IssueOwnerHandle }} 36 {{ template "user/fragments/picHandleLink" $owner }} 37 <span class="select-none before:content-['\00B7']"></span> 38 - <time title="{{ .Issue.Created | longTimeFmt }}"> 39 - {{ .Issue.Created | timeFmt }} 40 - </time> 41 </span> 42 </div> 43
··· 35 {{ $owner := didOrHandle .Issue.OwnerDid .IssueOwnerHandle }} 36 {{ template "user/fragments/picHandleLink" $owner }} 37 <span class="select-none before:content-['\00B7']"></span> 38 + {{ template "repo/fragments/time" .Issue.Created }} 39 </span> 40 </div> 41
+1 -3
appview/pages/templates/repo/issues/issues.html
··· 70 </span> 71 72 <span class="before:content-['·']"> 73 - <time> 74 - {{ .Created | timeFmt }} 75 - </time> 76 </span> 77 78 <span class="before:content-['·']">
··· 70 </span> 71 72 <span class="before:content-['·']"> 73 + {{ template "repo/fragments/time" .Created }} 74 </span> 75 76 <span class="before:content-['·']">
+2 -2
appview/pages/templates/repo/log.html
··· 87 {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $pipeline "RepoInfo" $.RepoInfo) }} 88 {{ end }} 89 </td> 90 - <td class=" py-3 align-top text-gray-500 dark:text-gray-400">{{ timeFmt $commit.Committer.When }}</td> 91 </tr> 92 {{ end }} 93 </tbody> ··· 163 </a> 164 </span> 165 <div class="inline-block px-1 select-none after:content-['·']"></div> 166 - <span>{{ shortTimeFmt $commit.Committer.When }}</span> 167 168 <!-- ci status --> 169 {{ $pipeline := index $.Pipelines .Hash.String }}
··· 87 {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $pipeline "RepoInfo" $.RepoInfo) }} 88 {{ end }} 89 </td> 90 + <td class=" py-3 align-top text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" $commit.Committer.When }}</td> 91 </tr> 92 {{ end }} 93 </tbody> ··· 163 </a> 164 </span> 165 <div class="inline-block px-1 select-none after:content-['·']"></div> 166 + <span>{{ template "repo/fragments/shortTime" $commit.Committer.When }}</span> 167 168 <!-- ci status --> 169 {{ $pipeline := index $.Pipelines .Hash.String }}
+1 -3
appview/pages/templates/repo/pipelines/pipelines.html
··· 74 </div> 75 76 <div class="text-sm md:text-base col-span-1 text-right"> 77 - <time title="{{ .Created | longTimeFmt }}"> 78 - {{ .Created | shortTimeFmt }} ago 79 - </time> 80 </div> 81 82 {{ $t := .TimeTaken }}
··· 74 </div> 75 76 <div class="text-sm md:text-base col-span-1 text-right"> 77 + {{ template "repo/fragments/shortTimeAgo" .Created }} 78 </div> 79 80 {{ $t := .TimeTaken }}
+1 -1
appview/pages/templates/repo/pulls/fragments/pullHeader.html
··· 31 {{ $owner := index $.DidHandleMap .Pull.OwnerDid }} 32 {{ template "user/fragments/picHandleLink" $owner }} 33 <span class="select-none before:content-['\00B7']"></span> 34 - <time>{{ .Pull.Created | timeFmt }}</time> 35 36 <span class="select-none before:content-['\00B7']"></span> 37 <span>
··· 31 {{ $owner := index $.DidHandleMap .Pull.OwnerDid }} 32 {{ template "user/fragments/picHandleLink" $owner }} 33 <span class="select-none before:content-['\00B7']"></span> 34 + {{ template "repo/fragments/time" .Pull.Created }} 35 36 <span class="select-none before:content-['\00B7']"></span> 37 <span>
+2 -2
appview/pages/templates/repo/pulls/pull.html
··· 55 <span class="hidden md:inline">{{$re}}submitted</span> 56 by {{ template "user/fragments/picHandleLink" $owner }} 57 <span class="select-none before:content-['\00B7']"></span> 58 - <a class="text-gray-500 dark:text-gray-400 hover:text-gray-500" href="#round-#{{ .RoundNumber }}"><time>{{ .Created | shortTimeFmt }}</time></a> 59 <span class="select-none before:content-['·']"></span> 60 {{ $s := "s" }} 61 {{ if eq (len .Comments) 1 }} ··· 154 {{ $owner := index $.DidHandleMap $c.OwnerDid }} 155 {{ template "user/fragments/picHandleLink" $owner }} 156 <span class="before:content-['·']"></span> 157 - <a class="text-gray-500 dark:text-gray-400 hover:text-gray-500 dark:hover:text-gray-300" href="#comment-{{.ID}}"><time>{{ $c.Created | shortTimeFmt }}</time></a> 158 </div> 159 <div class="prose dark:prose-invert"> 160 {{ $c.Body | markdown }}
··· 55 <span class="hidden md:inline">{{$re}}submitted</span> 56 by {{ template "user/fragments/picHandleLink" $owner }} 57 <span class="select-none before:content-['\00B7']"></span> 58 + <a class="text-gray-500 dark:text-gray-400 hover:text-gray-500" href="#round-#{{ .RoundNumber }}">{{ template "repo/fragments/shortTime" .Created }}</a> 59 <span class="select-none before:content-['·']"></span> 60 {{ $s := "s" }} 61 {{ if eq (len .Comments) 1 }} ··· 154 {{ $owner := index $.DidHandleMap $c.OwnerDid }} 155 {{ template "user/fragments/picHandleLink" $owner }} 156 <span class="before:content-['·']"></span> 157 + <a class="text-gray-500 dark:text-gray-400 hover:text-gray-500 dark:hover:text-gray-300" href="#comment-{{.ID}}">{{ template "repo/fragments/time" $c.Created }}</a> 158 </div> 159 <div class="prose dark:prose-invert"> 160 {{ $c.Body | markdown }}
+2 -4
appview/pages/templates/repo/pulls/pulls.html
··· 79 {{ template "user/fragments/picHandleLink" $owner }} 80 </span> 81 82 - <span> 83 - <time> 84 - {{ .Created | timeFmt }} 85 - </time> 86 </span> 87 88 <span class="before:content-['·']">
··· 79 {{ template "user/fragments/picHandleLink" $owner }} 80 </span> 81 82 + <span class="before:content-['·']"> 83 + {{ template "repo/fragments/time" .Created }} 84 </span> 85 86 <span class="before:content-['·']">
+2 -2
appview/pages/templates/repo/tags.html
··· 35 <span>{{ .Tag.Tagger.Name }}</span> 36 37 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span> 38 - <time>{{ shortTimeFmt .Tag.Tagger.When }}</time> 39 {{ end }} 40 </div> 41 </div> ··· 54 {{ slice .Tag.Target.String 0 8 }} 55 </a> 56 <span>{{ .Tag.Tagger.Name }}</span> 57 - <time>{{ timeFmt .Tag.Tagger.When }}</time> 58 {{ end }} 59 </div> 60 </div>
··· 35 <span>{{ .Tag.Tagger.Name }}</span> 36 37 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span> 38 + {{ template "repo/fragments/shortTime" .Tag.Tagger.When }} 39 {{ end }} 40 </div> 41 </div> ··· 54 {{ slice .Tag.Target.String 0 8 }} 55 </a> 56 <span>{{ .Tag.Tagger.Name }}</span> 57 + {{ template "repo/fragments/time" .Tag.Tagger.When }} 58 {{ end }} 59 </div> 60 </div>
+2 -2
appview/pages/templates/repo/tree.html
··· 65 {{ if .LastCommit}} 66 <div class="flex items-end gap-2"> 67 <span class="text text-gray-500 dark:text-gray-400 mr-6">{{ .LastCommit.Message }}</span> 68 - <time class="text-xs text-gray-500 dark:text-gray-400">{{ timeFmt .LastCommit.When }}</time> 69 </div> 70 {{ end }} 71 </div> ··· 85 {{ if .LastCommit}} 86 <div class="flex items-end gap-2"> 87 <span class="text text-gray-500 dark:text-gray-400 mr-6">{{ .LastCommit.Message }}</span> 88 - <time class="text-xs text-gray-500 dark:text-gray-400">{{ timeFmt .LastCommit.When }}</time> 89 </div> 90 {{ end }} 91 </div>
··· 65 {{ if .LastCommit}} 66 <div class="flex items-end gap-2"> 67 <span class="text text-gray-500 dark:text-gray-400 mr-6">{{ .LastCommit.Message }}</span> 68 + <span class="text-xs text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" .LastCommit.When }}</span> 69 </div> 70 {{ end }} 71 </div> ··· 85 {{ if .LastCommit}} 86 <div class="flex items-end gap-2"> 87 <span class="text text-gray-500 dark:text-gray-400 mr-6">{{ .LastCommit.Message }}</span> 88 + <span class="text-xs text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" .LastCommit.When }}</span> 89 </div> 90 {{ end }} 91 </div>
+2 -2
appview/pages/templates/settings.html
··· 39 {{ i "key" "w-3 h-3 dark:text-gray-300" }} 40 <p class="font-bold dark:text-white">{{ .Name }}</p> 41 </div> 42 - <p class="text-sm text-gray-500 dark:text-gray-400">added {{ .Created | timeFmt }}</p> 43 <div class="overflow-x-auto whitespace-nowrap flex-1 max-w-full"> 44 <code class="text-sm text-gray-500 dark:text-gray-400">{{ .Key }}</code> 45 </div> ··· 112 {{ end }} 113 </div> 114 </div> 115 - <p class="text-sm text-gray-500 dark:text-gray-400">added {{ .CreatedAt | timeFmt }}</p> 116 </div> 117 <div class="flex gap-2 items-center"> 118 {{ if not .Verified }}
··· 39 {{ i "key" "w-3 h-3 dark:text-gray-300" }} 40 <p class="font-bold dark:text-white">{{ .Name }}</p> 41 </div> 42 + <p class="text-sm text-gray-500 dark:text-gray-400">added {{ template "repo/fragments/time" .Created }}</p> 43 <div class="overflow-x-auto whitespace-nowrap flex-1 max-w-full"> 44 <code class="text-sm text-gray-500 dark:text-gray-400">{{ .Key }}</code> 45 </div> ··· 112 {{ end }} 113 </div> 114 </div> 115 + <p class="text-sm text-gray-500 dark:text-gray-400">added {{ template "repo/fragments/time" .CreatedAt }}</p> 116 </div> 117 <div class="flex gap-2 items-center"> 118 {{ if not .Verified }}
+2 -2
appview/pages/templates/spindles/fragments/spindleListing.html
··· 11 {{ i "hard-drive" "w-4 h-4" }} 12 {{ .Instance }} 13 <span class="text-gray-500"> 14 - {{ .Created | shortTimeFmt }} ago 15 </span> 16 </a> 17 {{ else }} ··· 19 {{ i "hard-drive" "w-4 h-4" }} 20 {{ .Instance }} 21 <span class="text-gray-500"> 22 - {{ .Created | shortTimeFmt }} ago 23 </span> 24 </div> 25 {{ end }}
··· 11 {{ i "hard-drive" "w-4 h-4" }} 12 {{ .Instance }} 13 <span class="text-gray-500"> 14 + {{ template "repo/fragments/shortTimeAgo" .Created }} 15 </span> 16 </a> 17 {{ else }} ··· 19 {{ i "hard-drive" "w-4 h-4" }} 20 {{ .Instance }} 21 <span class="text-gray-500"> 22 + {{ template "repo/fragments/shortTimeAgo" .Created }} 23 </span> 24 </div> 25 {{ end }}
+6 -6
appview/pages/templates/timeline.html
··· 84 >{{ .Repo.Name }}</a 85 > 86 {{ end }} 87 - <time 88 class="text-gray-700 dark:text-gray-400 text-xs" 89 - >{{ .Repo.Created | timeFmt }}</time 90 > 91 </p> 92 </div> ··· 98 {{ template "user/fragments/picHandleLink" $userHandle }} 99 followed 100 {{ template "user/fragments/picHandleLink" $subjectHandle }} 101 - <time 102 class="text-gray-700 dark:text-gray-400 text-xs" 103 - >{{ .Follow.FollowedAt | timeFmt }}</time 104 > 105 </p> 106 </div> ··· 116 class="no-underline hover:underline" 117 >{{ $repoOwnerHandle | truncateAt30 }}/{{ .Star.Repo.Name }}</a 118 > 119 - <time 120 class="text-gray-700 dark:text-gray-400 text-xs" 121 - >{{ .Star.Created | timeFmt }}</time 122 > 123 </p> 124 </div>
··· 84 >{{ .Repo.Name }}</a 85 > 86 {{ end }} 87 + <span 88 class="text-gray-700 dark:text-gray-400 text-xs" 89 + >{{ template "repo/fragments/time" .Repo.Created }}</span 90 > 91 </p> 92 </div> ··· 98 {{ template "user/fragments/picHandleLink" $userHandle }} 99 followed 100 {{ template "user/fragments/picHandleLink" $subjectHandle }} 101 + <span 102 class="text-gray-700 dark:text-gray-400 text-xs" 103 + >{{ template "repo/fragments/time" .Follow.FollowedAt }}</span 104 > 105 </p> 106 </div> ··· 116 class="no-underline hover:underline" 117 >{{ $repoOwnerHandle | truncateAt30 }}/{{ .Star.Repo.Name }}</a 118 > 119 + <span 120 class="text-gray-700 dark:text-gray-400 text-xs" 121 + >{{ template "repo/fragments/time" .Star.Created }}</spa 122 > 123 </p> 124 </div>