loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use unique class for breadcrumb divider (#26524)

Fix regression from https://github.com/go-gitea/gitea/pull/25539:
https://github.com/go-gitea/gitea/pull/26519#issuecomment-1678825200.

Before:
<img width="429" alt="Screenshot 2023-08-15 at 15 46 12"
src="https://github.com/go-gitea/gitea/assets/115237/a818f60a-77a2-48fe-8e6f-363d152ccb1e">

After:
<img width="424" alt="Screenshot 2023-08-15 at 15 46 19"
src="https://github.com/go-gitea/gitea/assets/115237/c90159e2-ced2-4a74-8a0f-a1b2b5d0b565">

<img width="605" alt="Screenshot 2023-08-15 at 15 56 11"
src="https://github.com/go-gitea/gitea/assets/115237/3ded6f57-86f4-422a-86cb-56dd2c216dee">

authored by

silverwind and committed by
GitHub
3e044d2c bc930f33

+15 -10
+1 -1
templates/repo/editor/cherry_pick.tmpl
··· 18 18 {{.locale.Tr "repo.editor.cherry_pick" $shalink | Str2html}} 19 19 {{end}} 20 20 <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a> 21 - <div class="divider">:</div> 21 + <div class="breadcrumb-divider">:</div> 22 22 <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a> 23 23 <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$shaurl}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span> 24 24 </div>
+1 -1
templates/repo/editor/edit.tmpl
··· 13 13 {{$n := len .TreeNames}} 14 14 {{$l := Eval $n "-" 1}} 15 15 {{range $i, $v := .TreeNames}} 16 - <div class="divider"> / </div> 16 + <div class="breadcrumb-divider">/</div> 17 17 {{if eq $i $l}} 18 18 <input id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.EditorconfigJson}}" required autofocus> 19 19 <span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
+1 -1
templates/repo/editor/patch.tmpl
··· 11 11 <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}"> 12 12 {{.locale.Tr "repo.editor.patching"}} 13 13 <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a> 14 - <div class="divider">:</div> 14 + <div class="breadcrumb-divider">:</div> 15 15 <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a> 16 16 <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span> 17 17 <input type="hidden" id="tree_path" name="tree_path" value="" required>
+1 -1
templates/repo/editor/upload.tmpl
··· 11 11 {{$n := len .TreeNames}} 12 12 {{$l := Eval $n "-" 1}} 13 13 {{range $i, $v := .TreeNames}} 14 - <div class="divider"> / </div> 14 + <div class="breadcrumb-divider">/</div> 15 15 {{if eq $i $l}} 16 16 <input type="text" id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.add_subdir"}}" autofocus> 17 17 <span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
+1 -1
templates/repo/home.tmpl
··· 113 113 <span class="breadcrumb repo-path gt-ml-2"> 114 114 <a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{StringUtils.EllipsisString .Repository.Name 30}}</a> 115 115 {{- range $i, $v := .TreeNames -}} 116 - <span class="divider">/</span> 116 + <span class="breadcrumb-divider">/</span> 117 117 {{- if eq $i $l -}} 118 118 <span class="active section" title="{{$v}}">{{StringUtils.EllipsisString $v 30}}</span> 119 119 {{- else -}}
+8 -3
web_src/css/modules/breadcrumb.css
··· 1 - .breadcrumb .divider { 1 + .breadcrumb { 2 + display: flex; 3 + flex-wrap: wrap; 4 + align-items: center; 5 + gap: 3px; 6 + } 7 + 8 + .breadcrumb .breadcrumb-divider { 2 9 color: var(--color-text-light-2); 3 - margin-left: 3px; 4 - margin-right: 3px; 5 10 } 6 11 7 12 .breadcrumb > * {
+2 -2
web_src/js/features/repo-editor.js
··· 114 114 if (i < parts.length - 1) { 115 115 if (value.length) { 116 116 $(`<span class="section"><a href="#">${htmlEscape(value)}</a></span>`).insertBefore($(this)); 117 - $('<div class="divider"> / </div>').insertBefore($(this)); 117 + $('<div class="breadcrumb-divider">/</div>').insertBefore($(this)); 118 118 } 119 119 } else { 120 120 $(this).val(value); ··· 132 132 // Jump back to last directory once the filename is empty 133 133 if (e.code === 'Backspace' && getCursorPosition($(this)) === 0 && $section.length > 0) { 134 134 e.preventDefault(); 135 - const $divider = $('.breadcrumb div.divider'); 135 + const $divider = $('.breadcrumb .breadcrumb-divider'); 136 136 const value = $section.last().find('a').text(); 137 137 $(this).val(value + $(this).val()); 138 138 this.setSelectionRange(value.length, value.length);