A vibe coded tangled fork which supports pijul.
1{{ define "title" }}{{ .Path }} at {{ .Ref }} · {{ .RepoInfo.FullName }}{{ end }}
2
3{{ define "extrameta" }}
4 {{ template "repo/fragments/meta" . }}
5
6 {{ $title := printf "%s at %s · %s" .Path .Ref .RepoInfo.FullName }}
7 {{ $url := printf "https://tangled.org/%s/blob/%s/%s" .RepoInfo.FullName .Ref .Path }}
8
9 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
10
11{{ end }}
12
13{{ define "repoContent" }}
14 {{ $linkstyle := "no-underline hover:underline" }}
15
16 <div class="pb-2 mb-3 text-base border-b border-gray-200 dark:border-gray-700">
17 <div class="flex flex-col md:flex-row md:justify-between gap-2">
18 <div id="breadcrumbs" class="overflow-x-auto whitespace-nowrap text-gray-400 dark:text-gray-500">
19 {{ range $idx, $value := .BreadCrumbs }}
20 {{ if ne $idx (sub (len $.BreadCrumbs) 1) }}
21 <a
22 href="{{ index . 1 }}"
23 class="text-bold text-gray-500 dark:text-gray-400 {{ $linkstyle }}"
24 >{{ pathUnescape (index . 0) }}</a
25 >
26 /
27 {{ else }}
28 <span class="text-bold text-black dark:text-white"
29 >{{ pathUnescape (index . 0) }}</span
30 >
31 {{ end }}
32 {{ end }}
33 </div>
34 <div id="file-info" class="text-gray-500 dark:text-gray-400 text-xs md:text-sm flex flex-wrap items-center gap-1 md:gap-0">
35 <span>at <a href="/{{ .RepoInfo.FullName }}/tree/{{ .Ref }}">{{ .Ref }}</a></span>
36
37 {{ if .BlobView.ShowingText }}
38 <span class="select-none px-1 md:px-2 [&:before]:content-['·']"></span>
39 <span>{{ .BlobView.Lines }} lines</span>
40 {{ end }}
41
42 {{ if .BlobView.SizeHint }}
43 <span class="select-none px-1 md:px-2 [&:before]:content-['·']"></span>
44 <span>{{ byteFmt .BlobView.SizeHint }}</span>
45 {{ end }}
46
47 {{ if .BlobView.HasRawView }}
48 <span class="select-none px-1 md:px-2 [&:before]:content-['·']"></span>
49 <a href="/{{ .RepoInfo.FullName }}/raw/{{ .Ref }}/{{ .Path }}">view raw</a>
50 {{ end }}
51
52 {{ if .BlobView.ShowToggle }}
53 <span class="select-none px-1 md:px-2 [&:before]:content-['·']"></span>
54 <a href="/{{ .RepoInfo.FullName }}/blob/{{ .Ref }}/{{ .Path }}?code={{ .BlobView.ShowingRendered }}" hx-boost="true">
55 view {{ if .BlobView.ShowingRendered }}code{{ else }}rendered{{ end }}
56 </a>
57 {{ end }}
58 </div>
59 </div>
60 </div>
61
62 {{ if .LastCommitInfo }}
63 {{ template "repo/fragments/lastCommitPanel" $ }}
64 {{ end }}
65
66 {{ if .BlobView.IsUnsupported }}
67 <p class="text-center text-gray-400 dark:text-gray-500">
68 Previews are not supported for this file type.
69 </p>
70 {{ else if .BlobView.ContentType.IsSubmodule }}
71 <p class="text-center text-gray-400 dark:text-gray-500">
72 This directory is a git submodule of <a href="{{ .BlobView.ContentSrc }}">{{ .BlobView.ContentSrc }}</a>.
73 </p>
74 {{ else if .BlobView.ContentType.IsImage }}
75 <div class="text-center">
76 <img src="{{ .BlobView.ContentSrc }}"
77 alt="{{ .Path }}"
78 class="max-w-full h-auto mx-auto border border-gray-200 dark:border-gray-700 rounded" />
79 </div>
80 {{ else if .BlobView.ContentType.IsVideo }}
81 <div class="text-center">
82 <video controls class="max-w-full h-auto mx-auto border border-gray-200 dark:border-gray-700 rounded">
83 <source src="{{ .BlobView.ContentSrc }}">
84 Your browser does not support the video tag.
85 </video>
86 </div>
87 {{ else if .BlobView.ContentType.IsSvg }}
88 <div class="overflow-auto relative">
89 {{ if .BlobView.ShowingRendered }}
90 <div class="text-center">
91 <img src="{{ .BlobView.ContentSrc }}"
92 alt="{{ .Path }}"
93 class="max-w-full h-auto mx-auto border border-gray-200 dark:border-gray-700 rounded" />
94 </div>
95 {{ else }}
96 <div id="blob-contents" class="whitespace-pre peer-target:bg-yellow-200 dark:peer-target:bg-yellow-900">{{ code .BlobView.Contents .Path | escapeHtml }}</div>
97 {{ end }}
98 </div>
99 {{ else if .BlobView.ContentType.IsMarkup }}
100 <div class="overflow-auto relative">
101 {{ if .BlobView.ShowingRendered }}
102 <div id="blob-contents" class="prose dark:prose-invert">{{ .BlobView.Contents | readme }}</div>
103 {{ else }}
104 <div id="blob-contents" class="whitespace-pre peer-target:bg-yellow-200 dark:peer-target:bg-yellow-900">{{ code .BlobView.Contents .Path | escapeHtml }}</div>
105 {{ end }}
106 </div>
107 {{ else if .BlobView.ContentType.IsCode }}
108 <div class="overflow-auto relative">
109 <div id="blob-contents" class="whitespace-pre peer-target:bg-yellow-200 dark:peer-target:bg-yellow-900">{{ code .BlobView.Contents .Path | escapeHtml }}</div>
110 </div>
111 {{ end }}
112 {{ template "fragments/multiline-select" }}
113{{ end }}