Lindenii Project Forge
HTML: Fix the repo file page too
{{/* SPDX-License-Identifier: AGPL-3.0-only SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> */}} {{- define "repo_tree_file" -}} {{- $root := . -}} <!DOCTYPE html> <html lang="en"> <head> {{- template "head_common" . -}} <link rel="stylesheet" href="/-/static/chroma.css" /> <title>/{{ .path_spec }} – {{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}}</title> </head> <body class="repo-tree-file"> {{- template "header" . -}} <div class="repo-header"> <h2>{{- .repo_name -}}</h2> <ul class="nav-tabs-standalone"> <li class="nav-item">
<a class="nav-link" href="../{{- template "ref_query" $root -}}">Summary</a>
<a class="nav-link" href="{{- .repo_url_root -}}{{- template "ref_query" $root -}}">Summary</a>
</li> <li class="nav-item">
<a class="nav-link active" href="../tree/{{- template "ref_query" $root -}}">Tree</a>
<a class="nav-link active" href="{{- .repo_url_root -}}tree/{{- template "ref_query" $root -}}">Tree</a>
</li> <li class="nav-item">
<a class="nav-link" href="../log/{{- template "ref_query" $root -}}">Log</a>
<a class="nav-link" href="{{- .repo_url_root -}}log/{{- template "ref_query" $root -}}">Log</a>
</li> <li class="nav-item">
<a class="nav-link" href="../branches/">Branches</a>
<a class="nav-link" href="{{- .repo_url_root -}}branches/">Branches</a>
</li> <li class="nav-item">
<a class="nav-link" href="../tags/">Tags</a>
<a class="nav-link" href="{{- .repo_url_root -}}tags/">Tags</a>
</li> <li class="nav-item">
<a class="nav-link" href="../contrib/">Merge requests</a>
<a class="nav-link" href="{{- .repo_url_root -}}contrib/">Merge requests</a>
</li> <li class="nav-item">
<a class="nav-link" href="../settings/">Settings</a>
<a class="nav-link" href="{{- .repo_url_root -}}settings/">Settings</a>
</li> </ul> </div> <div class="repo-header-extension"> <div class="repo-header-extension-content"> {{- .repo_description -}} </div> </div> <div class="padding"> <p> /{{ .path_spec }} (<a href="/{{ template "group_path_plain" .group_path }}/-/repos/{{ .repo_name }}/raw/{{ .path_spec }}{{- template "ref_query" $root -}}">raw</a>) </p> {{- .file_contents -}} </div> <footer> {{- template "footer" . -}} </footer> </body> </html> {{- end -}}