diff --git a/i2p2www/pages/downloads/list.html b/i2p2www/pages/downloads/list.html index 7f500629..ae511600 100644 --- a/i2p2www/pages/downloads/list.html +++ b/i2p2www/pages/downloads/list.html @@ -1,10 +1,6 @@ {% extends "global/layout.html" %} +{%- from "downloads/macros" import package, package_outer with context -%} {% block title %}{{ _('Download') }}{% endblock %} -{% set i2pinstall_windows_hash = '3f59e4604531c07b39c6564712b45660a836f0ed7fc52c2a2602320e2da0d591' %} -{% set i2pinstall_jar_hash = 'ee5297b2746e324c9ca33b19513ff09b50724ae3b9f588e4ccc31fc389ce50aa' %} -{% set i2psource_hash = '91ac91f7a3e202d248f5294f4951f6b7d8b9bde32991adf7a813ae1bb9188898' %} -{% set i2pupdate_hash = '33d969e859c772ba7def142ab0ebbe0c2e8ec52a832bbe31141eaad0eaf556d3' %} -{% set i2p_android_hash = 'b14e3cc5ea12eb2e8bccb81dd2e86eeea3baba6695eb1a9f4d9053e76aeb131d' %} {% block content %}

{{ _('Dependency') }}

{% trans java='http://java.com/download/', @@ -43,44 +39,13 @@ or type java -version at your command prompt.

{{ _('Clean installs') }}

-
-
- Windows -
-
- -
- {{ i2pinstall_windows_hash }} -
+{% call package('windows') %}

{% trans -%} Download that file and run it. {%- endtrans %}

-
-
+{% endcall %} -
-
- Mac OS X -
-
- -
- {{ i2pinstall_jar_hash }} -
+{% call package('mac') %}

{% trans i2pversion=ver() -%} Download that file and double-click it (if that works) or type java -jar i2pinstall_{{ i2pversion }}.jar in a terminal to run the @@ -94,25 +59,9 @@ or type java -version at your command prompt. Download the {{ i2pversion }} OSX graphical installer file above and run java -jar i2pinstall_{{ i2pversion }}.jar -console from the command line. {%- endtrans %} -

-
+{% endcall %} -
-
- GNU/Linux / BSD / Solaris -
-
- -
- {{ i2pinstall_jar_hash }} -
+{% call package('unix') %}

{% trans i2pversion=ver() -%} Download that file and double-click it (if that works) or type java -jar i2pinstall_{{ i2pversion }}.jar in a terminal to run the @@ -126,51 +75,15 @@ or type java -version at your command prompt. Download the graphical installer file above and run java -jar i2pinstall_{{ i2pversion }}.jar -console from the command line. {%- endtrans %} -

-
+{% endcall %} -
-
- Debian / Ubuntu -
-
+{% call package_outer('deb', 'Debian / Ubuntu', 'images/download/debian-ubuntu.png') %} -
-
+{% endcall %} -
-
- Android -
-
-
- {% trans %}Outside I2P{% endtrans %}: - - I2P-0.9.22 -
- {% trans %}Inside I2P{% endtrans %}: - - I2P-0.9.22 -
- Google Play: - I2P-0.9.22 -
- {% trans %}Our F-Droid repository{% endtrans %}: - I2P-0.9.22 -
- F-Droid: - I2P-0.9.19 -
- {% trans %}Development Builds{% endtrans %}: - {% trans str4durl='http://'+i2pconv('str4d.i2p')+'/android/' -%} - str4d's eepsite - {%- endtrans %} -
-
- {{ i2p_android_hash }} -
+{% call package('android') %}

 

{% trans -%} @@ -186,25 +99,9 @@ or type java -version at your command prompt. the other. {%- endtrans %}
-
-
+{% endcall %} -
-
- {{ _('Source package') }} -
-
- -
- {{ i2psource_hash }} -
+{% call package('source') %}

{% trans monotoneurl=site_url('get-involved/guides/new-developers'), gitrepo='http://'+i2pconv('git.repo.i2p')+'/w/i2p.i2p.git', github='https://github.com/i2p/i2p.i2p', @@ -222,8 +119,7 @@ or type java -version at your command prompt. Android builds require the I2P source. See the documentation in the Android source for additional build requirements and instructions. {%- endtrans %}

-
-
+{% endcall %}
@@ -241,11 +137,7 @@ The files are signed by zzz, Both automatic and manual upgrades are available for the release. {%- endtrans %}

-
-
- {{ _('Automatic updates') }} -
-
+{% call package_outer('auto', _('Automatic updates'), 'images/download/update-auto.png') %}

{% trans -%} If you are running 0.7.5 or later, your router should detect the new release. To upgrade simply click the 'Download Update' button on your router console @@ -291,25 +183,9 @@ receive the release.

-
- +{% endcall %} -
-
- {{ _('Manual updates') }} -
-
- -
- {{ i2pupdate_hash }} -
+{% call package('update') %}
  1. {% trans -%} @@ -331,8 +207,7 @@ receive the release. {%- endtrans %}
-
-
+{% endcall %} {% trans signingkey=site_url('get-involved/develop/release-signing-key') -%} The file is signed by zzz, diff --git a/i2p2www/pages/downloads/macros b/i2p2www/pages/downloads/macros new file mode 100644 index 00000000..3d84a898 --- /dev/null +++ b/i2p2www/pages/downloads/macros @@ -0,0 +1,98 @@ +{% set i2pinstall_windows_hash = '3f59e4604531c07b39c6564712b45660a836f0ed7fc52c2a2602320e2da0d591' %} +{% set i2pinstall_jar_hash = 'ee5297b2746e324c9ca33b19513ff09b50724ae3b9f588e4ccc31fc389ce50aa' %} +{% set i2psource_hash = '91ac91f7a3e202d248f5294f4951f6b7d8b9bde32991adf7a813ae1bb9188898' %} +{% set i2pupdate_hash = '33d969e859c772ba7def142ab0ebbe0c2e8ec52a832bbe31141eaad0eaf556d3' %} +{% set i2p_android_hash = 'b14e3cc5ea12eb2e8bccb81dd2e86eeea3baba6695eb1a9f4d9053e76aeb131d' %} + +{% set i2p_android_version = '0.9.22' %} +{% set i2p_android_version_kytv = '0.9.22' %} +{% set i2p_android_version_fdroid = '0.9.19' %} + + +{% macro package_outer(type, name, icon) -%} +
+
+ {{ name }} +
+
+ {{ caller() }} +
+
+{%- endmacro %} + +{% macro package(type) -%} +{%- if type == 'windows' -%} + {%- set name = 'Windows' -%} + {%- set icon = 'images/download/windows.png' -%} + {%- set filename = 'i2pinstall_%s_windows.exe' -%} + {%- set signame = 'i2pinstall_%s_windows.exe.sig' -%} + {%- set hash = i2pinstall_windows_hash -%} +{%- elif type == 'android' -%} + {%- set name = 'Android' -%} + {%- set icon = 'images/download/android.png' -%} + {%- set hash = i2p_android_hash -%} +{%- elif type == 'source' -%} + {%- set name = _('Source package') -%} + {%- set icon = 'images/download/source.png' -%} + {%- set filename = 'i2psource_%s.tar.bz2' -%} + {%- set signame = 'i2psource_%s.tar.bz2.sig' -%} + {%- set hash = i2psource_hash -%} +{%- elif type == 'update' -%} + {%- set name = _('Manual updates') -%} + {%- set icon = 'images/download/update-manual.png' -%} + {%- set filename = 'i2pupdate_%s.zip' -%} + {%- set signame = 'i2pupdate_%s.zip.sig' -%} + {%- set hash = i2pupdate_hash -%} +{%- else -%} + {%- if type == 'mac' -%} + {%- set name = 'Mac OS X' -%} + {%- set icon = 'images/download/mac-osx.png' -%} + {%- elif type == 'unix' -%} + {%- set name = 'GNU/Linux / BSD / Solaris' -%} + {%- set icon = 'images/download/freebsd-tux.png' -%} + {%- endif -%} + {%- set filename = 'i2pinstall_%s.jar' -%} + {%- set signame = 'i2pinstall_%s.jar.sig' -%} + {%- set hash = i2pinstall_jar_hash -%} +{%- endif -%} + +{%- set details = caller() -%} +{% call package_outer(type, name, icon) %} +
+ {%- if type == 'android' %} + {% trans %}Outside I2P{% endtrans %}: + + I2P {{ i2p_android_version }} +
+ {% trans %}Inside I2P{% endtrans %}: + + I2P {{ i2p_android_version_kytv }} +
+ Google Play: + I2P {{ i2p_android_version }} +
+ {% trans %}Our F-Droid repository{% endtrans %}: + I2P {{ i2p_android_version }} +
+ F-Droid: + I2P {{ i2p_android_version_fdroid }} +
+ {% trans %}Development Builds{% endtrans %}: + {% trans str4durl='http://'+i2pconv('str4d.i2p')+'/android/' -%} + str4d's eepsite + {%- endtrans %} + {% else %} + + {{ ver(filename) }}
+ {{ _('Mirror:') }} {{ def_mirror.org }} +
+ {{ _('select alternate mirror') }} + sig + {% endif -%} +
+
+ {{ hash }} +
+ {{ details }} +{% endcall %} +{%- endmacro %}