Skip to content

Commit 2d9952c

Browse files
committed
gerge remote-tracking branch 'origin/main' into rmcontainer
* origin/main: Dont show expansion for empty actions steps (go-gitea#29977) Remove fomantic header module (go-gitea#30033)
2 parents a9fc384 + 5bd0773 commit 2d9952c

File tree

8 files changed

+190
-834
lines changed

8 files changed

+190
-834
lines changed

templates/repo/diff/box.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
{{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}}
111111
{{$isReviewFile := and $.IsSigned $.PageIsPullFiles (not $.IsArchived) $.IsShowingAllCommits}}
112112
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} gt-mt-0" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if or ($file.ShouldBeHidden) (not $isExpandable)}}data-folded="true"{{end}}>
113-
<h4 class="diff-file-header sticky-2nd-row ui top attached normal header tw-flex tw-items-center tw-justify-between tw-flex-wrap">
113+
<h4 class="diff-file-header sticky-2nd-row ui top attached header tw-font-normal tw-flex tw-items-center tw-justify-between tw-flex-wrap">
114114
<div class="diff-file-name tw-flex tw-items-center gt-gap-2 tw-flex-wrap">
115115
<button class="fold-file btn interact-bg gt-p-2{{if not $isExpandable}} tw-invisible{{end}}">
116116
{{if $file.ShouldBeHidden}}
@@ -218,7 +218,7 @@
218218

219219
{{if .Diff.IsIncomplete}}
220220
<div class="diff-file-box diff-box file-content gt-mt-3" id="diff-incomplete">
221-
<h4 class="ui top attached normal header tw-flex tw-items-center tw-justify-between">
221+
<h4 class="ui top attached header tw-font-normal tw-flex tw-items-center tw-justify-between">
222222
{{ctx.Locale.Tr "repo.diff.too_many_files"}}
223223
<a class="ui basic tiny button" id="diff-show-more-files" data-href="?skip-to={{.Diff.End}}&file-only=true">{{ctx.Locale.Tr "repo.diff.show_more"}}</a>
224224
</h4>

templates/shared/search/code/results.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{range $result := .SearchResults}}
1313
{{$repo := or $.Repo (index $.RepoMaps .RepoID)}}
1414
<div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result">
15-
<h4 class="ui top attached normal header tw-flex tw-flex-wrap">
15+
<h4 class="ui top attached header tw-font-normal tw-flex tw-flex-wrap">
1616
{{if not $.Repo}}
1717
<span class="file tw-flex-1">
1818
<a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a>

web_src/css/base.css

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,6 @@ a.label,
297297
background-color: var(--color-markup-code-block);
298298
}
299299

300-
.ui.dividing.header {
301-
border-bottom-color: var(--color-secondary);
302-
}
303-
304300
/* fix Fomantic's line-height cutting off "g" on Windows Chrome with Segoe UI */
305301
.ui.input > input {
306302
line-height: var(--line-height-default);
@@ -580,22 +576,10 @@ ol.ui.list li,
580576
visibility: visible !important;
581577
}
582578

583-
.ui.error.header {
584-
background: var(--color-error-bg) !important;
585-
color: var(--color-error-text) !important;
586-
border-color: var(--color-error-border) !important;
587-
}
588-
589579
.ui.error.segment {
590580
border-color: var(--color-error-border) !important;
591581
}
592582

593-
.ui.warning.header {
594-
background: var(--color-warning-bg) !important;
595-
color: var(--color-warning-text) !important;
596-
border-color: var(--color-warning-border) !important;
597-
}
598-
599583
.ui.warning.segment {
600584
border-color: var(--color-warning-border) !important;
601585
}
@@ -1058,10 +1042,6 @@ input:-webkit-autofill:active,
10581042
margin-bottom: 0;
10591043
}
10601044

1061-
.ui .normal.header {
1062-
font-weight: var(--font-weight-normal);
1063-
}
1064-
10651045
.ui .form .autofill-dummy {
10661046
position: absolute;
10671047
width: 1px;
@@ -1219,17 +1199,6 @@ input:-webkit-autofill:active,
12191199
margin-right: 0;
12201200
}
12211201

1222-
.ui.icon.header svg {
1223-
width: 3em;
1224-
height: 3em;
1225-
float: none;
1226-
display: block;
1227-
line-height: var(--line-height-default);
1228-
padding: 0;
1229-
margin: 0 auto 0.5rem;
1230-
opacity: 1;
1231-
}
1232-
12331202
.ui.floating.dropdown .overflow.menu .scrolling.menu.items {
12341203
border-radius: 0 !important;
12351204
box-shadow: none !important;
@@ -1257,11 +1226,6 @@ input:-webkit-autofill:active,
12571226
border-radius: var(--border-radius);
12581227
}
12591228

1260-
.attention-header {
1261-
padding: 0.5em 0.75em !important;
1262-
color: var(--color-text) !important;
1263-
}
1264-
12651229
.attention-icon {
12661230
margin: 2px 6px 0 0;
12671231
}
@@ -1731,35 +1695,6 @@ a.ui.basic.label:hover {
17311695
color: var(--color-text-light);
17321696
}
17331697

1734-
.ui.attached.header {
1735-
position: relative;
1736-
background: var(--color-box-header);
1737-
border-color: var(--color-secondary);
1738-
}
1739-
1740-
/* fix misaligned right buttons on box headers */
1741-
.ui.attached.header > .ui.right {
1742-
position: absolute;
1743-
right: 0.78571429rem;
1744-
top: 0;
1745-
bottom: 0;
1746-
display: flex;
1747-
align-items: center;
1748-
gap: 0.25em;
1749-
}
1750-
1751-
/* the default ".ui.attached.header > .ui.right" is only able to contain "tiny" buttons, other buttons are too large */
1752-
.ui.attached.header > .ui.right .ui.tiny.button {
1753-
padding: 6px 10px;
1754-
font-weight: var(--font-weight-normal);
1755-
}
1756-
1757-
/* if a .top.attached.header is followed by a .segment, add some margin */
1758-
.ui.segments + .ui.top.attached.header,
1759-
.ui.attached.segment + .ui.top.attached.header {
1760-
margin-top: 1rem;
1761-
}
1762-
17631698
.rss-icon {
17641699
display: inline-flex;
17651700
color: var(--color-text-light-1);
@@ -1815,11 +1750,6 @@ table th[data-sortt-desc] .svg {
18151750
background: var(--color-secondary-dark-1) !important;
18161751
}
18171752

1818-
/* https://github.com/go-gitea/gitea/pull/11486 */
1819-
.ui.sub.header {
1820-
text-transform: none;
1821-
}
1822-
18231753
.ui.tabular.menu {
18241754
border-color: var(--color-secondary);
18251755
}
@@ -1870,22 +1800,6 @@ table th[data-sortt-desc] .svg {
18701800
height: 0;
18711801
}
18721802

1873-
.ui.header {
1874-
color: var(--color-text);
1875-
}
1876-
1877-
.ui.header .ui.label {
1878-
margin-left: 0.25rem;
1879-
}
1880-
1881-
.ui.header > .ui.label.compact {
1882-
margin-top: inherit;
1883-
}
1884-
1885-
.ui.header .sub.header {
1886-
color: var(--color-text-light-1);
1887-
}
1888-
18891803
.flash-error details code,
18901804
.flash-warning details code {
18911805
display: block;

web_src/css/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
@import "./modules/flexcontainer.css";
1616
@import "./modules/message.css";
1717
@import "./modules/container.css";
18+
@import "./modules/header.css";
1819

1920
@import "./shared/flex-list.css";
2021
@import "./shared/milestone.css";

web_src/css/modules/header.css

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
/* based on Fomantic UI header module, with just the parts extracted that we use. If you find any
2+
unused rules here after refactoring, please remove them. */
3+
4+
.ui.header {
5+
color: var(--color-text);
6+
border: none;
7+
margin: calc(2rem - 0.1428571428571429em) 0 1rem;
8+
padding: 0;
9+
font-family: var(--fonts-regular);
10+
font-weight: var(--font-weight-medium);
11+
line-height: 1.28571429;
12+
text-transform: none;
13+
}
14+
15+
.ui.header:first-child {
16+
margin-top: -0.14285714em;
17+
}
18+
19+
.ui.header:last-child {
20+
margin-bottom: 0;
21+
}
22+
23+
.ui.header .ui.label {
24+
margin-left: 0.25rem;
25+
vertical-align: middle;
26+
}
27+
28+
.ui.header > .ui.label.compact {
29+
margin-top: inherit;
30+
}
31+
32+
.ui.header .sub.header {
33+
display: block;
34+
font-weight: var(--font-weight-normal);
35+
padding: 0;
36+
margin: 0;
37+
font-size: 1rem;
38+
line-height: 1.2;
39+
color: var(--color-text-light-1);
40+
}
41+
42+
.ui.header > i.icon {
43+
display: table-cell;
44+
opacity: 1;
45+
font-size: 1.5em;
46+
padding-top: 0;
47+
vertical-align: middle;
48+
}
49+
50+
.ui.header > i.icon:only-child {
51+
display: inline-block;
52+
padding: 0;
53+
margin-right: 0.75rem;
54+
}
55+
56+
.ui.header + p {
57+
margin-top: 0;
58+
}
59+
60+
h2.ui.header {
61+
font-size: 1.71428571rem;
62+
}
63+
h2.ui.header .sub.header {
64+
font-size: 1.14285714rem;
65+
}
66+
67+
h4.ui.header {
68+
font-size: 1.07142857rem;
69+
}
70+
h4.ui.header .sub.header {
71+
font-size: 1rem;
72+
}
73+
74+
.ui.sub.header {
75+
padding: 0;
76+
margin-bottom: 0.14285714rem;
77+
font-weight: var(--font-weight-normal);
78+
font-size: 0.85714286em;
79+
}
80+
81+
.ui.icon.header svg {
82+
width: 3em;
83+
height: 3em;
84+
float: none;
85+
display: block;
86+
line-height: var(--line-height-default);
87+
padding: 0;
88+
margin: 0 auto 0.5rem;
89+
opacity: 1;
90+
}
91+
92+
.ui.header:not(h1,h2,h3,h4,h5,h6) {
93+
font-size: 1.28571429em;
94+
}
95+
96+
.ui.attached.header {
97+
position: relative;
98+
background: var(--color-box-header);
99+
padding: 0.78571429rem 1rem;
100+
margin: 0 -1px;
101+
border-radius: 0;
102+
border: 1px solid var(--color-secondary);
103+
}
104+
105+
.ui.attached:not(.top).header {
106+
border-top: none;
107+
}
108+
109+
.ui.top.attached.header {
110+
border-radius: 0.28571429rem 0.28571429rem 0 0;
111+
}
112+
113+
.ui.bottom.attached.header {
114+
border-radius: 0 0 0.28571429rem 0.28571429rem;
115+
}
116+
117+
.ui.attached.header:not(h1,h2,h3,h4,h5,h6) {
118+
font-size: 1em;
119+
}
120+
121+
/* fix misaligned right buttons on box headers */
122+
.ui.attached.header > .ui.right {
123+
position: absolute;
124+
right: 0.78571429rem;
125+
top: 0;
126+
bottom: 0;
127+
display: flex;
128+
align-items: center;
129+
gap: 0.25em;
130+
}
131+
132+
/* the default ".ui.attached.header > .ui.right" is only able to contain "tiny" buttons, other buttons are too large */
133+
.ui.attached.header > .ui.right .ui.tiny.button {
134+
padding: 6px 10px;
135+
font-weight: var(--font-weight-normal);
136+
}
137+
138+
/* if a .top.attached.header is followed by a .segment, add some margin */
139+
.ui.segments + .ui.top.attached.header,
140+
.ui.attached.segment + .ui.top.attached.header {
141+
margin-top: 1rem;
142+
}
143+
144+
.ui.dividing.header {
145+
border-bottom-color: var(--color-secondary);
146+
}
147+
148+
.ui.dividing.header .sub.header {
149+
padding-bottom: 0.21428571rem;
150+
}
151+
152+
.ui.dividing.header i.icon {
153+
margin-bottom: 0;
154+
}
155+
156+
.ui.error.header {
157+
background: var(--color-error-bg) !important;
158+
color: var(--color-error-text) !important;
159+
border-color: var(--color-error-border) !important;
160+
}
161+
162+
.ui.warning.header {
163+
background: var(--color-warning-bg) !important;
164+
color: var(--color-warning-text) !important;
165+
border-color: var(--color-warning-border) !important;
166+
}
167+
168+
.attention-header {
169+
padding: 0.5em 0.75em !important;
170+
color: var(--color-text) !important;
171+
}

0 commit comments

Comments
 (0)