forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

allow linking line numbers

Changed files
+12 -16
appview
pages
templates
repo
+8 -6
appview/pages/templates/repo/blob.html
···
{{ else }}
<div class="overflow-auto relative text-ellipsis">
{{ range $idx, $line := $lines }}
+
{{ $linenr := add $idx 1 }}
<div class="flex">
-
<span
-
class="{{ $code_number_style }}"
-
style="min-width: {{ $tot_chars }}ch;"
-
>{{ add $idx 1 }}</span
-
>
-
<div class="whitespace-pre">{{ $line | escapeHtml }}</div>
+
<a href="#L{{ $linenr }}" id="L{{ $linenr }}" class="no-underline peer">
+
<span class="{{ $code_number_style }}"
+
style="min-width: {{ $tot_chars }}ch;" >
+
{{ $linenr }}
+
</span>
+
</a>
+
<div class="whitespace-pre peer-target:bg-yellow-200">{{ $line | escapeHtml }}</div>
</div>
{{ end }}
</div>
+4 -10
appview/pages/templates/repo/issues/issue.html
···
{{ $icon = "circle-dot" }}
{{ end }}
-
<section>
-
<div class="flex items-center gap-2">
-
<div
-
id="state"
-
class="inline-flex items-center rounded px-3 py-1 {{ $bgColor }}"
-
>
-
<i
-
data-lucide="{{ $icon }}"
-
class="w-4 h-4 mr-1.5 text-white"
-
></i>
+
<div class="inline-flex items-center gap-2">
+
<div id="state"
+
class="inline-flex items-center rounded px-3 py-1 {{ $bgColor }} text-sm">
+
<i data-lucide="{{ $icon }}" class="w-4 h-4 mr-1.5 text-white" ></i>
<span class="text-white">{{ .State }}</span>
</div>
<span class="text-gray-400 text-sm">