diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-13 20:17:19 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-13 20:17:19 +0800 |
commit | 3c3c383a9d6dec77e93272483699b3aef2c1dd47 (patch) | |
tree | dea1d4018a38b38fb4f8558b6279676dfda344e9 /templates/_header.htmpl | |
parent | Note that patches are required on top of hare-http (diff) | |
download | forge-3c3c383a9d6dec77e93272483699b3aef2c1dd47.tar.gz forge-3c3c383a9d6dec77e93272483699b3aef2c1dd47.tar.zst forge-3c3c383a9d6dec77e93272483699b3aef2c1dd47.zip |
Partially port templates used by the index page
Diffstat (limited to '')
-rw-r--r-- | templates/_header.htmpl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/_header.htmpl b/templates/_header.htmpl new file mode 100644 index 0000000..2eb8d19 --- /dev/null +++ b/templates/_header.htmpl @@ -0,0 +1,14 @@ +{{ define _tp_header(handle: io::handle, user_id_str: str, username: str) (void | io::error | nomem) }} +<header id="main-header"> + <div id="main-header-forge-title"> + <a href="/">{{ global.title }}</a> + </div> + <div id="main-header-user"> + {{ if user_id_str != "" }} + <a href="/:/users/{{ user_id_str }}">{{ username }}</a> + {{ else }} + <a href="/:/login/">Login</a> + {{ end }} + </div> +</header> +{{ end }} |