Skip to content

Commit

Permalink
Repo homepage styling tweaks (#33289) (#33381)
Browse files Browse the repository at this point in the history
Backport #33289 by @silverwind

Reduce it to a value that results in `.repo-home-sidebar-top` and
`.repo-home-sidebar-bottom` having 240px content width, the same as
GitHub.

Co-authored-by: silverwind <me@silverwind.io>
  • Loading branch information
GiteaBot and silverwind authored Jan 24, 2025
1 parent a3c5358 commit 12347f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion templates/repo/home_sidebar_top.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="repo-home-sidebar-top">
<form class="ignore-dirty tw-flex tw-flex-1 tw-mt-1" action="{{.RepoLink}}/search" method="get">
<form class="ignore-dirty tw-flex tw-flex-1" action="{{.RepoLink}}/search" method="get">
<div class="ui small action input tw-flex-1">
<input name="q" size="10" placeholder="{{ctx.Locale.Tr "search.code_kind"}}"> {{template "shared/search/button"}}
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/sub_menu.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{if and (not .HideRepoInfo) (not .IsBlame)}}
<div class="ui segments repository-summary tw-mt-1 tw-mb-0">
<div class="ui segments repository-summary tw-my-0">
<div class="ui segment sub-menu repository-menu">
{{if and (.Permission.CanRead ctx.Consts.RepoUnitTypeCode) (not .IsEmptyRepo)}}
<a class="item muted {{if .PageIsCommits}}active{{end}}" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">
Expand Down
5 changes: 2 additions & 3 deletions web_src/css/repo/home.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.repo-grid-filelist-sidebar {
display: grid;
grid-template-columns: auto 300px;
grid-template-columns: auto 280px;
grid-template-rows: auto auto 1fr;
gap: var(--page-spacing);
}

.repo-home-filelist {
Expand All @@ -13,13 +14,11 @@
.repo-home-sidebar-top {
grid-column: 2;
grid-row: 1;
padding-left: 1em;
}

.repo-home-sidebar-bottom {
grid-column: 2;
grid-row: 2;
padding-left: 1em;
}

.repo-home-sidebar-bottom .flex-list > :first-child {
Expand Down

0 comments on commit 12347f0

Please sign in to comment.