diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2020-11-16 21:18:55 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2020-11-16 21:18:55 -0300 |
commit | 398e206b496bc0e9ba89db498817b4cf48999b2a (patch) | |
tree | db41c8eb24c3c56f447be1fe4fc9b3f5f18ae273 /ganarchy/templating | |
parent | f74ca4e688c0ace34192358c47398653364a9128 (diff) |
Fix templates for non-root base_url
Diffstat (limited to 'ganarchy/templating')
-rw-r--r-- | ganarchy/templating/templates.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ganarchy/templating/templates.py b/ganarchy/templating/templates.py index 1b069b2..72b6786 100644 --- a/ganarchy/templating/templates.py +++ b/ganarchy/templating/templates.py @@ -54,7 +54,7 @@ def get_template_loader(): <p>This is {{ ganarchy.title|e }}. Currently tracking the following projects:</p> <ul> {% for project in ganarchy.projects -%}{% if project.exists -%} - <li><a href="/project/{{ project.commit|e }}">{{ project.title|e }}</a>: {{ project.description|e }}</li> + <li><a href="{{ (ganarchy.base_url[:-1] + ganarchy.base_url[-1:].rsplit('/',1)[0])|e }}/project/{{ project.commit|e }}">{{ project.title|e }}</a>: {{ project.description|e }}</li> {% endif -%}{% endfor -%} </ul> <p>Powered by <a href="https://ganarchy.autistic.space/">GAnarchy</a>. AGPLv3-licensed. <a href="https://cybre.tech/SoniEx2/ganarchy">Source Code</a>.</p> @@ -114,7 +114,7 @@ def get_template_loader(): </ul> <p>Powered by <a href="https://ganarchy.autistic.space/">GAnarchy</a>. AGPLv3-licensed. <a href="https://cybre.tech/SoniEx2/ganarchy">Source Code</a>.</p> <p> - <a href="/">Main page</a>. + <a href="{{ base_url|e }}">Main page</a>. <a href="{{ base_url|e }}" onclick="event.preventDefault(); navigator.registerProtocolHandler('web+ganarchy', this.href + '?url=%s', 'GAnarchy');">Register web+ganarchy: URI handler</a>. </p> </body> |