Skip to content

Commit 044cc16

Browse files
silverwindGiteaBot
andauthored
Use flex-container for dashboard layout (#30214)
Added new class `flex-container-sidebar` to cover the dashboard sidebar. Previously this was 37.5% with more padding. Now there is less empty space between the two columns and this matches other pages like repo or admin settings page. Desktop: <img width="1345" alt="Screenshot 2024-03-31 at 15 11 36" src="https://github.com/go-gitea/gitea/assets/115237/717389d9-d42c-466e-a8fe-e968f79447fd"> Mobile: <img width="444" alt="Screenshot 2024-03-31 at 15 11 44" src="https://github.com/go-gitea/gitea/assets/115237/7faa840b-513a-411b-bf2d-26d52b9b71a0"> --------- Co-authored-by: Giteabot <[email protected]>
1 parent 4b1063f commit 044cc16

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
{{template "base/head" .}}
22
<div role="main" aria-label="{{.Title}}" class="page-content dashboard feeds">
33
{{template "user/dashboard/navbar" .}}
4-
<div class="ui container">
4+
<div class="ui container flex-container">
55
{{template "base/alert" .}}
6-
<div class="ui mobile reversed stackable grid">
7-
<div class="ui container ten wide column">
8-
{{template "user/heatmap" .}}
9-
{{template "user/dashboard/feeds" .}}
10-
</div>
11-
{{template "user/dashboard/repolist" .}}
6+
<div class="flex-container-main">
7+
{{template "user/heatmap" .}}
8+
{{template "user/dashboard/feeds" .}}
129
</div>
10+
{{template "user/dashboard/repolist" .}}
1311
</div>
1412
</div>
1513
{{template "base/footer" .}}

templates/user/dashboard/repolist.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ data.organizationId = {{.ContextUser.ID}};
5656
window.config.pageData.dashboardRepoList = data;
5757
</script>
5858

59-
<div id="dashboard-repo-list" class="six wide column"></div>
59+
<div id="dashboard-repo-list" class="flex-container-sidebar"></div>

web_src/css/modules/flexcontainer.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
margin-top: var(--page-spacing);
77
}
88

9+
/* small options menu on the left, used in settings/admin pages */
910
.flex-container-nav {
1011
width: 240px;
1112
}
1213

14+
/* wide sidebar on the right, used in frontpage */
15+
.flex-container-sidebar {
16+
width: 35%;
17+
}
18+
1319
.flex-container-main {
1420
flex: 1;
1521
min-width: 0; /* make the "text truncate" work, otherwise the flex axis is not limited and the text just overflows */
@@ -19,7 +25,9 @@
1925
.flex-container {
2026
flex-direction: column;
2127
}
22-
.flex-container-nav {
28+
.flex-container-nav,
29+
.flex-container-sidebar {
30+
order: -1;
2331
width: auto;
2432
}
2533
}

0 commit comments

Comments
 (0)