mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 19:06:18 +01:00 
			
		
		
		
	Fix various misalignments and overflows (#34227)
--------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -4,7 +4,7 @@ | |||||||
| 	<div class="ui container"> | 	<div class="ui container"> | ||||||
| 		{{template "base/alert" .}} | 		{{template "base/alert" .}} | ||||||
| 		{{if .IsOrganizationOwner}} | 		{{if .IsOrganizationOwner}} | ||||||
| 			<div class="tw-text-right"> | 			<div class="flex-text-block tw-justify-end"> | ||||||
| 				<a class="ui primary button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{ctx.Locale.Tr "org.create_new_team"}}</a> | 				<a class="ui primary button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{ctx.Locale.Tr "org.create_new_team"}}</a> | ||||||
| 			</div> | 			</div> | ||||||
| 			<div class="divider"></div> | 			<div class="divider"></div> | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} | {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} | ||||||
| 	<div class="tw-flex tw-justify-between tw-mb-4"> | 	<div class="flex-text-block tw-justify-between tw-mb-4"> | ||||||
| 		<div class="small-menu-items ui compact tiny menu list-header-toggle"> | 		<div class="small-menu-items ui compact tiny menu list-header-toggle"> | ||||||
| 			<a class="item{{if not .IsShowClosed}} active{{end}}" href="?state=open&q={{$.Keyword}}"> | 			<a class="item{{if not .IsShowClosed}} active{{end}}" href="?state=open&q={{$.Keyword}}"> | ||||||
| 				{{svg "octicon-project-symlink" 16 "tw-mr-2"}} | 				{{svg "octicon-project-symlink" 16 "tw-mr-2"}} | ||||||
| @@ -10,9 +10,7 @@ | |||||||
| 				{{ctx.Locale.PrettyNumber .ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}} | 				{{ctx.Locale.PrettyNumber .ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}} | ||||||
| 			</a> | 			</a> | ||||||
| 		</div> | 		</div> | ||||||
| 		<div class="tw-text-right"> | 		<a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.projects.new"}}</a> | ||||||
| 			<a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.projects.new"}}</a> |  | ||||||
| 		</div> |  | ||||||
| 	</div> | 	</div> | ||||||
| {{end}} | {{end}} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -64,7 +64,7 @@ | |||||||
| 		</div> | 		</div> | ||||||
| 	</div> | 	</div> | ||||||
| 	<div class="divider"></div> | 	<div class="divider"></div> | ||||||
| 	<div class="tw-text-right"> | 	<div class="flex-text-block tw-justify-end"> | ||||||
| 		<a class="ui cancel button" href="{{$.CancelLink}}"> | 		<a class="ui cancel button" href="{{$.CancelLink}}"> | ||||||
| 			{{ctx.Locale.Tr "repo.milestones.cancel"}} | 			{{ctx.Locale.Tr "repo.milestones.cancel"}} | ||||||
| 		</a> | 		</a> | ||||||
|   | |||||||
| @@ -223,6 +223,7 @@ | |||||||
| 	{{if and (not $.Repository.IsArchived) (not .DiffNotAvailable)}} | 	{{if and (not $.Repository.IsArchived) (not .DiffNotAvailable)}} | ||||||
| 		<template id="issue-comment-editor-template"> | 		<template id="issue-comment-editor-template"> | ||||||
| 			<form class="ui form comment"> | 			<form class="ui form comment"> | ||||||
|  | 				<div class="field"> | ||||||
| 				{{template "shared/combomarkdowneditor" (dict | 				{{template "shared/combomarkdowneditor" (dict | ||||||
| 					"CustomInit" true | 					"CustomInit" true | ||||||
| 					"MarkdownPreviewInRepo" $.Repository | 					"MarkdownPreviewInRepo" $.Repository | ||||||
| @@ -230,12 +231,13 @@ | |||||||
| 					"TextareaName" "content" | 					"TextareaName" "content" | ||||||
| 					"DropzoneParentContainer" ".ui.form" | 					"DropzoneParentContainer" ".ui.form" | ||||||
| 				)}} | 				)}} | ||||||
|  | 				</div> | ||||||
| 				{{if .IsAttachmentEnabled}} | 				{{if .IsAttachmentEnabled}} | ||||||
| 					<div class="field"> | 					<div class="field"> | ||||||
| 						{{template "repo/upload" .}} | 						{{template "repo/upload" .}} | ||||||
| 					</div> | 					</div> | ||||||
| 				{{end}} | 				{{end}} | ||||||
| 				<div class="tw-text-right edit buttons"> | 				<div class="field flex-text-block tw-justify-end"> | ||||||
| 					<button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button> | 					<button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button> | ||||||
| 					<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button> | 					<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button> | ||||||
| 				</div> | 				</div> | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| 		{{end}} | 		{{end}} | ||||||
|  |  | ||||||
| 		<div class="field footer"> | 		<div class="field footer"> | ||||||
| 			<div class="tw-text-right"> | 			<div class="flex-text-block tw-justify-end"> | ||||||
| 				{{if $.reply}} | 				{{if $.reply}} | ||||||
| 					<button class="ui submit primary tiny button btn-reply" type="submit">{{ctx.Locale.Tr "repo.diff.comment.reply"}}</button> | 					<button class="ui submit primary tiny button btn-reply" type="submit">{{ctx.Locale.Tr "repo.diff.comment.reply"}}</button> | ||||||
| 					<input type="hidden" name="reply" value="{{$.reply}}"> | 					<input type="hidden" name="reply" value="{{$.reply}}"> | ||||||
|   | |||||||
| @@ -3,10 +3,10 @@ | |||||||
| 	{{template "repo/header" .}} | 	{{template "repo/header" .}} | ||||||
| 	<div class="ui container"> | 	<div class="ui container"> | ||||||
| 		{{template "base/alert" .}} | 		{{template "base/alert" .}} | ||||||
| 		<div class="tw-flex"> | 		<div class="flex-text-block tw-flex-wrap tw-mb-2"> | ||||||
| 			<h1 class="tw-mb-2">{{.Milestone.Name}}</h1> | 			<h1 class="tw-flex-1 tw-m-0">{{.Milestone.Name}}</h1> | ||||||
| 			{{if not .Repository.IsArchived}} | 			{{if not .Repository.IsArchived}} | ||||||
| 				<div class="tw-text-right tw-flex-1"> | 				<div> | ||||||
| 					{{if or .CanWriteIssues .CanWritePulls}} | 					{{if or .CanWriteIssues .CanWritePulls}} | ||||||
| 						{{if .Milestone.IsClosed}} | 						{{if .Milestone.IsClosed}} | ||||||
| 							<a class="ui primary basic button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/open">{{ctx.Locale.Tr "repo.milestones.open"}} | 							<a class="ui primary basic button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/open">{{ctx.Locale.Tr "repo.milestones.open"}} | ||||||
|   | |||||||
| @@ -44,7 +44,7 @@ | |||||||
| 						"TextareaPlaceholder" (ctx.Locale.Tr "repo.milestones.desc") | 						"TextareaPlaceholder" (ctx.Locale.Tr "repo.milestones.desc") | ||||||
| 					)}} | 					)}} | ||||||
| 				</div> | 				</div> | ||||||
| 				<div class="tw-text-right"> | 				<div class="flex-text-block tw-justify-end"> | ||||||
| 					{{if .PageIsEditMilestone}} | 					{{if .PageIsEditMilestone}} | ||||||
| 						<a class="ui primary basic button" href="{{.RepoLink}}/milestones"> | 						<a class="ui primary basic button" href="{{.RepoLink}}/milestones"> | ||||||
| 							{{ctx.Locale.Tr "repo.milestones.cancel"}} | 							{{ctx.Locale.Tr "repo.milestones.cancel"}} | ||||||
|   | |||||||
| @@ -33,7 +33,7 @@ | |||||||
| 					{{else}} | 					{{else}} | ||||||
| 						{{template "repo/issue/comment_tab" .}} | 						{{template "repo/issue/comment_tab" .}} | ||||||
| 					{{end}} | 					{{end}} | ||||||
| 					<div class="tw-text-right"> | 					<div class="flex-text-block tw-justify-end"> | ||||||
| 						<button class="ui primary button"> | 						<button class="ui primary button"> | ||||||
| 							{{if .PageIsComparePull}} | 							{{if .PageIsComparePull}} | ||||||
| 								{{ctx.Locale.Tr "repo.pulls.create"}} | 								{{ctx.Locale.Tr "repo.pulls.create"}} | ||||||
|   | |||||||
| @@ -83,7 +83,7 @@ | |||||||
| 								{{template "repo/issue/comment_tab" .}} | 								{{template "repo/issue/comment_tab" .}} | ||||||
| 								{{.CsrfTokenHtml}} | 								{{.CsrfTokenHtml}} | ||||||
| 								<div class="field footer"> | 								<div class="field footer"> | ||||||
| 									<div class="tw-text-right"> | 									<div class="flex-text-block tw-justify-end"> | ||||||
| 										{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}} | 										{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}} | ||||||
| 											{{if .Issue.IsClosed}} | 											{{if .Issue.IsClosed}} | ||||||
| 												<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"> | 												<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 @@ | |||||||
| 		{{end}} | 		{{end}} | ||||||
|  |  | ||||||
| 		<div class="field"> | 		<div class="field"> | ||||||
| 			<div class="tw-text-right edit"> | 			<div class="flex-text-block tw-justify-end"> | ||||||
| 				<button type="button" class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button> | 				<button type="button" class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button> | ||||||
| 				<button type="submit" class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button> | 				<button type="submit" class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button> | ||||||
| 			</div> | 			</div> | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ | |||||||
| 				<label><strong>{{ctx.Locale.Tr "repo.issues.reference_issue.body"}}</strong></label> | 				<label><strong>{{ctx.Locale.Tr "repo.issues.reference_issue.body"}}</strong></label> | ||||||
| 				<textarea name="content"></textarea> | 				<textarea name="content"></textarea> | ||||||
| 			</div> | 			</div> | ||||||
| 			<div class="tw-text-right"> | 			<div class="flex-text-block tw-justify-end"> | ||||||
| 				<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.create"}}</button> | 				<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.create"}}</button> | ||||||
| 			</div> | 			</div> | ||||||
| 		</form> | 		</form> | ||||||
|   | |||||||
| @@ -1,12 +1,12 @@ | |||||||
| <h2 class="ui header activity-header"> | <h2 class="ui header activity-header"> | ||||||
| 	<span>{{DateUtils.AbsoluteLong .DateFrom}} - {{DateUtils.AbsoluteLong .DateUntil}}</span> | 	<span>{{DateUtils.AbsoluteLong .DateFrom}} - {{DateUtils.AbsoluteLong .DateUntil}}</span> | ||||||
| 	<!-- Period --> | 	<!-- Period --> | ||||||
| 	<div class="ui floating dropdown jump filter"> | 	<div class="ui floating dropdown jump"> | ||||||
| 		<div class="ui basic compact button"> | 		<div class="ui basic compact button"> | ||||||
| 			{{ctx.Locale.Tr "repo.activity.period.filter_label"}} <strong>{{.PeriodText}}</strong> | 			{{ctx.Locale.Tr "repo.activity.period.filter_label"}} <strong>{{.PeriodText}}</strong> | ||||||
| 			{{svg "octicon-triangle-down" 14 "dropdown icon"}} | 			{{svg "octicon-triangle-down" 14 "dropdown icon"}} | ||||||
| 		</div> | 		</div> | ||||||
| 		<div class="menu"> | 		<div class="left menu"> | ||||||
| 			<a class="{{if eq .Period "daily"}}active {{end}}item" href="{{$.RepoLink}}/activity/daily">{{ctx.Locale.Tr "repo.activity.period.daily"}}</a> | 			<a class="{{if eq .Period "daily"}}active {{end}}item" href="{{$.RepoLink}}/activity/daily">{{ctx.Locale.Tr "repo.activity.period.daily"}}</a> | ||||||
| 			<a class="{{if eq .Period "halfweekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/halfweekly">{{ctx.Locale.Tr "repo.activity.period.halfweekly"}}</a> | 			<a class="{{if eq .Period "halfweekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/halfweekly">{{ctx.Locale.Tr "repo.activity.period.halfweekly"}}</a> | ||||||
| 			<a class="{{if eq .Period "weekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/weekly">{{ctx.Locale.Tr "repo.activity.period.weekly"}}</a> | 			<a class="{{if eq .Period "weekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/weekly">{{ctx.Locale.Tr "repo.activity.period.weekly"}}</a> | ||||||
|   | |||||||
| @@ -35,7 +35,7 @@ | |||||||
| 				<input name="message" aria-label="{{ctx.Locale.Tr "repo.wiki.default_commit_message"}}" placeholder="{{ctx.Locale.Tr "repo.wiki.default_commit_message"}}"> | 				<input name="message" aria-label="{{ctx.Locale.Tr "repo.wiki.default_commit_message"}}" placeholder="{{ctx.Locale.Tr "repo.wiki.default_commit_message"}}"> | ||||||
| 			</div> | 			</div> | ||||||
| 			<div class="divider"></div> | 			<div class="divider"></div> | ||||||
| 			<div class="tw-text-right"> | 			<div class="flex-text-block tw-justify-end"> | ||||||
| 				<a class="ui basic cancel button" href="{{.Link}}">{{ctx.Locale.Tr "cancel"}}</a> | 				<a class="ui basic cancel button" href="{{.Link}}">{{ctx.Locale.Tr "cancel"}}</a> | ||||||
| 				<button class="ui primary button">{{ctx.Locale.Tr "repo.wiki.save_page"}}</button> | 				<button class="ui primary button">{{ctx.Locale.Tr "repo.wiki.save_page"}}</button> | ||||||
| 			</div> | 			</div> | ||||||
|   | |||||||
| @@ -37,7 +37,7 @@ | |||||||
| 					</div> | 					</div> | ||||||
| 					{{if .SignedUser.CanCreateOrganization}} | 					{{if .SignedUser.CanCreateOrganization}} | ||||||
| 					<a class="item" href="{{AppSubUrl}}/org/create"> | 					<a class="item" href="{{AppSubUrl}}/org/create"> | ||||||
| 						{{svg "octicon-plus"}}   {{ctx.Locale.Tr "new_org"}} | 						{{svg "octicon-plus" 16 "tw-ml-1 tw-mr-5"}}{{ctx.Locale.Tr "new_org"}} | ||||||
| 					</a> | 					</a> | ||||||
| 					{{end}} | 					{{end}} | ||||||
| 				</div> | 				</div> | ||||||
| @@ -77,7 +77,7 @@ | |||||||
| 		{{end}} | 		{{end}} | ||||||
|  |  | ||||||
| 	{{if .ContextUser.IsOrganization}} | 	{{if .ContextUser.IsOrganization}} | ||||||
| 		<div class="right menu"> | 		<div class="right menu tw-flex-wrap tw-justify-end"> | ||||||
| 			<a class="{{if .PageIsNews}}active {{end}}item tw-ml-auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}"> | 			<a class="{{if .PageIsNews}}active {{end}}item tw-ml-auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}"> | ||||||
| 				{{svg "octicon-rss"}} {{ctx.Locale.Tr "activities"}} | 				{{svg "octicon-rss"}} {{ctx.Locale.Tr "activities"}} | ||||||
| 			</a> | 			</a> | ||||||
| @@ -98,7 +98,7 @@ | |||||||
| 			{{end}} | 			{{end}} | ||||||
| 			<div class="item"> | 			<div class="item"> | ||||||
| 				<a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title="{{ctx.Locale.Tr "home.view_home" .ContextUser.Name}}"> | 				<a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title="{{ctx.Locale.Tr "home.view_home" .ContextUser.Name}}"> | ||||||
| 					{{ctx.Locale.Tr "home.view_home" (.ContextUser.ShortName 40)}} | 					{{ctx.Locale.Tr "home.view_home" (.ContextUser.ShortName 20)}} | ||||||
| 				</a> | 				</a> | ||||||
| 			</div> | 			</div> | ||||||
| 		</div> | 		</div> | ||||||
|   | |||||||
| @@ -2,17 +2,15 @@ | |||||||
|   color: var(--color-text-dark) !important; |   color: var(--color-text-dark) !important; | ||||||
| } | } | ||||||
|  |  | ||||||
| .code-line-button { | .ui.button.code-line-button { | ||||||
|   border: 1px solid var(--color-secondary); |   border: 1px solid var(--color-secondary); | ||||||
|   border-radius: var(--border-radius); |   padding: 1px 4px; | ||||||
|   padding: 1px 4px !important; |   margin: 0; | ||||||
|  |   min-height: 0; | ||||||
|   position: absolute; |   position: absolute; | ||||||
|   font-family: var(--fonts-regular); |   left: 6px; | ||||||
|   left: 0; |  | ||||||
|   transform: translateX(calc(-50% + 6px)); |  | ||||||
|   cursor: pointer; |  | ||||||
| } | } | ||||||
|  |  | ||||||
| .code-line-button:hover { | .ui.button.code-line-button:hover { | ||||||
|   background: var(--color-secondary) !important; |   background: var(--color-secondary); | ||||||
| } | } | ||||||
|   | |||||||
| @@ -10,6 +10,7 @@ | |||||||
|   padding: 2px; |   padding: 2px; | ||||||
|   position: absolute; |   position: absolute; | ||||||
|   margin-left: -22px; |   margin-left: -22px; | ||||||
|  |   min-height: 0; | ||||||
|   z-index: 5; |   z-index: 5; | ||||||
|   opacity: 0; |   opacity: 0; | ||||||
|   transition: transform 0.1s ease-in-out; |   transition: transform 0.1s ease-in-out; | ||||||
|   | |||||||
| @@ -1173,11 +1173,6 @@ select.ui.dropdown { | |||||||
|   border-radius: 0.28571429rem !important; |   border-radius: 0.28571429rem !important; | ||||||
| } | } | ||||||
|  |  | ||||||
| /* GITEA-PATCH: gitea also have "right menu" support */ |  | ||||||
| .ui.dropdown > .right.menu { |  | ||||||
|   left: auto; |  | ||||||
|   right: 0; |  | ||||||
| } |  | ||||||
| /* Leftward Opening Menu */ | /* Leftward Opening Menu */ | ||||||
| .ui.dropdown > .left.menu { | .ui.dropdown > .left.menu { | ||||||
|   left: auto !important; |   left: auto !important; | ||||||
|   | |||||||
| @@ -353,12 +353,12 @@ export default defineComponent({ | |||||||
|       </div> |       </div> | ||||||
|       <div> |       <div> | ||||||
|         <!-- Contribution type --> |         <!-- Contribution type --> | ||||||
|         <div class="ui dropdown jump" id="repo-contributors"> |         <div class="ui floating dropdown jump" id="repo-contributors"> | ||||||
|           <div class="ui basic compact button tw-mr-0"> |           <div class="ui basic compact button tw-mr-0"> | ||||||
|             <span class="not-mobile">{{ locale.filterLabel }}</span> <strong>{{ locale.contributionType[type] }}</strong> |             <span class="not-mobile">{{ locale.filterLabel }}</span> <strong>{{ locale.contributionType[type] }}</strong> | ||||||
|             <svg-icon name="octicon-triangle-down" :size="14"/> |             <svg-icon name="octicon-triangle-down" :size="14"/> | ||||||
|           </div> |           </div> | ||||||
|           <div class="right menu"> |           <div class="left menu"> | ||||||
|             <div :class="['item', {'selected': type === 'commits'}]" data-value="commits"> |             <div :class="['item', {'selected': type === 'commits'}]" data-value="commits"> | ||||||
|               {{ locale.contributionType.commits }} |               {{ locale.contributionType.commits }} | ||||||
|             </div> |             </div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user