Skip to content

Commit d021c88

Browse files
authored
Reduce margins on admin pages (#26026)
Reduce margins around admin boxes and reduce sidebar size from 275px to 240px. This is the same 16px margin we use on issue pages. Before and After: <img width="1270" alt="Screenshot 2023-07-21 at 00 28 11" src="https://github.com/go-gitea/gitea/assets/115237/f9b0dcb0-8f7e-49b4-b130-54bf31c142fd"> <img width="1271" alt="Screenshot 2023-07-21 at 00 30 51" src="https://github.com/go-gitea/gitea/assets/115237/ddd75d59-9ab9-4061-8989-852e89727560">
1 parent f3d293d commit d021c88

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

templates/admin/layout_head.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{{template "base/head" .ctxData}}
22
<div role="main" aria-label="{{.ctxData.Title}}" class="page-content {{.pageClass}}">
3-
<div class="ui container stackable grid">
3+
<div class="ui container admin-container">
44
{{template "admin/navbar" .ctxData}}
5-
<div class="twelve wide column">
5+
<div class="admin-main">
66
{{template "base/alert" .ctxData}}
77
{{/* block: admin-setting-content */}}
88

templates/admin/navbar.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="four wide column">
1+
<div class="admin-nav">
22
<div class="ui fluid vertical menu">
33
<div class="header item">{{.locale.Tr "settings"}}</div>
44
<a class="{{if .PageIsAdminDashboard}}active {{end}}item" href="{{AppSubUrl}}/admin">

web_src/css/admin.css

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
.admin-container {
2+
display: flex !important;
3+
gap: 16px;
4+
}
5+
6+
.admin-nav {
7+
width: 240px;
8+
}
9+
10+
.admin-main {
11+
flex: 1;
12+
}
13+
14+
@media (max-width: 767.98px) {
15+
.admin-container {
16+
flex-direction: column;
17+
}
18+
.admin-nav {
19+
width: auto;
20+
}
21+
}
22+
123
.admin.hooks .list > .item:not(:first-child) {
224
border-top: 1px solid var(--color-secondary);
325
padding: 0.25rem 1rem;

0 commit comments

Comments
 (0)