From ef22f9165e003ae1b05cf9e9b25fbd174dbb5ff3 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 21 Jul 2022 13:46:05 +0100 Subject: [PATCH] Properly indent all templates --- .pre-commit-config.yaml | 3 +- core/templates/base.html | 86 ++++++++++----------- core/templates/checkout.html | 99 +++++++++++-------------- core/templates/denied.html | 16 ++-- core/templates/index.html | 18 ++--- core/templates/profile.html | 55 +++++++------- core/templates/registration/login.html | 42 +++++------ core/templates/registration/signup.html | 36 ++++----- core/templates/success.html | 8 +- core/templates/ui/drilldown.html | 39 +++++----- 10 files changed, 184 insertions(+), 218 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 273097e..8bbe608 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,4 +20,5 @@ repos: - repo: https://github.com/thibaudcolas/curlylint rev: v0.13.1 hooks: - - id: curlylint \ No newline at end of file + - id: curlylint + files: \.(html|sls)$ \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index c8c6ed8..09d1968 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,8 +1,7 @@ -{% load static %} +{% load static %} - - - + + s @@ -10,51 +9,46 @@ - - - - + +
- -
- -
- -
-
- {% block content %} - {% endblock %} +
+ +
+
+
+ {% block content %} + {% endblock %}
+
- + diff --git a/core/templates/checkout.html b/core/templates/checkout.html index c5861fa..1b79742 100644 --- a/core/templates/checkout.html +++ b/core/templates/checkout.html @@ -1,60 +1,51 @@ - + -
- -
- Data image -
-

Drilldown

-
200.00
-
+
- + .then(function (session) { + return stripe.redirectToCheckout({ sessionId: session.id }); + }) + .then(function (result) { + // If redirectToCheckout fails due to a browser or network + // error, you should display the localized error message to your + // customer using error.message. + if (result.error) { + alert(result.error.message); + } + }) + .catch(function (error) { + console.error("Error:", error); + }); + }); + diff --git a/core/templates/denied.html b/core/templates/denied.html index 66d3e01..c508c12 100644 --- a/core/templates/denied.html +++ b/core/templates/denied.html @@ -1,18 +1,14 @@ {% extends "base.html" %} {% block content %} -

- Access denied -

-

- Sorry, you do not have the necessary permissions to view this page. -

-
+

Access denied

+

Sorry, you do not have the necessary permissions to view this page.

+
{% if user.subscription_active %} - {% include 'checkout.html' %} + {% include 'checkout.html' %} {% else %} -

Please setup a payment mandate in the profile page to view products

+

Please setup a payment mandate in the profile page to view products

{% endif %} -
+
{% endblock %} diff --git a/core/templates/index.html b/core/templates/index.html index 21fbd40..2614412 100644 --- a/core/templates/index.html +++ b/core/templates/index.html @@ -1,18 +1,12 @@ {% extends "base.html" %} - {% block content %} -

- Pathogen Products Panel -

-

- Billing and subscription management -

-
+

Pathogen Products Panel

+

Billing and subscription management

+
{% if user.subscription_active %} - {% include 'checkout.html' %} + {% include 'checkout.html' %} {% else %} -

Please setup a payment mandate in the profile page to view products

+

Please setup a payment mandate in the profile page to view products

{% endif %} -
- +
{% endblock %} diff --git a/core/templates/profile.html b/core/templates/profile.html index 32039f9..0bf919b 100644 --- a/core/templates/profile.html +++ b/core/templates/profile.html @@ -1,42 +1,37 @@ {% extends "base.html" %} {% block content %} -

- Welcome, {{ user.first_name }}! -

- -
+

Welcome, {{ user.first_name }}!

+
-
+
-

Plan: {{ user.plan }}

-

Stripe ID: {{ user.stripeID }}

-

Setup intent: {{ user.seti }}

-

Mandate active: {{ user.mandateActive }}

-

Subscription ID: {{ user.subscriptionID }}

-

Last payment: {{ user.lastPayment }}

-

Creation date: {{ user.creationDate }}

-

Paid: {{ user.paid }}

+

Plan: {{ user.plan }}

+

Stripe ID: {{ user.stripeID }}

+

Setup intent: {{ user.seti }}

+

Mandate active: {{ user.mandateActive }}

+

Subscription ID: {{ user.subscriptionID }}

+

Last payment: {{ user.lastPayment }}

+

Creation date: {{ user.creationDate }}

+

Paid: {{ user.paid }}

-
- {% if user.seti %} - {% if user.plan == None %} - {% include 'checkout.html' %} - {% else %} -
- -
- {% endif %} - {% else %} - - {% endif %} -
- + {% if user.seti %} + {% if user.plan == None %} + {% include 'checkout.html' %} + {% else %} +
+ +
+ {% endif %} + {% else %} + + {% endif %}
+
-
+
-