alpha
Login
or
Join now
4uffin.bsky.social
/
core
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
My own copy of Tangled :)
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
appview: fix line number alignment
author
Anirudh Oppiliappan
date
1 year ago
(Mar 17, 2025, 9:51 PM +0200)
commit
20f13e92
20f13e92e655a46a7abdbf324d9c07a574dc9006
parent
a113f9f4
a113f9f490a5958a7e71ef5ed126929f5de1ec43
+15
-15
1 changed file
Expand all
Collapse all
Unified
Split
appview
pages
templates
repo
blob.html
+15
-15
appview/pages/templates/repo/blob.html
Reviewed
···
4
4
{{ $lines := split .Contents }}
5
5
{{ $tot_lines := len $lines }}
6
6
{{ $tot_chars := len (printf "%d" $tot_lines) }}
7
7
-
{{ $code_number_style := "text-gray-400 left-0 bg-white text-right mr-6 select-none" }}
7
7
+
{{ $code_number_style := "text-gray-400 left-0 bg-white text-right mr-6 select-none inline-block w-12" }}
8
8
{{ $linkstyle := "no-underline hover:underline" }}
9
9
<div class="pb-2 text-base">
10
10
<div class="flex justify-between">
···
36
36
This is a binary file and will not be displayed.
37
37
</p>
38
38
{{ else }}
39
39
-
<div class="overflow-auto relative text-ellipsis">
40
40
-
{{ range $idx, $line := $lines }}
41
41
-
{{ $linenr := add $idx 1 }}
42
42
-
<div class="flex">
43
43
-
<a href="#L{{ $linenr }}" id="L{{ $linenr }}" class="no-underline peer">
44
44
-
<span class="{{ $code_number_style }}"
45
45
-
style="min-width: {{ $tot_chars }}ch;" >
46
46
-
{{ $linenr }}
47
47
-
</span>
48
48
-
</a>
49
49
-
<div class="whitespace-pre peer-target:bg-yellow-200">{{ $line | escapeHtml }}</div>
50
50
-
</div>
51
51
-
{{ end }}
52
52
-
</div>
39
39
+
<div class="overflow-auto relative text-ellipsis">
40
40
+
{{ range $idx, $line := $lines }}
41
41
+
{{ $linenr := add $idx 1 }}
42
42
+
<div class="flex">
43
43
+
<a href="#L{{ $linenr }}" id="L{{ $linenr }}" class="no-underline peer">
44
44
+
<span class="{{ $code_number_style }}"
45
45
+
style="min-width: {{ $tot_chars }}ch;">
46
46
+
{{ $linenr }}
47
47
+
</span>
48
48
+
</a>
49
49
+
<div class="whitespace-pre peer-target:bg-yellow-200">{{ $line | escapeHtml }}</div>
50
50
+
</div>
51
51
+
{{ end }}
52
52
+
</div>
53
53
{{ end }}
54
54
{{ end }}