summaryrefslogtreecommitdiff
path: root/talermerchantdemos/templates
diff options
context:
space:
mode:
Diffstat (limited to 'talermerchantdemos/templates')
-rw-r--r--talermerchantdemos/templates/blog-article-refunded.html.j25
-rw-r--r--talermerchantdemos/templates/blog-base.html.j25
-rw-r--r--talermerchantdemos/templates/blog-confirm-refund.html.j24
-rw-r--r--talermerchantdemos/templates/blog-index.html.j238
-rw-r--r--talermerchantdemos/templates/common-base.html.j267
-rw-r--r--talermerchantdemos/templates/donations-base.html.j27
-rw-r--r--talermerchantdemos/templates/donations-index.html.j248
-rw-r--r--talermerchantdemos/templates/landing-index.html.j218
-rw-r--r--talermerchantdemos/templates/survey-base.html.j213
-rw-r--r--talermerchantdemos/templates/survey-error-graceful.html.j27
-rw-r--r--talermerchantdemos/templates/survey-error.html.j224
-rw-r--r--talermerchantdemos/templates/survey-index.html.j226
12 files changed, 117 insertions, 145 deletions
diff --git a/talermerchantdemos/templates/blog-article-refunded.html.j2 b/talermerchantdemos/templates/blog-article-refunded.html.j2
index 25b0af8..4252adb 100644
--- a/talermerchantdemos/templates/blog-article-refunded.html.j2
+++ b/talermerchantdemos/templates/blog-article-refunded.html.j2
@@ -13,6 +13,11 @@
{{
gettext("You will not be able to read the article until you pay for it again.")
}}
+<a href="{{ url_for('article', lang=article_lang, article_name=article_name) }}?new_if_refunded=yes" class="articleTitle">
+{{
+ gettext("Click here to pay it again.")
+}}
+</a>
</p>
{% endblock main %}
diff --git a/talermerchantdemos/templates/blog-base.html.j2 b/talermerchantdemos/templates/blog-base.html.j2
index 771f6ee..638ca70 100644
--- a/talermerchantdemos/templates/blog-base.html.j2
+++ b/talermerchantdemos/templates/blog-base.html.j2
@@ -1,12 +1,13 @@
{% extends "common-base.html.j2" %}
{% block head %}
- <link rel="stylesheet" type="text/css" href="{{ static('blog.css') }}" />
+ <link rel="stylesheet" type="text/css" href="{{ static('blog.css') }}">
+ <link rel="stylesheet" type="text/css" href="{{ static('colors-blog.css') }}">
{% endblock head %}
{% block header_content %}
-<h1><span class="it"><a href="{{ env('TALER_ENV_URL_MERCHANT_BLOG') }}">{{ gettext("Essay shop") }}</a></span></h1>
+<h1><span class="it"><a href="{{ env('TALER_ENV_URL_MERCHANT_BLOG', '#') }}">{{ gettext("Essay shop") }}</a></span></h1>
<p>{{
gettext("On this page you can buy articles using an imaginary currency.") + "<br>" +
gettext("The articles are chapters from Richard Stallman's book &quot;Free Software, Free Society&quot;.") + "<br>" +
diff --git a/talermerchantdemos/templates/blog-confirm-refund.html.j2 b/talermerchantdemos/templates/blog-confirm-refund.html.j2
index ab5dfcd..943081d 100644
--- a/talermerchantdemos/templates/blog-confirm-refund.html.j2
+++ b/talermerchantdemos/templates/blog-confirm-refund.html.j2
@@ -18,6 +18,8 @@
<form action="{{ url_for('refund', order_id=order_id) }}" method="POST">
<input type="text" name="article_name" value={{ article_name}} hidden>
- <input type="submit" value="{{ gettext('Request refund') }}">
+ <button class="pure-button pure-button-primary" name="submit">
+ {{ gettext('Request refund') }}
+ </button>
</form>
{% endblock main %}
diff --git a/talermerchantdemos/templates/blog-index.html.j2 b/talermerchantdemos/templates/blog-index.html.j2
index 99656ef..b2f18e4 100644
--- a/talermerchantdemos/templates/blog-index.html.j2
+++ b/talermerchantdemos/templates/blog-index.html.j2
@@ -1,31 +1,35 @@
{% extends "blog-base.html.j2" %}
{% block main %}
- <h2>{{ gettext("Essay Shop: Free Software, Free Society") }} </h2>
- <div style="font-size: smaller;">
- <p>{{ gettext("This is the latest edition of <cite>Free Software, Free Society: Selected Essays of Richard M. Stallman.</cite>") }} <br>
- Free Software Foundation<br>
- 51 Franklin Street, Fifth Floor<br>
- Boston, MA 02110-1335
- <br>
- Copyright &copy; 2002, 2010 Free Software Foundation, Inc.
- </p>
+ <h2 class="essay-shop-title">{{ gettext("Essay Shop: Free Software, Free Society") }} </h2>
+ <a href="#" class="info-icon">
+ &ZeroWidthSpace;
+ <div style="font-size: smaller;" class="fsfs-license">
+ <p>{{ gettext("This is the latest edition of <cite>Free Software, Free Society: Selected Essays of Richard M. Stallman.</cite>") }} <br>
+ Free Software Foundation<br>
+ 51 Franklin Street, Fifth Floor<br>
+ Boston, MA 02110-1335
+ <br>
+ Copyright &copy; 2002, 2010 Free Software Foundation, Inc.
+ </p>
- <p>{{ gettext("Verbatim copying and distribution of this entire book are permitted worldwide, without royalty, in any medium, provided this notice is preserved. Permission is granted to copy and distribute translations of this book from the original English into another language provided the translation has been approved by the Free Software Foundation and the copyright notice and this permission notice are preserved on all copies.") }}
- </p>
- <p>ISBN 978-0-9831592-0-9</p>
- </div>
+ <p>{{ gettext("Verbatim copying and distribution of this entire book are permitted worldwide, without royalty, in any medium, provided this notice is preserved. Permission is granted to copy and distribute translations of this book from the original English into another language provided the translation has been approved by the Free Software Foundation and the copyright notice and this permission notice are preserved on all copies.") }}
+ </p>
+ <p>ISBN 978-0-9831592-0-9</p>
+
+ <p>Tap outside of this box to hide</p>
+ </div>
+ </a>
<h2>{{ gettext("Chapters") }} </h2>
<div>
- {{ gettext("Click on an individual chapter to to purchase it with GNU Taler.") }}
- {{ gettext('You can get free, virtual money to buy articles on this page at the <a href="{}")">bank</a>.').format(env('TALER_ENV_URL_BANK')) }}
+ {{ gettext("Click on an individual chapter to purchase it with GNU Taler.") }}
+ {{ gettext('You can get free, virtual money to buy articles on this page at the <a href="{}">bank</a>.').format(env('TALER_ENV_URL_BANK')) }}
</div>
-
<div>
{% for article in articles %}
<div class="notice">
<h3><a href="{{ url_for('article', lang=article.lang, article_name=article.slug) }}" class="articleTitle">{{article.title}}</a></h3>
- <p>{{ article.teaser|safe }} <a href="{{ url_for('article', lang=article.lang, article_name=article.slug) }}">({{ gettext('Pay to read more...') }})</a></p>
+ {{ article.teaser|safe }} <a class="payLink" href="{{ url_for('article', lang=article.lang, article_name=article.slug) }}"><span class="icon"></span>{{ gettext('Pay to read more...') }}</a><br>
</div>
{% else %}
<em>({{ gettext("No articles available in this language.") }})</em>
diff --git a/talermerchantdemos/templates/common-base.html.j2 b/talermerchantdemos/templates/common-base.html.j2
index fd5a371..f37a306 100644
--- a/talermerchantdemos/templates/common-base.html.j2
+++ b/talermerchantdemos/templates/common-base.html.j2
@@ -15,24 +15,38 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<html>
+<html lang="{{ getlang() }}">
<head>
<title>{{ page_title | default(gettext("GNU Taler Demo")) }}</title>
- <link rel="stylesheet" type="text/css" href="{{ static('pure.css') }}" />
- <link rel="stylesheet" type="text/css" href="{{ static('demo.css') }}" />
+ <link rel="stylesheet" type="text/css" href="{{ static('pure.css') }}">
+ <link rel="stylesheet" type="text/css" href="{{ static('demo.css') }}">
{% block head %}
{% endblock %}
+ <script>
+ function resetState() {
+ document.getElementById("lang").classList.add("hide");
+ }
+ function bodyKeyPress(event) {
+ if (event.code === "Escape") {
+ resetState();
+ }
+ }
+ function bodyOnClick(event) {
+ resetState();
+ }
+ </script>
</head>
-<body>
+<body onkeydown="bodyKeyPress(event)" onclick="bodyOnClick(event)">
<header class="demobar" style="display: flex; flex-direction: row; justify-content: space-between;">
+ <a href="#main" class="skip">Skip to main content</a>
<div style="max-width: 50em; margin-left: 2em;">
{% block header_content %}
<p>This is the header content.</p>
{% endblock %}
</div>
<a href="https://taler.net/">
- <img src="{{ static('logo-white.svg') }}" height="100" width="224" style="margin: 2em 2em"><br/>
+ <img src="{{ static('logo-white.svg') }}" alt="GNU Taler logo" height="100" width="224" style="margin: 2em 2em"><br>
</a>
</header>
@@ -42,7 +56,7 @@
<a href="{{ env('TALER_ENV_URL_INTRO', '#') + getlang() + '/' }}"
{% if getactive() == 'landing' %} class="active" {% endif %}
>{{gettext("Introduction")}}</a>
- <a href="{{ env('TALER_ENV_URL_BANK', '#') + getlang() + '/' }}"
+ <a href="{{ env('TALER_ENV_URL_BANK', '#') + '?lang=' + getlang() }}"
{% if getactive() == 'bank' %} class="active" {% endif %}
>{{gettext("Bank")}}</a>
<a href="{{ env('TALER_ENV_URL_MERCHANT_BLOG', '#') + getlang() + '/' }}"
@@ -51,26 +65,33 @@
<a href="{{ env('TALER_ENV_URL_MERCHANT_DONATIONS', '#') + getlang() + '/' }}"
{% if getactive() == 'donations' %} class="active" {% endif %}
>{{gettext("Donations")}}</a>
- <a href="{{ env('TALER_ENV_URL_MERCHANT_SURVEY', '#') + getlang() + '/' }}"
- {% if getactive() == 'survey' %} class="active" {% endif %}
- >{{gettext("Tipping/Survey")}}</a>
+ <script>
+ function handleLang(event){
+ if (event.type === 'click') {
+ document.getElementById("lang").classList.toggle("hide");
+ event.stopPropagation();
+ }
+ }
+ </script>
{# Language Selector #}
<div class="right">
- <span>{{ all_languages[getlang()] | default("en") }}</span>
- <div style="position: relative; overflow: visible;">
- <div class="nav" style="position: absolute; background: #0042b2; max-height: 60vh; overflow-y: scroll">
- <br>
- {% for lang_code, lang_display in all_languages.items() %}
- {% if lang_code != getlang() %}
- <a href="/{{ lang_code }}/" class="navbtn langbtn">{{ lang_display }}</a>
- <br>
- {% endif %}
- {% endfor %}
- </div>
+ <button onkeydown="handleLang(event)" onclick="handleLang(event)" name="language">
+ {{ all_languages[getlang()] | default("en") }}
+ </button>
+ <div id="lang" class="hide">
+ <div style="position: relative; overflow: visible;">
+ <div class="nav" style="position: absolute; max-height: 60vh; overflow-y: scroll">
+ {% for lang_code, lang_display in all_languages.items() %}
+ {% if lang_code != getlang() %}
+ <a href="{{ url_for('index') + lang_code + '/' }}"
+ class="navbtn langbtn">{{ lang_display }}</a>
+ {% endif %}
+ {% endfor %}
+ </div>
+ </div>
</div>
</div>
-
</nav>
</div>
@@ -78,7 +99,7 @@
{% block main %}
This is the main content of the page.
{% endblock %}
- <hr />
+ <hr>
<div>
<p>
{{
@@ -86,7 +107,7 @@
}}
</p>
<div style="flex-grow:1"></div>
- <p>Copyright &copy; 2014&mdash;2021 Taler Systems SA</p>
+ <p>Copyright &copy; 2014&mdash;2022 Taler Systems SA</p>
</div>
</section>
</body>
diff --git a/talermerchantdemos/templates/donations-base.html.j2 b/talermerchantdemos/templates/donations-base.html.j2
index b214eac..aec8794 100644
--- a/talermerchantdemos/templates/donations-base.html.j2
+++ b/talermerchantdemos/templates/donations-base.html.j2
@@ -1,9 +1,14 @@
{% extends "common-base.html.j2" %}
+{% block head %}
+ <link rel="stylesheet" type="text/css" href="{{ static('colors-donations.css') }}" />
+{% endblock head %}
+
+
{% block header_content %}
<h1>
-<span class="it"><a href="{{ env('TALER_ENV_URL_MERCHANT_DONATIONS') }}">{{gettext("Donations")}}</a></span></h1>
+<span class="it"><a href="{{ env('TALER_ENV_URL_MERCHANT_DONATIONS', '#') }}">{{gettext("Donations")}}</a></span></h1>
<p>{{
gettext ("This is the donation page.") + "<br>" +
gettext ("Using this page you can make donations in {currency} to Free Software projects.").format(currency=merchant_currency)
diff --git a/talermerchantdemos/templates/donations-index.html.j2 b/talermerchantdemos/templates/donations-index.html.j2
index 05e958e..b50e4f3 100644
--- a/talermerchantdemos/templates/donations-index.html.j2
+++ b/talermerchantdemos/templates/donations-index.html.j2
@@ -6,7 +6,7 @@
<p>
{{
gettext("This donations website shows the user experience for donations with GNU Taler.") + "<br>" +
- gettext("You can make donations in an toy currency ({currency})").format(currency=merchant_currency)
+ gettext("You can make donations in a toy currency ({currency})").format(currency=merchant_currency)
}}
</p>
@@ -19,19 +19,39 @@
<form name="tform" action="{{ url_for('checkout',lang=getlang()) }}" method="GET" class="pure-form">
<div class="participation" id="fake-shop">
- <select name="donation_receiver">
- <option value="GNUnet">GNUnet</option>
- <option value="Taler">GNU Taler</option>
- <option value="Tor">Tor</option>
- </select>
- <select id="taler-donation" name="donation_amount">
- <option value="{{ merchant_currency }}:0.1">0.1 {{ merchant_currency }}</option>
- <option value="{{ merchant_currency }}:1">1 {{ merchant_currency }}</option>
- <option value="{{ merchant_currency }}:6">5 {{ merchant_currency }}</option>
- <option value="{{ merchant_currency }}:10">10 {{ merchant_currency }}</option>
- </select>
- <input type="text" name="donation_donor" value="{{gettext("Anonymous Donor")}}" />
- <input type="submit" class="pure-button pure-button-primary" value="{{gettext("Donate!")}}" />
+ <div>
+ <label>
+ Receiver:
+ <select name="donation_receiver">
+ <option value="gnunet">GNUnet</option>
+ <option value="taler">GNU Taler</option>
+ <option value="tor">Tor</option>
+ </select>
+ </label>
+ </div>
+
+ <div>
+ <label>
+ Amount:
+ <select id="taler-donation" name="donation_amount">
+ <option value="{{ merchant_currency }}:0.1">0.1 {{ merchant_currency }}</option>
+ <option value="{{ merchant_currency }}:1">1 {{ merchant_currency }}</option>
+ <option value="{{ merchant_currency }}:6">5 {{ merchant_currency }}</option>
+ <option value="{{ merchant_currency }}:10">10 {{ merchant_currency }}</option>
+ </select>
+ </label>
+ </div>
+
+ <div>
+ <label>
+ Donor:
+ <input type="text" name="donation_donor" value="{{gettext("Anonymous Donor")}}" />
+ </label>
+ </div>
+
+ <button class="pure-button pure-button-primary" name="submit">
+ {{gettext("Donate!")}}
+ </button>
</div>
</form>
<p class="graybox">
diff --git a/talermerchantdemos/templates/landing-index.html.j2 b/talermerchantdemos/templates/landing-index.html.j2
index bb9dde7..0cf4788 100644
--- a/talermerchantdemos/templates/landing-index.html.j2
+++ b/talermerchantdemos/templates/landing-index.html.j2
@@ -62,23 +62,7 @@
</p>
</article>
<article>
- <h2>{{ gettext("Step 5: Survey") }}</h2>
- <p>
- {{
- gettext("Websites can give tips to visitors for completing tasks.") + "<br>" +
- gettext('You can earn some {currency} coins by filling in our <a href="{url}">survey</a>.').format(url=merchant_survey_url,currency=merchant_currency)
- }}
- </p>
- </article>
- <!-- article>
- <h2>Step 6: Are you a merchant? Taler has a build-in back-office!</h2>
- <p>
- If you are a merchant, you can check the <a href="{{ backoffice_url }}">back-office</a>
- website to see how your Taler transactions got payed back by bank wire transfers.
- </p>
- </article -->
- <article>
- <h2>{{ gettext("Step 6: Reach out to us") }}</h2>
+ <h2>{{ gettext("Step 5: Reach out to us") }}</h2>
<p>
{{
gettext("We appreciate feedback about Taler and this demonstrator.") + "<br>" +
diff --git a/talermerchantdemos/templates/survey-base.html.j2 b/talermerchantdemos/templates/survey-base.html.j2
deleted file mode 100644
index f35f514..0000000
--- a/talermerchantdemos/templates/survey-base.html.j2
+++ /dev/null
@@ -1,13 +0,0 @@
-{% extends "common-base.html.j2" %}
-
-{% block header_content %}
-
-<h1>
-<span class="it"><a href="{{ env('TALER_ENV_URL_MERCHANT_SURVEY') }}">{{ gettext("Survey") }}</a></span></h1>
-<p>{{
-gettext("This page demonstrates how to tip visitors for completing small tasks.") + "<br>" +
-gettext("Tipping is a way for offer cash rewards that go directly into a user's wallet.")
-}}
-</p>
-
-{% endblock %}
diff --git a/talermerchantdemos/templates/survey-error-graceful.html.j2 b/talermerchantdemos/templates/survey-error-graceful.html.j2
deleted file mode 100644
index ece2252..0000000
--- a/talermerchantdemos/templates/survey-error-graceful.html.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-{% extends "survey-base.html.j2" %}
-{% block main %}
- <h1>{{ gettext("Unexpected result") }}</h1>
-
- <p>{{ message }}</p>
-
-{% endblock main %}
diff --git a/talermerchantdemos/templates/survey-error.html.j2 b/talermerchantdemos/templates/survey-error.html.j2
deleted file mode 100644
index b2f84f9..0000000
--- a/talermerchantdemos/templates/survey-error.html.j2
+++ /dev/null
@@ -1,24 +0,0 @@
-{% extends "survey-base.html.j2" %}
-{% block main %}
- <h1>{{ gettext("Error encountered") }}</h1>
-
- <p>{{ message }}</p>
-
- {% if status_code %}
- <p>
- {{ gettext ("The backend returned status code {code}.").format(code=status_code) }}
- </p>
- {% endif %}
-
- {% if json %}
- <p>{{gettext("Backend response:")}}</p>
- <pre>{{ json }}</pre>
- {% endif %}
-
- {% if stack %}
- <p>{{gettext("Stack trace:")}}</p>
- <pre>
- {{ stack }}
- </pre>
- {% endif %}
-{% endblock main %}
diff --git a/talermerchantdemos/templates/survey-index.html.j2 b/talermerchantdemos/templates/survey-index.html.j2
deleted file mode 100644
index d860573..0000000
--- a/talermerchantdemos/templates/survey-index.html.j2
+++ /dev/null
@@ -1,26 +0,0 @@
-{% extends "survey-base.html.j2" %}
-{% block main %}
- <div>
- <p>
- {{
- gettext("Please participate in our survey about payment systems and receive a tip in return.")
- }}
- </p>
- </div>
- <div>
- <form action="{{ "/" + getlang() + "/submit-survey" }}" method="post" class="pure-form pure-form-stacked">
- <legend>{{ gettext("Which payment system do you prefer?") }}</legend>
- <fieldset>
- <label for="option-taler">
- <input id="option-taler" type="radio" name="paypref" value="taler" checked="checked" />
- Taler
- </label>
- <label for="option-visa">
- <input id="option-visa" type="radio" name="paypref" value="visa" />
- Visa
- </label>
- </fieldset>
- <input type="submit" value="{{ gettext("Submit Survey")}}" class="pure-button pure-button-primary" />
- </form>
- </div>
-{% endblock %}