forked from tangled.org/core
Monorepo for Tangled

appview: commits: ensure overflow-x on filenames

anirudh.fi 2a1555ba e37f688d

verified
Changed files
+17 -13
appview
pages
templates
fragments
repo
+7 -5
appview/pages/templates/fragments/diff.html
··· 17 17 <details open> 18 18 <summary class="list-none cursor-pointer sticky top-0"> 19 19 <div id="diff-file-header" class="rounded cursor-pointer bg-white dark:bg-gray-800 flex justify-between"> 20 - <div id="left-side-items" class="p-2 flex gap-2 items-center"> 20 + <div id="left-side-items" class="p-2 flex gap-2 items-center overflow-x-auto" style="direction: rtl;"> 21 21 {{ $markerstyle := "diff-type p-1 mr-1 font-mono text-sm rounded select-none" }} 22 22 23 + <div class="flex gap-2 items-center" style="direction: ltr;"> 23 24 {{ if .IsNew }} 24 25 <span class="bg-green-100 text-green-700 dark:bg-green-800/50 dark:text-green-400 {{ $markerstyle }}">ADDED</span> 25 26 {{ else if .IsDelete }} ··· 33 34 {{ end }} 34 35 35 36 {{ if .IsDelete }} 36 - <a class="dark:text-white" {{if $this }}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}"{{end}}> 37 + <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this }}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}"{{end}}> 37 38 {{ .Name.Old }} 38 39 </a> 39 40 {{ else if (or .IsCopy .IsRename) }} 40 - <a class="dark:text-white" {{if $parent}}href="/{{ $repo }}/blob/{{ $parent }}/{{ .Name.Old }}"{{end}}> 41 + <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $parent}}href="/{{ $repo }}/blob/{{ $parent }}/{{ .Name.Old }}"{{end}}> 41 42 {{ .Name.Old }} 42 43 </a> 43 44 {{ i "arrow-right" "w-4 h-4" }} 44 - <a class="dark:text-white" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}> 45 + <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}> 45 46 {{ .Name.New }} 46 47 </a> 47 48 {{ else }} 48 - <a class="dark:text-white" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}> 49 + <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}> 49 50 {{ .Name.New }} 50 51 </a> 51 52 {{ end }} 53 + </div> 52 54 </div> 53 55 54 56 {{ $iconstyle := "p-1 mx-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded" }}
+10 -8
appview/pages/templates/repo/commit.html
··· 46 46 <div class="diff-stat"> 47 47 <br> 48 48 <strong class="text-sm uppercase mb-4 dark:text-gray-200">Changed files</strong> 49 - {{ range $diff }} 50 - <ul class="dark:text-gray-200"> 51 - {{ if .IsDelete }} 52 - <li><a href="#file-{{ .Name.Old }}" class="dark:hover:text-gray-300">{{ .Name.Old }}</a></li> 53 - {{ else }} 54 - <li><a href="#file-{{ .Name.New }}" class="dark:hover:text-gray-300">{{ .Name.New }}</a></li> 49 + <div class="overflow-x-auto"> 50 + {{ range $diff }} 51 + <ul class="dark:text-gray-200"> 52 + {{ if .IsDelete }} 53 + <li><a href="#file-{{ .Name.Old }}" class="dark:hover:text-gray-300">{{ .Name.Old }}</a></li> 54 + {{ else }} 55 + <li><a href="#file-{{ .Name.New }}" class="dark:hover:text-gray-300">{{ .Name.New }}</a></li> 56 + {{ end }} 57 + </ul> 55 58 {{ end }} 56 - </ul> 57 - {{ end }} 59 + </div> 58 60 </div> 59 61 </section> 60 62