Lindenii Project Forge
HTML: Broken branches warning
{{/* SPDX-License-Identifier: AGPL-3.0-only SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> */}} {{- define "repo_branches" -}} {{- $root := . -}} <!DOCTYPE html> <html lang="en"> <head> {{- template "head_common" . -}} <title>{{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}}</title> </head> <body class="repo-branches"> {{- 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> </li> <li class="nav-item"> <a class="nav-link" href="../tree/{{- template "ref_query" $root -}}">Tree</a> </li> <li class="nav-item"> <a class="nav-link" href="../log/{{- template "ref_query" $root -}}">Log</a> </li> <li class="nav-item"> <a class="nav-link active" href="../branches/">Branches</a> </li> <li class="nav-item"> <a class="nav-link" href="../tags/">Tags</a> </li> <li class="nav-item"> <a class="nav-link" href="../contrib/">Merge requests</a> </li> <li class="nav-item"> <a class="nav-link" href="../settings/">Settings</a> </li> </ul> </div> <div class="repo-header-extension"> <div class="repo-header-extension-content"> {{- .repo_description -}} </div> </div> <div class="padding-wrapper">
<p> <strong> Warning: Due to various recent migrations, viewing non-HEAD refs may be broken. </strong> </p>
<table id="branches"> <thead> <tr class="title-row"> <th colspan="1">Branches</th> </tr> </thead> <tbody> {{- range .branches -}} <tr> <td> <a href="../?branch={{ . }}">{{ . }}</a> </td> </tr> {{- end -}} </tbody> </table> </div> </body> </html> {{- end -}}
{{/* SPDX-License-Identifier: AGPL-3.0-only SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> */}} {{- define "repo_index" -}} {{- $root := . -}} <!DOCTYPE html> <html lang="en"> <head> {{- template "head_common" . -}} <title>{{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}}</title> </head> <body class="repo-index"> {{- template "header" . -}} <div class="repo-header"> <h2>{{- .repo_name -}}</h2> <ul class="nav-tabs-standalone"> <li class="nav-item"> <a class="nav-link active" href="./{{- template "ref_query" $root -}}">Summary</a> </li> <li class="nav-item"> <a class="nav-link" href="tree/{{- template "ref_query" $root -}}">Tree</a> </li> <li class="nav-item"> <a class="nav-link" href="log/{{- template "ref_query" $root -}}">Log</a> </li> <li class="nav-item"> <a class="nav-link" href="branches/">Branches</a> </li> <li class="nav-item"> <a class="nav-link" href="tags/">Tags</a> </li> <li class="nav-item"> <a class="nav-link" href="contrib/">Merge requests</a> </li> <li class="nav-item"> <a class="nav-link" href="settings/">Settings</a> </li> </ul> </div> <div class="repo-header-extension"> <div class="repo-header-extension-content"> {{- .repo_description -}} </div> </div> {{- if .notes -}} <div id="notes">Notes</div> <ul> {{- range .notes -}}<li>{{- . -}}</li>{{- end -}} </ul> </div> {{- end -}} <p class="readingwidth"><code>{{- .ssh_clone_url -}}</code></p>
{{- if .ref_name -}} <p class="readingwidth"> <strong> Warning: Due to various recent migrations, viewing non-HEAD refs may be broken. </strong> </p> {{- end -}}
{{- if .commits -}} <div class="commit-list-small"> {{- range .commits -}} <div class="event"> <div> <a href="commit/{{- .Hash -}}" title="{{- .Hash -}}" rel="nofollow"> {{- .Hash | printf "%.8s" -}} </a> — <a href="mailto:{{- .Email -}}">{{- .Author -}}</a> <small class="pull-right"> <span title="{{- .Date -}}">{{- .Date -}}</span> </small> </div> <pre class="commit">{{- .Message | first_line -}}</pre> </div> {{- end -}} {{- if dereference_error .commits_err -}} <div class="commit-error"> Error while obtaining commit log: {{ .commits_err }} </div> {{- end -}} </div> {{- end -}} {{- if .readme -}} <div class="padding-wrapper" id="readme"> {{- .readme -}} </div> {{- end -}} <footer> {{- template "footer" . -}} </footer> </body> </html> {{- end -}}
{{/* SPDX-License-Identifier: AGPL-3.0-only SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> */}} {{- define "repo_log" -}} {{- $root := . -}} <!DOCTYPE html> <html lang="en"> <head> {{- template "head_common" . -}} <title>Log – {{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}}</title> </head> <body class="repo-log"> {{- 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> </li> <li class="nav-item"> <a class="nav-link" href="../tree/{{- template "ref_query" $root -}}">Tree</a> </li> <li class="nav-item"> <a class="nav-link active" href="../log/{{- template "ref_query" $root -}}">Log</a> </li> <li class="nav-item"> <a class="nav-link" href="../branches/">Branches</a> </li> <li class="nav-item"> <a class="nav-link" href="../tags/">Tags</a> </li> <li class="nav-item"> <a class="nav-link" href="../contrib/">Merge requests</a> </li> <li class="nav-item"> <a class="nav-link" href="../settings/">Settings</a> </li> </ul> </div> <div class="repo-header-extension"> <div class="repo-header-extension-content"> {{- .repo_description -}} </div> </div> <div class="scroll">
{{- if .ref_name -}} <p> <strong> Warning: Due to various recent migrations, viewing non-HEAD refs may be broken. </strong> </p> {{- end -}}
<table id="commits" class="wide"> <thead> <tr class="title-row"> <th colspan="4">Commits {{ if .ref_name }} on {{ .ref_name }}{{ end -}}</th> </tr> <tr> <th scope="col">ID</th> <th scope="col">Title</th> <th scope="col">Author</th> <th scope="col">Author date</th> </tr> </thead> <tbody> {{- range .commits -}} <tr> <td class="commit-id"><a href="../commit/{{- .Hash -}}">{{- .Hash -}}</a></td> <td class="commit-title">{{- .Message | first_line -}}</td> <td class="commit-author"> <a class="email-name" href="mailto:{{- .Author.Email -}}">{{- .Author.Name -}}</a> </td> <td class="commit-time"> {{- .Author.When.Format "2006-01-02 15:04:05 -0700" -}} </td> </tr> {{- end -}} {{- if dereference_error .commits_err -}} Error while obtaining commit log: {{ .commits_err }} {{- end -}} </tbody> </table> </div> <footer> {{- template "footer" . -}} </footer> </body> </html> {{- end -}}
{{/* SPDX-License-Identifier: AGPL-3.0-only SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> */}} {{- define "repo_raw_dir" -}} {{- $root := . -}} <!DOCTYPE html> <html lang="en"> <head> {{- template "head_common" . -}} <title>/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – {{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}}</title> </head> <body class="repo-raw-dir"> {{- template "header" . -}} <div class="repo-header"> <h2>{{- .repo_name -}}</h2> <ul class="nav-tabs-standalone"> <li class="nav-item"> <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="{{- .repo_url_root -}}tree/{{- template "ref_query" $root -}}">Tree</a> </li> <li class="nav-item"> <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="{{- .repo_url_root -}}branches/">Branches</a> </li> <li class="nav-item"> <a class="nav-link" href="{{- .repo_url_root -}}tags/">Tags</a> </li> <li class="nav-item"> <a class="nav-link" href="{{- .repo_url_root -}}contrib/">Merge requests</a> </li> <li class="nav-item"> <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-wrapper scroll">
{{- if .ref_name -}} <p> <strong> Warning: Due to various recent migrations, viewing non-HEAD refs may be broken. </strong> </p> {{- end -}}
<table id="file-tree" class="wide"> <thead> <tr class="title-row"> <th colspan="3"> (Raw) /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }}{{ if .ref_name }} on {{ .ref_name }}{{ end -}} </th> </tr> <tr> <th scope="col">Mode</th> <th scope="col">Filename</th> <th scope="col">Size</th> </tr> </thead> <tbody> {{- $path_spec := .path_spec -}} {{- range .files -}} <tr> <td class="file-mode">{{- .Mode -}}</td> <td class="file-name"><a href="{{- .Name -}}{{- if not .IsFile -}}/{{- end -}}{{- template "ref_query" $root -}}">{{- .Name -}}</a>{{- if not .IsFile -}}/{{- end -}}</td> <td class="file-size">{{- .Size -}}</td> </tr> {{- end -}} </tbody> </table> </div> <div class="padding-wrapper"> <div id="refs"> </div> </div> <footer> {{- template "footer" . -}} </footer> </body> </html> {{- end -}}
{{/* SPDX-License-Identifier: AGPL-3.0-only SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> */}} {{- define "repo_tree_dir" -}} {{- $root := . -}} <!DOCTYPE html> <html lang="en"> <head> {{- template "head_common" . -}} <title>/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – {{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}}</title> </head> <body class="repo-tree-dir"> {{- template "header" . -}} <div class="repo-header"> <h2>{{- .repo_name -}}</h2> <ul class="nav-tabs-standalone"> <li class="nav-item"> <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="{{- .repo_url_root -}}tree/{{- template "ref_query" $root -}}">Tree</a> </li> <li class="nav-item"> <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="{{- .repo_url_root -}}branches/">Branches</a> </li> <li class="nav-item"> <a class="nav-link" href="{{- .repo_url_root -}}tags/">Tags</a> </li> <li class="nav-item"> <a class="nav-link" href="{{- .repo_url_root -}}contrib/">Merge requests</a> </li> <li class="nav-item"> <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-wrapper scroll">
{{- if .ref_name -}} <p> <strong> Warning: Due to various recent migrations, viewing non-HEAD refs may be broken. </strong> </p> {{- end -}}
<table id="file-tree" class="wide"> <thead> <tr class="title-row"> <th colspan="3"> /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }}{{ if .ref_name }} on {{ .ref_name }}{{ end -}} </th> <tr> <th scope="col">Mode</th> <th scope="col">Filename</th> <th scope="col">Size</th> </tr> </tr> </thead> <tbody> {{- $path_spec := .path_spec -}} {{- range .files -}} <tr> <td class="file-mode">{{- .Mode -}}</td> <td class="file-name"><a href="{{- .Name -}}{{- if not .IsFile -}}/{{- end -}}{{- template "ref_query" $root -}}">{{- .Name -}}</a>{{- if not .IsFile -}}/{{- end -}}</td> <td class="file-size">{{- .Size -}}</td> </tr> {{- end -}} </tbody> </table> </div> <div class="padding-wrapper"> <div id="refs"> </div> </div> {{- if .readme -}} <div class="padding-wrapper" id="readme"> {{- .readme -}} </div> {{- end -}} <footer> {{- template "footer" . -}} </footer> </body> </html> {{- end -}}
{{/* 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="{{- .repo_url_root -}}{{- template "ref_query" $root -}}">Summary</a> </li> <li class="nav-item"> <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="{{- .repo_url_root -}}log/{{- template "ref_query" $root -}}">Log</a> </li> <li class="nav-item"> <a class="nav-link" href="{{- .repo_url_root -}}branches/">Branches</a> </li> <li class="nav-item"> <a class="nav-link" href="{{- .repo_url_root -}}tags/">Tags</a> </li> <li class="nav-item"> <a class="nav-link" href="{{- .repo_url_root -}}contrib/">Merge requests</a> </li> <li class="nav-item"> <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">
{{- if .ref_name -}} <p> <strong> Warning: Due to various recent migrations, viewing non-HEAD refs may be broken. </strong> </p> {{- end -}}
<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 -}}