Skip to content

Commit 46ac04c

Browse files
GiteaBotyp05327silverwind
authored
Add word-break to repo description in home page (#27924) (#27957)
Backport #27924 by @yp05327 In #25315, @denyskon fixed UI on mobile view. But for the repo description, on desktop view there's no word-break. So maybe we can just add `gt-word-break` to fix it on both mobile view and desktop view. Before: desktop view: ![image](https://github.com/go-gitea/gitea/assets/18380374/a7659f5b-fbe9-400a-8cc2-cca44778556e) mobile view: ![image](https://github.com/go-gitea/gitea/assets/18380374/611f1b81-58ac-4213-b165-5c73e24ca79e) After: desktop view: ![image](https://github.com/go-gitea/gitea/assets/18380374/f21bf3a7-f6aa-457d-9bfa-5c57659c68b1) mobile view(almost same?) ![image](https://github.com/go-gitea/gitea/assets/18380374/ad2d1a4d-1172-402c-b5fc-5e910657847d) Co-authored-by: yp05327 <[email protected]> Co-authored-by: silverwind <[email protected]>
1 parent cc7b9eb commit 46ac04c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/repo/home.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{template "base/alert" .}}
66
{{template "repo/code/recently_pushed_new_branches" .}}
77
{{if and (not .HideRepoInfo) (not .IsBlame)}}
8-
<div class="ui repo-description">
8+
<div class="ui repo-description gt-word-break">
99
<div id="repo-desc" class="gt-font-16">
1010
{{$description := .Repository.DescriptionHTML $.Context}}
1111
{{if $description}}<span class="description">{{$description | RenderCodeBlock}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{ctx.Locale.Tr "repo.no_desc"}}</span>{{end}}

web_src/css/repo.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,14 @@
211211
display: flex;
212212
justify-content: space-between;
213213
align-items: center;
214+
gap: 5px;
214215
margin-bottom: 5px;
215216
}
216217

217-
@media (max-width: 767.68px) {
218+
@media (max-width: 767.98px) {
218219
.repository.file.list .repo-description {
219220
flex-direction: column;
220-
gap: 8px;
221-
align-items: normal;
221+
align-items: stretch;
222222
}
223223
}
224224

0 commit comments

Comments
 (0)