aboutsummaryrefslogtreecommitdiff
path: root/forged/templates
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-08-18 03:12:41 +0800
committerRunxi Yu <me@runxiyu.org>2025-08-18 03:12:41 +0800
commitf7dde29539536a67687cbeff9662a9617e077150 (patch)
treed976eb1f64062a65da4e689bd650ad84be737c52 /forged/templates
parentMove sql to inside forged (diff)
downloadforge-f7dde29539536a67687cbeff9662a9617e077150.tar.gz
forge-f7dde29539536a67687cbeff9662a9617e077150.tar.zst
forge-f7dde29539536a67687cbeff9662a9617e077150.zip
Make the index page work
Diffstat (limited to 'forged/templates')
-rw-r--r--forged/templates/_footer.tmpl2
-rw-r--r--forged/templates/_header.tmpl16
-rw-r--r--forged/templates/index.tmpl8
3 files changed, 13 insertions, 13 deletions
diff --git a/forged/templates/_footer.tmpl b/forged/templates/_footer.tmpl
index 22a3958..11e2365 100644
--- a/forged/templates/_footer.tmpl
+++ b/forged/templates/_footer.tmpl
@@ -4,7 +4,7 @@
*/}}
{{- define "footer" -}}
<a href="https://lindenii.runxiyu.org/forge/">Lindenii Forge</a>
-{{ .global.forge_version }}
+{{ .BaseData.Global.ForgeVersion }}
(<a href="https://forge.lindenii.runxiyu.org/forge/-/repos/server/">upstream</a>,
<a href="/-/source/LICENSE">license</a>,
<a href="https://webirc.runxiyu.org/kiwiirc/#lindenii">support</a>)
diff --git a/forged/templates/_header.tmpl b/forged/templates/_header.tmpl
index 340a2ac..39d3491 100644
--- a/forged/templates/_header.tmpl
+++ b/forged/templates/_header.tmpl
@@ -5,15 +5,15 @@
{{- define "header" -}}
<header id="main-header">
<div id="main-header-forge-title">
- <a href="/">{{- .global.forge_title -}}</a>
+ <a href="/">{{- .BaseData.Global.ForgeTitle -}}</a>
</div>
<nav id="breadcrumb-nav">
{{- $path := "" -}}
- {{- $url_segments := .url_segments -}}
- {{- $dir_mode := .dir_mode -}}
- {{- $ref_type := .ref_type -}}
- {{- $ref := .ref_name -}}
- {{- $separator_index := .separator_index -}}
+ {{- $url_segments := .BaseData.URLSegments -}}
+ {{- $dir_mode := .BaseData.DirMode -}}
+ {{- $ref_type := .BaseData.RefType -}}
+ {{- $ref := .BaseData.RefName -}}
+ {{- $separator_index := .BaseData.SeparatorIndex -}}
{{- if eq $separator_index -1 -}}
{{- $separator_index = len $url_segments -}}
{{- end -}}
@@ -25,8 +25,8 @@
{{- end -}}
</nav>
<div id="main-header-user">
- {{- if ne .user_id_string "" -}}
- <a href="/-/users/{{- .user_id_string -}}">{{- .username -}}</a>
+ {{- if ne .BaseData.UserID "" -}}
+ <a href="/-/users/{{- .BaseData.UserID -}}/">{{- .BaseData.Username -}}</a>
{{- else -}}
<a href="/-/login/">Login</a>
{{- end -}}
diff --git a/forged/templates/index.tmpl b/forged/templates/index.tmpl
index 66bd177..fa9b6a0 100644
--- a/forged/templates/index.tmpl
+++ b/forged/templates/index.tmpl
@@ -7,7 +7,7 @@
<html lang="en">
<head>
{{- template "head_common" . -}}
- <title>Index &ndash; {{ .global.forge_title -}}</title>
+ <title>Index &ndash; {{ .BaseData.Global.ForgeTitle -}}</title>
</head>
<body class="index">
{{- template "header" . -}}
@@ -24,7 +24,7 @@
</tr>
</thead>
<tbody>
- {{- range .groups -}}
+ {{- range .Groups -}}
<tr>
<td>
<a href="{{- .Name | path_escape -}}/">{{- .Name -}}</a>
@@ -47,11 +47,11 @@
<tbody>
<tr>
<th scope="row">SSH public key</th>
- <td><code class="breakable">{{- .global.server_public_key_string -}}</code></td>
+ <td><code class="breakable">{{- .BaseData.Global.SSHPubkey -}}</code></td>
</tr>
<tr>
<th scope="row">SSH fingerprint</th>
- <td><code class="breakable">{{- .global.server_public_key_fingerprint -}}</code></td>
+ <td><code class="breakable">{{- .BaseData.Global.SSHFingerprint -}}</code></td>
</tr>
</tbody>
</table>