forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

appview/pages: unify issue comment styles

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 3cfae495 7db59ccc

verified
Changed files
+9 -12
appview
pages
templates
+2 -4
appview/pages/templates/repo/issues/fragments/editIssueComment.html
··· 1 {{ define "repo/issues/fragments/editIssueComment" }} 2 {{ with .Comment }} 3 <div id="comment-container-{{.CommentId}}"> 4 - <div class="flex items-center gap-2 mb-2 text-gray-500 text-sm"> 5 {{ $owner := didOrHandle $.LoggedInUser.Did $.LoggedInUser.Handle }} 6 <a href="/{{ $owner }}" class="no-underline hover:underline">{{ $owner }}</a> 7 ··· 9 {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} 10 {{ if $isIssueAuthor }} 11 <span class="before:content-['·']"></span> 12 - <span class="rounded bg-gray-100 text-black font-mono px-2 mx-1/2 inline-flex items-center"> 13 author 14 - </span> 15 {{ end }} 16 17 <span class="before:content-['·']"></span> 18 <a 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>
··· 1 {{ define "repo/issues/fragments/editIssueComment" }} 2 {{ with .Comment }} 3 <div id="comment-container-{{.CommentId}}"> 4 + <div class="flex items-center gap-2 mb-2 text-gray-500 dark:text-gray-400 text-sm flex-wrap"> 5 {{ $owner := didOrHandle $.LoggedInUser.Did $.LoggedInUser.Handle }} 6 <a href="/{{ $owner }}" class="no-underline hover:underline">{{ $owner }}</a> 7 ··· 9 {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} 10 {{ if $isIssueAuthor }} 11 <span class="before:content-['·']"></span> 12 author 13 {{ end }} 14 15 <span class="before:content-['·']"></span> 16 <a 17 href="#{{ .CommentId }}" 18 + class="text-gray-500 dark:text-gray-400 hover:text-gray-500 dark:hover:text-gray-400 hover:underline no-underline" 19 id="{{ .CommentId }}"> 20 {{ template "repo/fragments/time" .Created }} 21 </a>
+7 -8
appview/pages/templates/repo/issues/fragments/issueComment.html
··· 5 {{ $owner := index $.DidHandleMap .OwnerDid }} 6 {{ template "user/fragments/picHandleLink" $owner }} 7 8 <span class="before:content-['·']"></span> 9 <a 10 href="#{{ .CommentId }}" ··· 18 {{ template "repo/fragments/time" .Created }} 19 {{ end }} 20 </a> 21 - 22 - <!-- show user "hats" --> 23 - {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} 24 - {{ if $isIssueAuthor }} 25 - <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center"> 26 - author 27 - </span> 28 - {{ end }} 29 30 {{ $isCommentOwner := and $.LoggedInUser (eq $.LoggedInUser.Did .OwnerDid) }} 31 {{ if and $isCommentOwner (not .Deleted) }}
··· 5 {{ $owner := index $.DidHandleMap .OwnerDid }} 6 {{ template "user/fragments/picHandleLink" $owner }} 7 8 + <!-- show user "hats" --> 9 + {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} 10 + {{ if $isIssueAuthor }} 11 + <span class="before:content-['·']"></span> 12 + author 13 + {{ end }} 14 + 15 <span class="before:content-['·']"></span> 16 <a 17 href="#{{ .CommentId }}" ··· 25 {{ template "repo/fragments/time" .Created }} 26 {{ end }} 27 </a> 28 29 {{ $isCommentOwner := and $.LoggedInUser (eq $.LoggedInUser.Did .OwnerDid) }} 30 {{ if and $isCommentOwner (not .Deleted) }}