mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Add word-break to repo description in home page (#27924)
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:  mobile view:  After: desktop view:  mobile view(almost same?)  --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
		@@ -5,7 +5,7 @@
 | 
				
			|||||||
		{{template "base/alert" .}}
 | 
							{{template "base/alert" .}}
 | 
				
			||||||
		{{template "repo/code/recently_pushed_new_branches" .}}
 | 
							{{template "repo/code/recently_pushed_new_branches" .}}
 | 
				
			||||||
		{{if and (not .HideRepoInfo) (not .IsBlame)}}
 | 
							{{if and (not .HideRepoInfo) (not .IsBlame)}}
 | 
				
			||||||
		<div class="ui repo-description">
 | 
							<div class="ui repo-description gt-word-break">
 | 
				
			||||||
			<div id="repo-desc" class="gt-font-16">
 | 
								<div id="repo-desc" class="gt-font-16">
 | 
				
			||||||
				{{$description := .Repository.DescriptionHTML $.Context}}
 | 
									{{$description := .Repository.DescriptionHTML $.Context}}
 | 
				
			||||||
				{{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}}
 | 
									{{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}}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -211,14 +211,14 @@
 | 
				
			|||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  justify-content: space-between;
 | 
					  justify-content: space-between;
 | 
				
			||||||
  align-items: center;
 | 
					  align-items: center;
 | 
				
			||||||
 | 
					  gap: 5px;
 | 
				
			||||||
  margin-bottom: 5px;
 | 
					  margin-bottom: 5px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@media (max-width: 767.68px) {
 | 
					@media (max-width: 767.98px) {
 | 
				
			||||||
  .repository.file.list .repo-description {
 | 
					  .repository.file.list .repo-description {
 | 
				
			||||||
    flex-direction: column;
 | 
					    flex-direction: column;
 | 
				
			||||||
    gap: 8px;
 | 
					    align-items: stretch;
 | 
				
			||||||
    align-items: normal;
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user