forked from tangled.org/core
this repo has no description

appview/templates: get rid of nbsp & middle dots

anirudh.fi 6d13f220 f5b6793a

verified
Changed files
+26 -33
appview
pages
+5 -3
appview/pages/templates/repo/blob.html
···
{{ end }}
</div>
<div id="file-info">
-
<span class="text-gray-500 text-xs">
{{ .Lines }} lines
-
&nbsp;·&nbsp;
+
<span class="select-none px-2 [&:before]:content-['·']"></span>
{{ byteFmt .SizeHint }}
-
</span>
</div>
</div>
</div>
+
{{ if eq .Lines 0 }}
+
<p class="text-center text-gray-400">This file is empty.</p>
+
{{ else }}
{{ if .IsBinary }}<p class="text-center text-gray-400">This is a binary file and will not be displayed.</p>{{ else }}
<pre class="font-mono text-sm overflow-auto relative text-ellipsis"><code>{{ range $idx, $line := $lines }}<span class="flex">
<span class="{{ $code_number_style }}" style="min-width: {{$tot_chars}}ch;">{{ add $idx 1 }}</span>
<span class="whitespace-pre">{{ escapeHtml $line }}</span></span>{{ else }}<em class="text-gray-400">this file is empty</em>{{ end }}</code></pre>{{ end}}
{{ end }}
+
{{ end }}
+9 -18
appview/pages/templates/repo/commit.html
···
</div>
<p class="text-sm text-gray-500">
-
<a href="mailto:{{ $commit.Author.Email }}" class="no-underline hover:underline text-gray-500">
-
{{ $commit.Author.Name }}
-
</a>
-
&nbsp;·&nbsp;
+
<a href="mailto:{{ $commit.Author.Email }}" class="no-underline hover:underline text-gray-500">{{ $commit.Author.Name }}</a>
+
<span class="px-1 select-none before:content-['\00B7']"></span>
{{ timeFmt $commit.Author.When }}
-
&nbsp;·&nbsp;
+
<span class="px-1 select-none before:content-['\00B7']"></span>
<span class="font-mono">{{ $stat.FilesChanged }}</span> files <span class="font-mono">(+{{ $stat.Insertions }}, -{{ $stat.Deletions }})</span>
-
&nbsp;·&nbsp;
-
<a href="/{{ $repo }}/commit/{{ $commit.This }}" class="no-underline hover:underline text-gray-500">
-
{{ slice $commit.This 0 8 }}
-
</a>
+
<span class="px-1 select-none before:content-['\00B7']"></span>
+
<a href="/{{ $repo }}/commit/{{ $commit.This }}" class="no-underline hover:underline text-gray-500">{{ slice $commit.This 0 8 }}</a>
{{ if $commit.Parent }}
-
&lt;--
-
<a href="/{{ $repo }}/commit/{{ $commit.Parent }}" class="no-underline hover:underline text-gray-500">
-
{{ slice $commit.Parent 0 8 }}
-
</a>
+
<span class="select-none">&LeftArrow;</span>
+
<a href="/{{ $repo }}/commit/{{ $commit.Parent }}" class="no-underline hover:underline text-gray-500">{{ slice $commit.Parent 0 8 }}</a>
{{ end }}
</p>
-
<div class="diff-stat">
<br>
<strong>jump to</strong>
···
<div id="right-side-items" class="p-2">
<a href="#file-{{ .Name.New }}" class="no-underline hover:underline">top of file</a>
-
{{ if gt $idx 0 }}
-
&nbsp;·&nbsp;
+
<span class="px-1 select-none before:content-['\00B7']"></span>
{{ $prev := index $diff (sub $idx 1) }}
<a href="#file-{{ $prev.Name.New }}" class="no-underline hover:underline">prev</a>
{{ end }}
-
{{ if lt $idx $last }}
-
&nbsp;·&nbsp;
+
<span class="px-1 select-none before:content-['\00B7']"></span>
{{ $next := index $diff (add $idx 1) }}
<a href="#file-{{ $next.Name.New }}" class="no-underline hover:underline">next</a>
{{ end }}
+10 -10
appview/pages/templates/repo/index.html
···
href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}"
class="text-gray-500 no-underline hover:underline"
>{{ slice .Hash.String 0 8 }}</a
-
>
-
</span>
-
&nbsp;·&nbsp;
-
<span>
-
<a
+
>
+
</span>
+
<span class="mx-2 before:content-['·'] before:select-none"></span>
+
<span>
+
<a
href="mailto:{{ .Author.Email }}"
class="text-gray-500 no-underline hover:underline"
>{{ .Author.Name }}</a
-
>
-
</span>
-
&nbsp;·&nbsp;
-
<span>{{ timeFmt .Author.When }}</span>
-
</div>
+
>
+
</span>
+
<div class="inline-block px-1 select-none after:content-['·']"></div>
+
<span>{{ timeFmt .Author.When }}</span>
+
</div>
</div>
{{ end }}
</div>
+2 -2
appview/pages/templates/repo/tree.html
···
{{ if eq $stats.NumFolders 1 }}
{{ $stats.NumFolders }} folder
-
&nbsp;·&nbsp;
+
<span class="px-1 select-none">·</span>
{{ else if gt $stats.NumFolders 1 }}
{{ $stats.NumFolders }} folders
-
&nbsp;·&nbsp;
+
<span class="px-1 select-none">·</span>
{{ end }}
{{ if eq $stats.NumFiles 1 }}