Skip to content

Commit 4f496ac

Browse files
committed
Fix the style issues of the top buttons on the release page, extract a common button group style, and gradually replace the button group styles on other pages later.
1 parent 921d3a3 commit 4f496ac

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

templates/repo/header.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</div>
3939
</div>
4040
{{if not (or .IsBeingCreated .IsBroken)}}
41-
<div class="repo-buttons">
41+
<div class="repo-buttons gitea-buttons">
4242
{{if $.RepoTransfer}}
4343
<form method="post" action="{{$.RepoLink}}/action/accept_transfer?redirect_to={{$.RepoLink}}">
4444
{{$.CsrfTokenHtml}}

templates/repo/release_tag_header.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
{{end}}
1212
</h2>
1313
</div>
14+
<div class="gitea-buttons">
1415
{{if .EnableFeed}}
1516
<a class="ui small button" href="{{.RepoLink}}/{{if .PageIsTagList}}tags{{else}}releases{{end}}.rss">
1617
{{svg "octicon-rss" 16}} {{ctx.Locale.Tr "rss_feed"}}
@@ -21,6 +22,7 @@
2122
{{ctx.Locale.Tr "repo.release.new_release"}}
2223
</a>
2324
{{end}}
25+
</div>
2426
</div>
2527
<div class="divider"></div>
2628
{{else if $canReadCode}}

web_src/css/modules/button.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,3 +421,15 @@ It needs some tricks to tweak the left/right borders with active state */
421421
padding-top: 0.58928571em;
422422
padding-bottom: 0.58928571em;
423423
}
424+
425+
.gitea-buttons {
426+
align-items: center;
427+
display: flex;
428+
flex-flow: row wrap;
429+
word-break: keep-all;
430+
gap: 0.5em;
431+
}
432+
433+
.gitea-buttons .ui.button {
434+
margin: 0 !important;
435+
}

web_src/css/repo/header.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@
2828
flex-wrap: nowrap;
2929
}
3030

31-
.repo-buttons {
32-
align-items: center;
33-
display: flex;
34-
flex-flow: row wrap;
35-
word-break: keep-all;
36-
gap: 0.25em;
37-
}
38-
3931
.repo-buttons button[disabled] ~ .label {
4032
opacity: var(--opacity-disabled);
4133
color: var(--color-text-dark);

0 commit comments

Comments
 (0)