Skip to content

Commit 9e7811e

Browse files
silverwindGiteaBot
authored andcommitted
Repo homepage styling tweaks (go-gitea#33289)
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. Before: <img width="1333" alt="Screenshot 2025-01-15 at 18 28 34" src="https://github.com/user-attachments/assets/cf0fa21b-87be-40e3-a6cd-26d146bce9cc" /> After: <img width="1330" alt="Screenshot 2025-01-15 at 18 28 27" src="https://github.com/user-attachments/assets/28acd837-10f4-4176-b8a0-510cd28c8b8d" />
1 parent a3c5358 commit 9e7811e

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

templates/repo/home_sidebar_top.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="repo-home-sidebar-top">
2-
<form class="ignore-dirty tw-flex tw-flex-1 tw-mt-1" action="{{.RepoLink}}/search" method="get">
2+
<form class="ignore-dirty tw-flex tw-flex-1" action="{{.RepoLink}}/search" method="get">
33
<div class="ui small action input tw-flex-1">
44
<input name="q" size="10" placeholder="{{ctx.Locale.Tr "search.code_kind"}}"> {{template "shared/search/button"}}
55
</div>

templates/repo/sub_menu.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{if and (not .HideRepoInfo) (not .IsBlame)}}
2-
<div class="ui segments repository-summary tw-mt-1 tw-mb-0">
2+
<div class="ui segments repository-summary tw-my-0">
33
<div class="ui segment sub-menu repository-menu">
44
{{if and (.Permission.CanRead ctx.Consts.RepoUnitTypeCode) (not .IsEmptyRepo)}}
55
<a class="item muted {{if .PageIsCommits}}active{{end}}" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">

web_src/css/repo/home.css

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
.repo-grid-filelist-sidebar {
22
display: grid;
3-
grid-template-columns: auto 300px;
3+
grid-template-columns: auto 280px;
44
grid-template-rows: auto auto 1fr;
5+
gap: var(--page-spacing);
56
}
67

78
.repo-home-filelist {
@@ -13,13 +14,11 @@
1314
.repo-home-sidebar-top {
1415
grid-column: 2;
1516
grid-row: 1;
16-
padding-left: 1em;
1717
}
1818

1919
.repo-home-sidebar-bottom {
2020
grid-column: 2;
2121
grid-row: 2;
22-
padding-left: 1em;
2322
}
2423

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

0 commit comments

Comments
 (0)