summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-10-31 18:25:10 +0100
committerGitHub <noreply@github.com>2020-10-31 13:25:10 -0400
commit52b4b984a5e0f761102f37807b0834160e3abe44 (patch)
tree419d3dfa2767107a961ebf1e656f626794f3a9e0 /templates
parent77a2d756399b994b238360a0fa528ecc2bf1528c (diff)
downloadgitea-52b4b984a5e0f761102f37807b0834160e3abe44.tar.gz
gitea-52b4b984a5e0f761102f37807b0834160e3abe44.zip
Comment Header fixes (#13356) (#13374)
Apply more flexboxes on comment header and remove float hacks. Needs 1.13 backport. Fixes: https://github.com/go-gitea/gitea/issues/13316 Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_content.tmpl44
-rw-r--r--templates/repo/issue/view_content/comments.tmpl20
2 files changed, 34 insertions, 30 deletions
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 190f5117b8..9f4c641592 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -21,25 +21,27 @@
{{end}}
<div class="content">
<div class="ui top attached header">
- {{if .Issue.OriginalAuthor }}
- <span class="text black">
- <i class="fa {{MigrationIcon .Repository.GetOriginalURLHostname}}" aria-hidden="true"></i>
- {{ .Issue.OriginalAuthor }}
- </span>
- <span class="text grey">
- {{ .i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe }}
- </span>
- <span class="text migrate">
- {{if .Repository.OriginalURL}} ({{$.i18n.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname | Safe }}){{end}}
- </span>
- {{else}}
- <span class="text grey">
- <a class="author"{{if gt .Issue.Poster.ID 0}} href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a>
- {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}}
- </span>
- {{end}}
- {{if not $.Repository.IsArchived}}
- <div class="ui right actions">
+ <div class="header-left df ac">
+ {{if .Issue.OriginalAuthor }}
+ <span class="text black">
+ <i class="fa {{MigrationIcon .Repository.GetOriginalURLHostname}}" aria-hidden="true"></i>
+ {{ .Issue.OriginalAuthor }}
+ </span>
+ <span class="text grey">
+ {{ .i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe }}
+ </span>
+ <span class="text migrate">
+ {{if .Repository.OriginalURL}} ({{$.i18n.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname | Safe }}){{end}}
+ </span>
+ {{else}}
+ <span class="text grey">
+ <a class="author"{{if gt .Issue.Poster.ID 0}} href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a>
+ {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}}
+ </span>
+ {{end}}
+ </div>
+ <div class="header-right actions df ac">
+ {{if not $.Repository.IsArchived}}
{{if gt .Issue.ShowTag 0}}
<div class="item tag">
{{if eq .Issue.ShowTag 2}}
@@ -51,8 +53,8 @@
{{end}}
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
{{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" .Issue "delete" false "diff" false "IsCommentPoster" $.IsIssuePoster}}
- </div>
- {{end}}
+ {{end}}
+ </div>
</div>
<div class="ui attached segment">
<div class="render-content markdown">
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 86ce6148c1..e3fc076b74 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -20,13 +20,15 @@
{{end}}
<div class="content">
<div class="ui top attached header">
- {{if .OriginalAuthor }}
- <span class="text black"><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span><span class="text grey"> {{$.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if $.Repository.OriginalURL}}</span><span class="text migrate">({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}}</span>
- {{else}}
- <span class="text grey"><a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
- {{end}}
- {{if not $.Repository.IsArchived}}
- <div class="ui right actions">
+ <div class="header-left df ac">
+ {{if .OriginalAuthor }}
+ <span class="text black"><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span><span class="text grey"> {{$.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if $.Repository.OriginalURL}}</span><span class="text migrate">({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}}</span>
+ {{else}}
+ <span class="text grey"><a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
+ {{end}}
+ </div>
+ <div class="header-right actions df ac">
+ {{if not $.Repository.IsArchived}}
{{if eq .PosterID .Issue.PosterID }}
<div class="item tag">
{{$.i18n.Tr "repo.issues.poster"}}
@@ -43,8 +45,8 @@
{{end}}
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
{{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
- </div>
- {{end}}
+ {{end}}
+ </div>
</div>
<div class="ui attached segment">
<div class="render-content markdown">