I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 3c3b4ed7 authored by str4d's avatar str4d
Browse files

Moved ver() into templatevars so only need to change I2P version in one place

parent 9527fcd1
No related branches found
No related tags found
No related merge requests found
{%- from "global/macros" import change_lang, ver with context -%}
{%- from "global/macros" import change_lang with context -%}
<!DOCTYPE html>
<html lang="en">
<head>
......
......@@ -8,12 +8,6 @@
{%- endif -%}
{%- endmacro -%}
{%- macro ver(string=None) -%}
{%- if string -%}{{ string % '0.9.4' }}
{%- else -%}{{ '0.9.4' }}
{%- endif -%}
{%- endmacro -%}
{%- macro render_pagination(pagination) %}
<div class="pagination">
{%- if pagination.has_prev %}
......
from flask import g, request, url_for
from i2p2www import CANONICAL_DOMAIN, app
from i2p2www import CANONICAL_DOMAIN, CURRENT_I2P_VERSION, app
I2P_TO_CLEAR = {
'www.i2p2.i2p': 'www.i2p2.de',
......@@ -79,10 +79,16 @@ def utility_processor():
# Probably a 404 error page
return url_for('main_index', **args)
def get_current_version(string=None):
if string:
return string % CURRENT_I2P_VERSION
return CURRENT_I2P_VERSION
return dict(i2pconv=convert_url_to_clearnet,
url_for_other_page=url_for_other_page,
change_theme=change_theme,
site_url=get_site_url,
get_url=get_url_with_lang,
get_flag=get_flag,
ver=get_current_version,
canonical=get_canonical_link)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment