Skip to content

Commit dd0caf7

Browse files
Fix various misalignments and overflows (#34227)
--------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 parent 42f45f1 commit dd0caf7

File tree

17 files changed

+32
-38
lines changed

17 files changed

+32
-38
lines changed

templates/org/team/teams.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="ui container">
55
{{template "base/alert" .}}
66
{{if .IsOrganizationOwner}}
7-
<div class="tw-text-right">
7+
<div class="flex-text-block tw-justify-end">
88
<a class="ui primary button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{ctx.Locale.Tr "org.create_new_team"}}</a>
99
</div>
1010
<div class="divider"></div>

templates/projects/list.tmpl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
2-
<div class="tw-flex tw-justify-between tw-mb-4">
2+
<div class="flex-text-block tw-justify-between tw-mb-4">
33
<div class="small-menu-items ui compact tiny menu list-header-toggle">
44
<a class="item{{if not .IsShowClosed}} active{{end}}" href="?state=open&q={{$.Keyword}}">
55
{{svg "octicon-project-symlink" 16 "tw-mr-2"}}
@@ -10,9 +10,7 @@
1010
{{ctx.Locale.PrettyNumber .ClosedCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
1111
</a>
1212
</div>
13-
<div class="tw-text-right">
14-
<a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.projects.new"}}</a>
15-
</div>
13+
<a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.projects.new"}}</a>
1614
</div>
1715
{{end}}
1816

templates/projects/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</div>
6565
</div>
6666
<div class="divider"></div>
67-
<div class="tw-text-right">
67+
<div class="flex-text-block tw-justify-end">
6868
<a class="ui cancel button" href="{{$.CancelLink}}">
6969
{{ctx.Locale.Tr "repo.milestones.cancel"}}
7070
</a>

templates/repo/diff/box.tmpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,19 +223,21 @@
223223
{{if and (not $.Repository.IsArchived) (not .DiffNotAvailable)}}
224224
<template id="issue-comment-editor-template">
225225
<form class="ui form comment">
226+
<div class="field">
226227
{{template "shared/combomarkdowneditor" (dict
227228
"CustomInit" true
228229
"MarkdownPreviewInRepo" $.Repository
229230
"MarkdownPreviewMode" "comment"
230231
"TextareaName" "content"
231232
"DropzoneParentContainer" ".ui.form"
232233
)}}
234+
</div>
233235
{{if .IsAttachmentEnabled}}
234236
<div class="field">
235237
{{template "repo/upload" .}}
236238
</div>
237239
{{end}}
238-
<div class="tw-text-right edit buttons">
240+
<div class="field flex-text-block tw-justify-end">
239241
<button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
240242
<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
241243
</div>

templates/repo/diff/comment_form.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
{{end}}
2828

2929
<div class="field footer">
30-
<div class="tw-text-right">
30+
<div class="flex-text-block tw-justify-end">
3131
{{if $.reply}}
3232
<button class="ui submit primary tiny button btn-reply" type="submit">{{ctx.Locale.Tr "repo.diff.comment.reply"}}</button>
3333
<input type="hidden" name="reply" value="{{$.reply}}">

templates/repo/issue/milestone_issues.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
{{template "repo/header" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}
6-
<div class="tw-flex">
7-
<h1 class="tw-mb-2">{{.Milestone.Name}}</h1>
6+
<div class="flex-text-block tw-flex-wrap tw-mb-2">
7+
<h1 class="tw-flex-1 tw-m-0">{{.Milestone.Name}}</h1>
88
{{if not .Repository.IsArchived}}
9-
<div class="tw-text-right tw-flex-1">
9+
<div>
1010
{{if or .CanWriteIssues .CanWritePulls}}
1111
{{if .Milestone.IsClosed}}
1212
<a class="ui primary basic button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/open">{{ctx.Locale.Tr "repo.milestones.open"}}

templates/repo/issue/milestone_new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"TextareaPlaceholder" (ctx.Locale.Tr "repo.milestones.desc")
4545
)}}
4646
</div>
47-
<div class="tw-text-right">
47+
<div class="flex-text-block tw-justify-end">
4848
{{if .PageIsEditMilestone}}
4949
<a class="ui primary basic button" href="{{.RepoLink}}/milestones">
5050
{{ctx.Locale.Tr "repo.milestones.cancel"}}

templates/repo/issue/new_form.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
{{else}}
3434
{{template "repo/issue/comment_tab" .}}
3535
{{end}}
36-
<div class="tw-text-right">
36+
<div class="flex-text-block tw-justify-end">
3737
<button class="ui primary button">
3838
{{if .PageIsComparePull}}
3939
{{ctx.Locale.Tr "repo.pulls.create"}}

templates/repo/issue/view_content.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
{{template "repo/issue/comment_tab" .}}
8484
{{.CsrfTokenHtml}}
8585
<div class="field footer">
86-
<div class="tw-text-right">
86+
<div class="flex-text-block tw-justify-end">
8787
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
8888
{{if .Issue.IsClosed}}
8989
<button id="status-button" class="ui primary basic button" data-status="{{ctx.Locale.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.reopen_comment_issue"}}" name="status" value="reopen">
@@ -157,7 +157,7 @@
157157
{{end}}
158158

159159
<div class="field">
160-
<div class="tw-text-right edit">
160+
<div class="flex-text-block tw-justify-end">
161161
<button type="button" class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
162162
<button type="submit" class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
163163
</div>

templates/repo/issue/view_content/reference_issue_dialog.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<label><strong>{{ctx.Locale.Tr "repo.issues.reference_issue.body"}}</strong></label>
2121
<textarea name="content"></textarea>
2222
</div>
23-
<div class="tw-text-right">
23+
<div class="flex-text-block tw-justify-end">
2424
<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.create"}}</button>
2525
</div>
2626
</form>

0 commit comments

Comments
 (0)