Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use flex-container for dashboard layout #30214

Merged
merged 6 commits into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions templates/user/dashboard/dashboard.tmpl
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content dashboard feeds">
{{template "user/dashboard/navbar" .}}
<div class="ui container">
<div class="ui container flex-container">
{{template "base/alert" .}}
<div class="ui mobile reversed stackable grid">
<div class="ui container ten wide column">
{{template "user/heatmap" .}}
{{template "user/dashboard/feeds" .}}
</div>
{{template "user/dashboard/repolist" .}}
<div class="flex-container-main">
{{template "user/heatmap" .}}
{{template "user/dashboard/feeds" .}}
</div>
{{template "user/dashboard/repolist" .}}
</div>
</div>
{{template "base/footer" .}}
2 changes: 1 addition & 1 deletion templates/user/dashboard/repolist.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ data.organizationId = {{.ContextUser.ID}};
window.config.pageData.dashboardRepoList = data;
</script>

<div id="dashboard-repo-list" class="six wide column"></div>
<div id="dashboard-repo-list" class="flex-container-sidebar"></div>
10 changes: 9 additions & 1 deletion web_src/css/modules/flexcontainer.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
margin-top: var(--page-spacing);
}

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

/* wide sidebar on the right, used in frontpage */
.flex-container-sidebar {
width: 35%;
}

.flex-container-main {
flex: 1;
min-width: 0; /* make the "text truncate" work, otherwise the flex axis is not limited and the text just overflows */
Expand All @@ -19,7 +25,9 @@
.flex-container {
flex-direction: column;
}
.flex-container-nav {
.flex-container-nav,
.flex-container-sidebar {
order: -1;
width: auto;
}
}