1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-05 07:24:25 +00:00

Fix and/or comment some legacy CSS problems (#33015)

This commit is contained in:
wxiaoguang 2024-12-28 19:51:38 +08:00 committed by GitHub
parent 3d3ece36d2
commit a92f5057ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 13 additions and 27 deletions

View File

@ -29,7 +29,8 @@
</div> </div>
<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{ctx.RenderUtils.RenderCommitMessage .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .DefaultBranchBranch.DBBranch.CommitTime}}{{if .DefaultBranchBranch.DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p> <p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{ctx.RenderUtils.RenderCommitMessage .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .DefaultBranchBranch.DBBranch.CommitTime}}{{if .DefaultBranchBranch.DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
</td> </td>
<td class="right aligned middle aligned overflow-visible"> {{/* FIXME: here and below, the tw-overflow-visible is not quite right but it is still needed the moment: to show the important buttons when the width is narrow */}}
<td class="right aligned middle aligned tw-overflow-visible">
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
<button class="btn interact-bg show-create-branch-modal tw-p-2" <button class="btn interact-bg show-create-branch-modal tw-p-2"
data-modal="#create-branch-modal" data-modal="#create-branch-modal"
@ -148,7 +149,8 @@
{{end}} {{end}}
{{end}} {{end}}
</td> </td>
<td class="three wide right aligned overflow-visible"> {{/* FIXME: here and above, the tw-overflow-visible is not quite right */}}
<td class="three wide right aligned tw-overflow-visible">
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted)}} {{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted)}}
<button class="btn interact-bg tw-p-2 show-modal show-create-branch-modal" <button class="btn interact-bg tw-p-2 show-modal show-create-branch-modal"
data-branch-from="{{.DBBranch.Name}}" data-branch-from="{{.DBBranch.Name}}"

View File

@ -733,7 +733,7 @@
<span class="field"> <span class="field">
{{if .CodeIndexerStatus}} {{if .CodeIndexerStatus}}
<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.CodeIndexerStatus.CommitSha}}"> <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.CodeIndexerStatus.CommitSha}}">
<span class="shortsha">{{ShortSha .CodeIndexerStatus.CommitSha}}</span> {{ShortSha .CodeIndexerStatus.CommitSha}}
</a> </a>
{{else}} {{else}}
<span>{{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}}</span> <span>{{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}}</span>
@ -752,7 +752,7 @@
<span class="field"> <span class="field">
{{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}} {{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}}
<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.StatsIndexerStatus.CommitSha}}"> <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.StatsIndexerStatus.CommitSha}}">
<span class="shortsha">{{ShortSha .StatsIndexerStatus.CommitSha}}</span> {{ShortSha .StatsIndexerStatus.CommitSha}}
</a> </a>
{{else}} {{else}}
<span>{{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}}</span> <span>{{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}}</span>

View File

@ -928,7 +928,8 @@ strong.attention-caution, svg.attention-caution {
color: var(--color-red-dark-1); color: var(--color-red-dark-1);
} }
.center:not(.popup) { /* FIXME: this is a longstanding dirty patch since 2015, it only makes the pages more messy and shouldn't be used */
.center {
text-align: center; text-align: center;
} }

View File

@ -1,13 +1,4 @@
.explore .secondary-nav { /* FIXME: need to refactor the repo branches list page and move these styles to proper place */
border-width: 1px !important;
}
.explore .secondary-nav .svg {
width: 16px;
text-align: center;
margin-right: 5px;
}
.ui.repository.branches .info { .ui.repository.branches .info {
font-size: 12px; font-size: 12px;
color: var(--color-text-light); color: var(--color-text-light);
@ -20,12 +11,3 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.ui.repository.branches .overflow-visible {
overflow: visible;
}
/* fix alignment of PR popup in branches table */
.ui.repository.branches table .ui.popup {
text-align: left;
}

View File

@ -82,5 +82,6 @@
@import "./review.css"; @import "./review.css";
@import "./actions.css"; @import "./actions.css";
@tailwind utilities;
@import "./helpers.css"; @import "./helpers.css";
@tailwind utilities;

View File

@ -103,11 +103,11 @@
#navbar .ui.dropdown .navbar-profile-admin { #navbar .ui.dropdown .navbar-profile-admin {
display: block; display: block;
position: absolute; position: absolute;
font-size: 10px; font-size: 9px;
font-weight: var(--font-weight-bold); font-weight: var(--font-weight-bold);
color: var(--color-nav-bg); color: var(--color-nav-bg);
background: var(--color-primary); background: var(--color-primary);
padding: 2px 4px; padding: 2px 3px;
border-radius: 10px; border-radius: 10px;
top: -1px; top: -1px;
left: 18px; left: 18px;