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
···
{{ define "repo/issues/fragments/editIssueComment" }}
{{ with .Comment }}
<div id="comment-container-{{.CommentId}}">
-
<div class="flex items-center gap-2 mb-2 text-gray-500 text-sm">
+
<div class="flex items-center gap-2 mb-2 text-gray-500 dark:text-gray-400 text-sm flex-wrap">
{{ $owner := didOrHandle $.LoggedInUser.Did $.LoggedInUser.Handle }}
<a href="/{{ $owner }}" class="no-underline hover:underline">{{ $owner }}</a>
···
{{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }}
{{ if $isIssueAuthor }}
<span class="before:content-['·']"></span>
-
<span class="rounded bg-gray-100 text-black font-mono px-2 mx-1/2 inline-flex items-center">
author
-
</span>
{{ end }}
<span class="before:content-['·']"></span>
<a
href="#{{ .CommentId }}"
-
class="text-gray-500 hover:text-gray-500 hover:underline no-underline"
+
class="text-gray-500 dark:text-gray-400 hover:text-gray-500 dark:hover:text-gray-400 hover:underline no-underline"
id="{{ .CommentId }}">
{{ template "repo/fragments/time" .Created }}
</a>
+7 -8
appview/pages/templates/repo/issues/fragments/issueComment.html
···
{{ $owner := index $.DidHandleMap .OwnerDid }}
{{ template "user/fragments/picHandleLink" $owner }}
+
<!-- show user "hats" -->
+
{{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }}
+
{{ if $isIssueAuthor }}
+
<span class="before:content-['·']"></span>
+
author
+
{{ end }}
+
<span class="before:content-['·']"></span>
<a
href="#{{ .CommentId }}"
···
{{ template "repo/fragments/time" .Created }}
{{ end }}
</a>
-
-
<!-- show user "hats" -->
-
{{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }}
-
{{ if $isIssueAuthor }}
-
<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">
-
author
-
</span>
-
{{ end }}
{{ $isCommentOwner := and $.LoggedInUser (eq $.LoggedInUser.Did .OwnerDid) }}
{{ if and $isCommentOwner (not .Deleted) }}