From 3dc8d8f600d81fec02cd70d8b45cc5e650873cd5 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 31 Oct 2022 12:01:00 +0100 Subject: make website basically usable --- src/hydrilla_website/app.py | 8 + src/hydrilla_website/common_jinja_templates | 2 +- .../locales/en_US/LC_MESSAGES/messages.po | 10 +- src/hydrilla_website/static/haketilo-favicon.ico | Bin 0 -> 4286 bytes .../static/haketilo-favicon.ico.license | 2 + src/hydrilla_website/static/haketilo-web.svg | 150 +++++++++++ .../static/haketilo-web.svg.license | 3 + src/hydrilla_website/static/haketilo.svg | 127 +++++++++ src/hydrilla_website/static/haketilo.svg.license | 2 + src/hydrilla_website/static/three-green-dots.svg | 36 +++ .../static/three-green-dots.svg.license | 2 + .../templates/downloads.html.jinja | 291 +++++++++++++++++++++ src/hydrilla_website/templates/index.html.jinja | 173 +++++++++++- .../templates/website_base.html.jinja | 152 ++++++++++- 14 files changed, 945 insertions(+), 13 deletions(-) create mode 100644 src/hydrilla_website/static/haketilo-favicon.ico create mode 100644 src/hydrilla_website/static/haketilo-favicon.ico.license create mode 100644 src/hydrilla_website/static/haketilo-web.svg create mode 100644 src/hydrilla_website/static/haketilo-web.svg.license create mode 100644 src/hydrilla_website/static/haketilo.svg create mode 100644 src/hydrilla_website/static/haketilo.svg.license create mode 100644 src/hydrilla_website/static/three-green-dots.svg create mode 100644 src/hydrilla_website/static/three-green-dots.svg.license create mode 100644 src/hydrilla_website/templates/downloads.html.jinja diff --git a/src/hydrilla_website/app.py b/src/hydrilla_website/app.py index 84303c3..a86c22a 100644 --- a/src/hydrilla_website/app.py +++ b/src/hydrilla_website/app.py @@ -91,3 +91,11 @@ website_app = HydrillaWebsite() @website_app.route('/', methods=['GET']) def main() -> str: return flask.render_template('index.html.jinja') + +@website_app.route('/favicon.ico', methods=['GET']) +def favicon() -> str: + return flask.send_file('static/haketilo-favicon.ico') + +@website_app.route('/downloads', methods=['GET']) +def downloads() -> str: + return flask.render_template('downloads.html.jinja') diff --git a/src/hydrilla_website/common_jinja_templates b/src/hydrilla_website/common_jinja_templates index 0e8ab5c..ad3e7bf 160000 --- a/src/hydrilla_website/common_jinja_templates +++ b/src/hydrilla_website/common_jinja_templates @@ -1 +1 @@ -Subproject commit 0e8ab5c2735b94166552ce80c18e523357a048ab +Subproject commit ad3e7bfb2dee90dd6b5bdec73251fb0c9e9ad8aa diff --git a/src/hydrilla_website/locales/en_US/LC_MESSAGES/messages.po b/src/hydrilla_website/locales/en_US/LC_MESSAGES/messages.po index eb9d5e4..d4041b2 100644 --- a/src/hydrilla_website/locales/en_US/LC_MESSAGES/messages.po +++ b/src/hydrilla_website/locales/en_US/LC_MESSAGES/messages.po @@ -20,13 +20,15 @@ msgstr "" #: src/hydrilla_website/templates/index.html.jinja:23 msgid "index.title" -msgstr "Main page" +msgstr "Haketilo" #: src/hydrilla_website/templates/index.html.jinja:27 -msgid "index.h_big.welcome_to_haketilo" -msgstr "Welcome to Haketilo" +msgid "index.h_big.taking_back_the_web" +msgstr "Taking back the web with Haketilo" #: src/hydrilla_website/templates/website_base.html.jinja:20 msgid "base.title.haketilo" -msgstr "Haketilo&Hydrilla" +msgstr "Haketilo" +msgid "index.h_big.haketilo_downloads" +msgstr "Haketilo downloads" diff --git a/src/hydrilla_website/static/haketilo-favicon.ico b/src/hydrilla_website/static/haketilo-favicon.ico new file mode 100644 index 0000000..3b9b58f Binary files /dev/null and b/src/hydrilla_website/static/haketilo-favicon.ico differ diff --git a/src/hydrilla_website/static/haketilo-favicon.ico.license b/src/hydrilla_website/static/haketilo-favicon.ico.license new file mode 100644 index 0000000..0a91c71 --- /dev/null +++ b/src/hydrilla_website/static/haketilo-favicon.ico.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 OR CC-BY-SA-4.0 +Copyright 2017 David Lyons diff --git a/src/hydrilla_website/static/haketilo-web.svg b/src/hydrilla_website/static/haketilo-web.svg new file mode 100644 index 0000000..47767d3 --- /dev/null +++ b/src/hydrilla_website/static/haketilo-web.svg @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/hydrilla_website/static/haketilo-web.svg.license b/src/hydrilla_website/static/haketilo-web.svg.license new file mode 100644 index 0000000..eabc885 --- /dev/null +++ b/src/hydrilla_website/static/haketilo-web.svg.license @@ -0,0 +1,3 @@ +SPDX-License-Identifier: CC0-1.0 OR CC-BY-SA-4.0 +Copyright 2017 David Lyons +Copyright 2022 Wojtek Kosior diff --git a/src/hydrilla_website/static/haketilo.svg b/src/hydrilla_website/static/haketilo.svg new file mode 100644 index 0000000..7a01461 --- /dev/null +++ b/src/hydrilla_website/static/haketilo.svg @@ -0,0 +1,127 @@ + + + Hatchet + + + + + + + + + + + + image/svg+xml + + Hatchet + + + David Lyons + + + + + dlyons + + + + 2017-05 + + + hatchet + ax + wood + + + Hatchet + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/hydrilla_website/static/haketilo.svg.license b/src/hydrilla_website/static/haketilo.svg.license new file mode 100644 index 0000000..0a91c71 --- /dev/null +++ b/src/hydrilla_website/static/haketilo.svg.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 OR CC-BY-SA-4.0 +Copyright 2017 David Lyons diff --git a/src/hydrilla_website/static/three-green-dots.svg b/src/hydrilla_website/static/three-green-dots.svg new file mode 100644 index 0000000..686f2d3 --- /dev/null +++ b/src/hydrilla_website/static/three-green-dots.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + diff --git a/src/hydrilla_website/static/three-green-dots.svg.license b/src/hydrilla_website/static/three-green-dots.svg.license new file mode 100644 index 0000000..4048835 --- /dev/null +++ b/src/hydrilla_website/static/three-green-dots.svg.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +Copyright 2022 Wojtek Kosior diff --git a/src/hydrilla_website/templates/downloads.html.jinja b/src/hydrilla_website/templates/downloads.html.jinja new file mode 100644 index 0000000..ce5dde3 --- /dev/null +++ b/src/hydrilla_website/templates/downloads.html.jinja @@ -0,0 +1,291 @@ +{# +SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0 + +Website downloads page. + +This file is part of Hydrilla&Haketilo website. + +Copyright (C) 2022 Wojtek Kosior + +Dual licensed under +* GNU General Public License v3.0 or later and +* Creative Commons Attribution Share Alike 4.0 International. + +You can choose to use either of these licenses or both. + + +I, Wojtek Kosior, thereby promise not to sue for violation of this +file's licenses. Although I request that you do not make use of this +code in a proprietary work, I am not going to enforce this in court. +#} +{% extends "website_base.html.jinja" %} + +{% block title %} {{ _('downloads.title') }} {% endblock %} + +{% block style %} + {{ super() }} + + .signify-pubkey { + word-break: break-all; + } +{% endblock %} + +{% set here_url = url_for('downloads') %} + +{% + set nav_links_data = [ + (none, url_for('main') ~ '#', 'Home'), + ('', here_url ~ '#', 'Downloads'), + ('proxy', here_url ~ '#proxy', 'Haketilo proxy'), + ('old-hydrilla', here_url ~ '#old-hydrilla', 'Old Hydrilla versions'), + ('webextension', here_url ~ '#webextension', 'Haketilo WebExtension') + ] +%} + +{% set downloads_base = 'https://hydrilla.koszko.org/downloads/' %} + +{% + macro list_files( + filenames_comments, + label_text = 'Files', + filename_suffix = '', + include_comments = true + ) +%} + {{ label(label_text) }} + + {% call unordered_list() %} + {% for base_filename, comment in filenames_comments %} + {% set filename = base_filename ~ filename_suffix %} + {% set href = downloads_base ~ filename %} + {% call list_entry() %} + {{ filename }} + {% if include_comments and comment %} + ({{ comment }}) + {% endif %} + {% endcall %} + {% endfor %} + {% endcall %} +{% endmacro %} + +{% macro files_and_sigs_lists(filenames_comments) %} + {{ list_files(filenames_comments) }} + {{ list_files(filenames_comments, 'Signify signatures', '.sig', false) }} + {{ list_files(filenames_comments, 'PGP signatures', '.asc', false) }} +{% endmacro %} + +{% block body %} + {% call subpage('') %} +

+ {{ _('index.h_big.haketilo_downloads') }} +

+ +

+ This page lists releases of Haketilo proxy, Haketilo browser extension + (now in maintenance mode) and Hydrilla repository server. Starting with + version 3, Haketilo proxy and Hydrilla are distributed together. +

+ +

+ All files are cryptographically signed by project maintainer, Wojciech + Kosior. Public keys for verification of signatures are the ones from + koszko.org. + You might want to read the + instructions + on signature verification. +

+ + {{ label('PGP key fingerprint') }} +

+ E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A +

+ + {% call label() %} + + Signify public key + + {% endcall %} +

+ RWQSf2wUdpjAtrmt7D3t9iHrHFL/GpqXOF+NxECx8ck7swrx6tNzDkM9 +

+ {% endcall %} + + {% call subpage('proxy') %} +

Haketilo proxy and Hydrilla releases

+ +

+ Tool releases from version 3 upwards are listed below. Both Haketilo proxy + and Hydrilla are included inside. +

+ +

+ If you're a programmer, you might also want to check the + git repository of Hydrilla and Haketilo. +

+ +

Version 3.0-beta1 (pre-release version)

+ +

+ The binary release was made with + GNU Guix version + 1.3.0-26.fd00ac7. +

+ + {{ + files_and_sigs_lists([ + ('haketilo-and-hydrilla-bin-3.0b1-x86_64.tar.gz', + 'relocatable standalone binary release for x86-64 GNU/Linux computers'), + ('hydrilla-3.0b1-py3-none-any.whl', + 'Python wheel for use with pip'), + ('haketilo-and-hydrilla-3.0b1.tar.gz', + 'source code') + ]) + }} + {% endcall %} + + {% call subpage('old-hydrilla') %} +

Old Hydrilla releases

+ +

+ Hydrilla releases before version 3 are listed below. Those old versions + do not yet include the Haketilo proxy. The functionality is split between + separate Hydrilla builder and + server packages. The latter depends on the + former. +

+ +

+ If you're a programmer, you might also want to check the git repositories + of Hydrilla and + Hydrilla builder. +

+ +

Version 1.1-beta1 (pre-release version)

+ + {{ + files_and_sigs_lists([ + ('hydrilla.builder-1.1b1.tar.gz', ''), + ('hydrilla.builder-1.1b1-py3-none-any.whl', ''), + ('hydrilla-1.1b1.tar.gz', ''), + ('hydrilla-1.1b1-py3-none-any.whl', '') + ]) + }} + +

Version 1.0

+ + {{ + files_and_sigs_lists([ + ('hydrilla.builder-1.0.tar.gz', ''), + ('hydrilla.builder-1.0-py3-none-any.whl', ''), + ('hydrilla-1.0.tar.gz', ''), + ('hydrilla-1.0-py3-none-any.whl', '') + ]) + }} + +

Version - 1.0-beta2 (pre-release version)

+ + {{ + files_and_sigs_lists([ + ('hydrilla.builder-1.0b2.tar.gz', ''), + ('hydrilla.builder-1.0b2-py3-none-any.whl', ''), + ('hydrilla-1.0b2.tar.gz', ''), + ('hydrilla-1.0b2-py3-none-any.whl', '') + ]) + }} + +

Version - 1.0-beta1 (pre-release version)

+ + {{ + files_and_sigs_lists([ + ('hydrilla.builder-1.0b1.tar.gz', ''), + ('hydrilla.builder-1.0b1-py3-none-any.whl', ''), + ('hydrilla-1.0b1.tar.gz', ''), + ('hydrilla-1.0b1-py3-none-any.whl', '') + ]) + }} + {% endcall %} + + {% call subpage('webextension') %} +

Haketilo WebExtension

+ +

+ Browser extension releases are listed below. The extension is currently in + maintenance mode and is not going to receive new functionalities. +

+ +

+ If you're a programmer, you might also want to check the + git repository of Haketilo browser extension. +

+ +

Version 2.0.1

+ + {{ + files_and_sigs_lists([ + ('haketilo-2.0.1.zip', 'Chromium build'), + ('haketilo-2.0.1.xpi', 'Mozilla build'), + ('haketilo-2.0.1.tar.gz', 'source code') + ]) + }} + +

Version 2.0

+ + {{ + files_and_sigs_lists([ + ('haketilo-2.0.zip', 'Chromium build'), + ('haketilo-2.0.xpi', 'Mozilla build'), + ('haketilo-2.0.tar.gz', 'source code') + ]) + }} + +

Version 2.0-beta1 (pre-release version)

+ + {{ + files_and_sigs_lists([ + ('haketilo-2.0b1.zip', 'Chromium build'), + ('haketilo-2.0b1.xpi', 'Mozilla build'), + ('haketilo-2.0b1.tar.gz', 'source code') + ]) + }} + +

Version 1.0

+ + {{ + files_and_sigs_lists([ + ('haketilo-1.0.zip', 'Chromium build'), + ('haketilo-1.0.mozilla-signed.xpi', 'Mozilla build'), + ('haketilo-1.0.tar.gz', 'source code') + ]) + }} + +

Version 1.0-beta3 (pre-release version)

+ + {{ + files_and_sigs_lists([ + ('haketilo-1.0b3.zip', 'Chromium build'), + ('haketilo-1.0b3.xpi', 'Mozilla build'), + ('haketilo-1.0b3.tar.gz', 'source code') + ]) + }} + +

Version 1.0-beta2 (pre-release version)

+ + {{ + files_and_sigs_lists([ + ('haketilo-1.0b2.zip', 'Chromium build'), + ('haketilo-1.0b2.xpi', 'Mozilla build'), + ('haketilo-1.0b2.tar.gz', 'source code') + ]) + }} + +

Version 1.0-beta1 (pre-release version)

+ + {{ + files_and_sigs_lists([ + ('haketilo-1.0b1.zip', 'Chromium build'), + ('haketilo-1.0b1.xpi', 'Mozilla build'), + ('haketilo-1.0b1.tar.gz', 'source code') + ]) + }} + {% endcall %} +{% endblock %} diff --git a/src/hydrilla_website/templates/index.html.jinja b/src/hydrilla_website/templates/index.html.jinja index 65ae42a..955c06f 100644 --- a/src/hydrilla_website/templates/index.html.jinja +++ b/src/hydrilla_website/templates/index.html.jinja @@ -22,8 +22,173 @@ code in a proprietary work, I am not going to enforce this in court. {% block title %} {{ _('index.title') }} {% endblock %} -{% block main %} -

- {{ _('index.h_big.welcome_to_haketilo') }} -

+{% block style %} + {{ super() }} + + img#haketilo-web { + display: block; + margin: 20px; + max-height: 300px; + max-width: 100%; + margin: auto; + } +{% endblock %} + +{% set here_url = url_for('main') %} +{% set site_git_url = 'https://git.koszko.org/hydrilla-website/' %} + +{% + set nav_links_data = [ + ('', here_url ~ '#', 'Home'), + ('about', here_url ~ '#about', 'About'), + ('manual', here_url ~ '#manual', 'Manual'), + (none, url_for('downloads') ~ '#', 'Downloads'), + ('get-involved', here_url ~ '#get-involved', 'Get involved'), + (none, site_git_url, 'Website sources') + ] +%} + +{% block body %} + {% call subpage('') %} + Haketilo hatchet stabbed into the Web +

+ {{ _('index.h_big.taking_back_the_web') }} +

+ {% endcall %} + + {% call subpage('about') %} +

About

+ +

+ Haketilo is a tool that facilitates viewing websites with their original + JavaScript replaced + by user-provided scripts. + It combines the functionalities of content + blocker and user script manager. + It can be used with its script repository, Hydrilla. +

+ +

+ One of Haketilo's aims is to address the issues raised in + "The JavaScript trap". + It is being developed with hope that it will make more user-controlled + "Web" browsing possible. +

+ +

+ Haketilo is a + free/libre software, + SSl-enabled HTTP proxy. As such, it can be used with multiple web + browsers, regardless of their native support for some particular addon + format. +

+ +

+ A browser extension variant of Haketilo also exists and is compatible with + Firefox- and + Chromium-based + browsers that support the Manifest V2 WebExtension format. The browser + extension is currently in maintenance mode and does not receive new + features. +

+ +

Available packages

+ +

+ Haketilo can be used both for simple script-blocking and for altering the + ways websites are viewed. Its official Hydrilla repository provides a + collection of + freely-licensed + packages that can make several websites viewable again after their + original JavaScript is blocked from executing. +

+ +

Credits

+ + Those who knowingly or unknowingly helped the project in some way, receive + special thanks. + + {% call unordered_list() %} + {% call list_entry() %} + the NLnet Foundation with the + NGI0 Programme for funding the + development of Haketilo in 2021 and 2022 + {% endcall %} + {% call list_entry() %} + Jahoti for contributions in + the early stages of Haketilo browser extension + {% endcall %} + {% call list_entry() %} + Nicholas Johnson for preparing a + presentation about Haketilo + for LibrePlanet 2022 + {% endcall %} + {% call list_entry() %} + David Lyons for + his Hatchet graphic that is being used in Haketilo + {% endcall %} + {% call list_entry() %} + the creators of mitmproxy which + serves as a base for Haketilo proxy + {% endcall %} + {% call list_entry() %} + the the Pallets Projects for + creating Flask and other tools that are used extensively in this very + website as well as in Haketilo&Hydrilla + {% endcall %} + {% endcall %} + {% endcall %} + + {% call subpage('manual') %} +

User manual

+ +

+ Information about installation, running and some technical aspects of + Haketilo operation can be found on + project's Redmine-powered wiki. + Additional help is provided by Haketilo proxy's builtin documentation + which can be viewed from the tool itself. +

+ +

+ The documentation of Hydrilla repository server for use with Haketilo can + be found on + on project's wiki. +

+ {% endcall %} + + {% call subpage('get-involved') %} +

Get involved

+ +

+ Haketilo development currently occurs on + project's Redmine instance. + Individuals and groups are more than welcome to +

+ + {% call unordered_list() %} + {% call list_entry() %} + provide feedback and suggestions, + {% endcall %} + {% call list_entry() %} + make bug reports, + {% endcall %} + {% call list_entry() %} + share custom scripts for websites, + {% endcall %} + {% call list_entry() %} + provide translations and + {% endcall %} + {% call list_entry() %} + contribute code to Haketilo and Hydrilla. + {% endcall %} + {% endcall %} + +

+ One can also email the maintainer of Haketilo, + Wojtek Kosior, directly + at koszko@koszko.org. +

+ {% endcall %} {% endblock %} diff --git a/src/hydrilla_website/templates/website_base.html.jinja b/src/hydrilla_website/templates/website_base.html.jinja index f706faa..777a3d3 100644 --- a/src/hydrilla_website/templates/website_base.html.jinja +++ b/src/hydrilla_website/templates/website_base.html.jinja @@ -13,14 +13,158 @@ Available under the terms of Creative Commons Zero v1.0 Universal. {% block head %} {{ super() }} - + - {% block title required %}{% endblock %} - - - {{ _('base.title.haketilo') }} + {% block title %} + {{ _('base.title.haketilo') }} + {% endblock %} + + {% endblock head %} {% block style %} {{ super() }} + + .nav-container { + display: block; + padding: 20px 10px; + } + + nav { + display: inline-flex; + flex-direction: column; + padding: 0; + margin: auto; + min-height: calc(100vh - 40px); + justify-content: space-evenly; + } + + nav > a { + margin: 0; + } + + .navigation-dots { + display: none; + padding: 20px 10px; + position: absolute; + right: 0; + top: 0; + opacity: 0.75; + } + + .navigation-dots img { + width: 10px; + height: auto; + } + + body { + width: 100%; + } + + .subpage { + width: calc(100% - 20px); + overflow: hidden; + padding: 0 10px; + } + + .subpage-layout { + display: flex; + width: calc(700px + 300px); + margin: auto; + position: relative; + overflow: hidden; + } + + @media screen and (max-width: 1020px) { + .subpage-layout { + width: 100%; + } + } + + .subpage:nth-child(2n) { + background-color: #f6fff9; + } + + .subpage-left-part { + min-height: calc(100vh - 20px); + flex: 1 1 700px; + max-width: 700px; + padding: 10px 0; + display: flex; + flex-direction: column; + justify-content: center; + } + + .subpage-main-contents { + margin: 10px; + } + + @media screen and (max-width: 500px) { + .nav-container { + position: absolute; + right: -340px; + /* border will cover the 3 dots */ + border-right: 30px solid white; + border-left: 2px solid #f4f4f4; + padding-right: 0; + background-color: #ffffffc0; + z-index: 1; + } + + .subpage:nth-child(2n) .nav-container { + background-color: #f6fff9c0; + border-right: 30px solid #f6fff9; + } + + .nav-container:target { + right: -10px; + } + + .navigation-dots { + display: block; + } + } + + h3 { + text-align: center; + } + + li { + margin-bottom: 10px; + } {% endblock style %} + +{% macro nav(current_subpage_id) %} + + + Three dots, click to view mobile navigation panel + +{% endmacro %} + +{% macro subpage(subpage_id) %} +
+
+
+
+ {{ caller() }} +
+
+ {{ nav(subpage_id) }} +
+
+{% endmacro %} -- cgit v1.2.3