Skip to content

Commit e1f5f83

Browse files
committed
fix
1 parent 948a9ee commit e1f5f83

File tree

3 files changed

+58
-71
lines changed

3 files changed

+58
-71
lines changed

templates/base/footer_content.tmpl

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,33 @@
11
<footer role="group" aria-label="{{.locale.Tr "aria.footer"}}">
2-
<div class="ui container">
3-
<div class="ui left" role="contentinfo" aria-label="{{.locale.Tr "aria.footer.software"}}">
4-
<a target="_blank" rel="noopener noreferrer" href="https://gitea.io">{{.locale.Tr "powered_by" "Gitea"}}</a>
5-
{{if (or .ShowFooterVersion .PageIsAdmin)}}
6-
{{.locale.Tr "version"}}:
7-
{{if .IsAdmin}}
8-
<a href="{{AppSubUrl}}/admin/config">{{AppVer}}</a>
9-
{{else}}
10-
{{AppVer}}
11-
{{end}}
12-
{{end}}
13-
{{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}}
14-
{{.locale.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong>
15-
{{.locale.Tr "template"}}{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong>
16-
{{end}}
17-
</div>
18-
<div class="ui right links" role="group" aria-label="{{.locale.Tr "aria.footer.links"}}">
19-
{{if .ShowFooterBranding}}
20-
<a target="_blank" rel="noopener noreferrer" href="https://github.com/go-gitea/gitea">{{svg "octicon-mark-github"}}<span class="sr-only">GitHub</span></a>
2+
<div class="ui left" role="contentinfo" aria-label="{{.locale.Tr "aria.footer.software"}}">
3+
<a target="_blank" rel="noopener noreferrer" href="https://gitea.io">{{.locale.Tr "powered_by" "Gitea"}}</a>
4+
{{if (or .ShowFooterVersion .PageIsAdmin)}}
5+
{{.locale.Tr "version"}}:
6+
{{if .IsAdmin}}
7+
<a href="{{AppSubUrl}}/admin/config">{{AppVer}}</a>
8+
{{else}}
9+
{{AppVer}}
2110
{{end}}
22-
<div class="ui dropdown upward language">
23-
<span>{{svg "octicon-globe"}} {{.locale.LangName}}</span>
24-
<div class="menu language-menu">
25-
{{range .AllLangs}}
26-
<a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq $.locale.Lang .Lang}}active selected{{end}}">{{.Name}}</a>
27-
{{end}}
28-
</div>
11+
{{end}}
12+
{{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}}
13+
{{.locale.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong>
14+
{{.locale.Tr "template"}}{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong>
15+
{{end}}
16+
</div>
17+
<div class="ui right links" role="group" aria-label="{{.locale.Tr "aria.footer.links"}}">
18+
{{if .ShowFooterBranding}}
19+
<a target="_blank" rel="noopener noreferrer" href="https://github.com/go-gitea/gitea">{{svg "octicon-mark-github"}}<span class="sr-only">GitHub</span></a>
20+
{{end}}
21+
<div class="ui dropdown upward language">
22+
<span>{{svg "octicon-globe"}} {{.locale.LangName}}</span>
23+
<div class="menu language-menu">
24+
{{range .AllLangs}}
25+
<a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq $.locale.Lang .Lang}}active selected{{end}}">{{.Name}}</a>
26+
{{end}}
2927
</div>
30-
<a href="{{AssetUrlPrefix}}/js/licenses.txt">{{.locale.Tr "licenses"}}</a>
31-
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
32-
{{template "custom/extra_links_footer" .}}
3328
</div>
29+
<a href="{{AssetUrlPrefix}}/js/licenses.txt">{{.locale.Tr "licenses"}}</a>
30+
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
31+
{{template "custom/extra_links_footer" .}}
3432
</div>
3533
</footer>

web_src/css/base.css

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,46 +1805,6 @@ img.ui.avatar,
18051805
color: var(--color-warning-text);
18061806
}
18071807

1808-
footer {
1809-
background-color: var(--color-footer);
1810-
border-top: 1px solid var(--color-secondary);
1811-
width: 100%;
1812-
flex-basis: 40px;
1813-
color: var(--color-text-light);
1814-
}
1815-
1816-
footer .container {
1817-
padding: 0 0.5rem;
1818-
max-width: 100%;
1819-
}
1820-
1821-
footer .container .links > * {
1822-
border-left: 1px solid var(--color-secondary-dark-1);
1823-
padding-left: 8px;
1824-
margin-left: 5px;
1825-
}
1826-
1827-
footer .container .links > *:first-child {
1828-
border-left: 0;
1829-
}
1830-
1831-
footer .ui.language .menu {
1832-
height: 500px;
1833-
max-height: calc(100vh - 60px);
1834-
overflow-y: auto;
1835-
margin-bottom: 7px;
1836-
}
1837-
1838-
footer .ui.language .svg {
1839-
margin-right: 0.15em;
1840-
margin-top: 1px;
1841-
}
1842-
1843-
footer .ui.left,
1844-
footer .ui.right {
1845-
line-height: 39px; /* there is a border-top on the footer, so make the line-height 1px less */
1846-
}
1847-
18481808
.center:not(.popup) {
18491809
text-align: center;
18501810
}

web_src/css/home.css

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,38 @@
4343
color: var(--color-green);
4444
}
4545

46+
47+
footer {
48+
background-color: var(--color-footer);
49+
border-top: 1px solid var(--color-secondary);
50+
line-height: 39px;
51+
flex-basis: 40px;
52+
color: var(--color-text-light);
53+
padding: 0 20px;
54+
}
55+
56+
footer .right.links {
57+
min-width: 180px; /* make sure the menu dropdown doesn't overflow horizontally when language name is short */
58+
}
59+
60+
footer .right.links > a {
61+
border-left: 1px solid var(--color-secondary-dark-1);
62+
padding-left: 8px;
63+
margin-left: 5px;
64+
}
65+
66+
footer .ui.dropdown.language .menu {
67+
height: 500px;
68+
max-height: calc(100vh - 60px);
69+
overflow-y: auto;
70+
margin-bottom: 10px;
71+
}
72+
73+
4674
@media (max-width: 880px) {
47-
footer .ui.container .left,
48-
footer .ui.container .right {
75+
footer .ui.left,
76+
footer .ui.right {
77+
width: 100%;
4978
display: block;
5079
text-align: center;
5180
float: none;

0 commit comments

Comments
 (0)