Skip to content

Fix button alignments and remove unnecessary styles #34206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 16, 2025
Merged
2 changes: 1 addition & 1 deletion templates/repo/header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</div>
</div>
{{if not (or .IsBeingCreated .IsBroken)}}
<div class="repo-buttons">
<div class="repo-buttons gitea-buttons">
{{if $.RepoTransfer}}
<form method="post" action="{{$.RepoLink}}/action/accept_transfer?redirect_to={{$.RepoLink}}">
{{$.CsrfTokenHtml}}
Expand Down
2 changes: 2 additions & 0 deletions templates/repo/release_tag_header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{{end}}
</h2>
</div>
<div class="gitea-buttons">
{{if .EnableFeed}}
<a class="ui small button" href="{{.RepoLink}}/{{if .PageIsTagList}}tags{{else}}releases{{end}}.rss">
{{svg "octicon-rss" 16}} {{ctx.Locale.Tr "rss_feed"}}
Expand All @@ -21,6 +22,7 @@
{{ctx.Locale.Tr "repo.release.new_release"}}
</a>
{{end}}
</div>
</div>
<div class="divider"></div>
{{else if $canReadCode}}
Expand Down
12 changes: 12 additions & 0 deletions web_src/css/modules/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -421,3 +421,15 @@ It needs some tricks to tweak the left/right borders with active state */
padding-top: 0.58928571em;
padding-bottom: 0.58928571em;
}

.gitea-buttons {
align-items: center;
display: flex;
flex-flow: row wrap;
word-break: keep-all;
gap: 0.5em;
}

.gitea-buttons .ui.button {
margin: 0 !important;
}
8 changes: 0 additions & 8 deletions web_src/css/repo/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@
flex-wrap: nowrap;
}

.repo-buttons {
align-items: center;
display: flex;
flex-flow: row wrap;
word-break: keep-all;
gap: 0.25em;
}

.repo-buttons button[disabled] ~ .label {
opacity: var(--opacity-disabled);
color: var(--color-text-dark);
Expand Down