Lindenii Project Forge
Login
Commit info
IDc810b44273c40fdcf66524073ef0a2980c8a3517
AuthorRunxi Yu<me@runxiyu.org>
Author dateWed, 12 Feb 2025 02:59:53 +0800
CommitterRunxi Yu<me@runxiyu.org>
Committer dateWed, 12 Feb 2025 02:59:53 +0800
Actions
Get patch
repo_tree_file: Don't treespec when it's head
{{- define "repo_tree_file" -}}
<!DOCTYPE html>
<html lang="en">
	<head>
		{{ template "head_common" . }}
		<link rel="stylesheet" href="/static/chroma.css" />
		<title>{{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }} &ndash; Lindenii Forge</title>
	</head>
	<body class="repo-tree-file">
		<header>
			{{ template "repo_header" . }}
		</header>
		<p>
			/{{ .path_spec }} (<a href="/g/{{ .group_name }}/repos/{{ .repo_name }}/raw/{{ .path_spec }}?{{ .ref_type }}={{ .ref }}">raw</a>)
			/{{ .path_spec }} (<a href="/g/{{ .group_name }}/repos/{{ .repo_name }}/raw/{{ .path_spec }}{{ if not (eq .ref_type "head") }}?{{ .ref_type }}={{ .ref }}{{ end }}">raw</a>)
		</p>
		{{ .file_contents }}
		<footer>
			{{ template "footer" . }}
		</footer>
	</body>
</html>
{{- end -}}