mygit

[UNMAINTAINED] A cgit/webgit alternative, written in Rust
Log | Files | Refs | README | LICENSE

commit 557b6cf87e42ea9d379ecfa4f30964b6104026a8
parent d43c4d3854b15bcab69e28f46db052f60060b02e
Author: Johann150 <johann@qwertqwefsday.eu>
Date:   Wed, 30 Jun 2021 00:16:41 +0200

add better titles

Diffstat:
Mtemplates/base.html | 3+--
Mtemplates/commit.html | 2++
Mtemplates/file.html | 2++
Mtemplates/log.html | 2++
Mtemplates/refs.html | 2++
Mtemplates/repo.html | 2++
Mtemplates/tag.html | 2++
Mtemplates/tree.html | 2++
8 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/templates/base.html b/templates/base.html @@ -7,8 +7,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0" /> <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{crate::CONFIG.emoji_favicon}}</text></svg>"> <meta name="description" content="My self-hosted git repositories"> - <title>{{crate::CONFIG.site_name}}</title> - {% block head %}{% endblock %} + <title>{% block title %}{{crate::CONFIG.site_name}}{% endblock %}</title> </head> <body> <div id="content"> diff --git a/templates/commit.html b/templates/commit.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}{{repo|repo_name}} commit {{commit.id()}} - {{crate::CONFIG.site_name}}{% endblock %} + {% block content %} {% include "repo-navbar.html" %} <b>Commit:</b> <span class="commit-hash">{{commit.id()}}</span> (<a href="/{{repo|repo_name|urlencode_strict}}/tree/{{commit.id()}}">tree</a>) diff --git a/templates/file.html b/templates/file.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}{{repo|repo_name}} {{path.display()}} - {{crate::CONFIG.site_name}}{% endblock %} + {% block content %} {% include "repo-navbar.html" %} <a href="/{{repo|repo_name|urlencode_strict}}/tree/{{spec}}/raw/{{path.display()}}" style="float:right;">raw</a> diff --git a/templates/log.html b/templates/log.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}{{repo|repo_name}} log at {{branch}} - {{crate::CONFIG.site_name}}{% endblock %} + {% block content %} {% include "repo-navbar.html" %} {% if next_page.is_some() %} diff --git a/templates/refs.html b/templates/refs.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}{{repo|repo_name}} refs - {{crate::CONFIG.site_name}}{% endblock %} + {% block content %} {% include "repo-navbar.html" %} <h2>Branches</h2> diff --git a/templates/repo.html b/templates/repo.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}{{repo|repo_name}} - {{crate::CONFIG.site_name}}{% endblock %} + {% block content %} {% include "repo-navbar.html" %} <table> diff --git a/templates/tag.html b/templates/tag.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}{{repo|repo_name}} tag {{tag.name().unwrap()}} - {{crate::CONFIG.site_name}}{% endblock %} + {% block content %} {% include "repo-navbar.html" %} <b>Commit:</b> <a href="/{{repo|repo_name|urlencode_strict}}/commit/{{tag.target_id()}}" class="commit-hash">{{tag.target_id()}}</a> (<a href="/{{repo|repo_name|urlencode_strict}}/tree/{{tag.name().unwrap_or("")}}">tree</a>) diff --git a/templates/tree.html b/templates/tree.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}{{repo|repo_name}} {{path.display()}} - {{crate::CONFIG.site_name}}{% endblock %} + {% block content %} {% include "repo-navbar.html" %} <div class="main">