From e5903eebb20c38fc9aea52102a01de8efe5db275 Mon Sep 17 00:00:00 2001 From: Sonny Date: Sat, 23 May 2020 12:59:50 +0200 Subject: [PATCH] Add card component --- .../templates/components/card/card.html | 13 +++++++++ .../templates/components/card/content.html | 3 +++ .../templates/components/card/footer.html | 3 +++ .../templates/components/card/header.html | 3 +++ .../password-reset-complete.html | 24 +++++------------ .../password-reset-confirm.html | 26 +++++++----------- .../password-reset/password-reset-done.html | 21 +++++---------- .../registration/activation_complete.html | 27 +++++++------------ .../registration/activation_failure.html | 16 +++-------- .../activation_resend_complete.html | 18 ++++--------- .../registration/registration_closed.html | 16 +++-------- .../registration/registration_complete.html | 18 +++---------- 12 files changed, 71 insertions(+), 117 deletions(-) create mode 100644 src/newsreader/templates/components/card/card.html create mode 100644 src/newsreader/templates/components/card/content.html create mode 100644 src/newsreader/templates/components/card/footer.html create mode 100644 src/newsreader/templates/components/card/header.html diff --git a/src/newsreader/templates/components/card/card.html b/src/newsreader/templates/components/card/card.html new file mode 100644 index 0000000..750bd06 --- /dev/null +++ b/src/newsreader/templates/components/card/card.html @@ -0,0 +1,13 @@ +
+ {% if header_text %} + {% include "components/card/header.html" %} + {% endif %} + + {% if content %} + {% include "components/card/content.html" %} + {% endif %} + + {% if footer_text %} + {% include "components/card/footer.html" %} + {% endif %} +
diff --git a/src/newsreader/templates/components/card/content.html b/src/newsreader/templates/components/card/content.html new file mode 100644 index 0000000..8ae0141 --- /dev/null +++ b/src/newsreader/templates/components/card/content.html @@ -0,0 +1,3 @@ +
+

{{ content }}

+
diff --git a/src/newsreader/templates/components/card/footer.html b/src/newsreader/templates/components/card/footer.html new file mode 100644 index 0000000..1acffe0 --- /dev/null +++ b/src/newsreader/templates/components/card/footer.html @@ -0,0 +1,3 @@ + diff --git a/src/newsreader/templates/components/card/header.html b/src/newsreader/templates/components/card/header.html new file mode 100644 index 0000000..567756a --- /dev/null +++ b/src/newsreader/templates/components/card/header.html @@ -0,0 +1,3 @@ +
+

{{ header_text }}

+
diff --git a/src/newsreader/templates/password-reset/password-reset-complete.html b/src/newsreader/templates/password-reset/password-reset-complete.html index 8a47f55..0b7796f 100755 --- a/src/newsreader/templates/password-reset/password-reset-complete.html +++ b/src/newsreader/templates/password-reset/password-reset-complete.html @@ -1,23 +1,13 @@ {% extends "base.html" %} -{% load static i18n %} - -{% block title %}{% trans "Password reset complete" %}{% endblock %} +{% load i18n %} {% block content %}
-
-
-

{% trans "Password reset complete" %}

-
-
-

- {% trans "Your password has been reset!" %} - {% blocktrans %} - You may now log in - {% endblocktrans %}. -

-
- + {% trans "Password reset complete" as header_text %} + {% blocktrans asvar content %} + You may now log in + {% endblocktrans %} + + {% include "components/card/card.html" with header_text=header_text content=content %}
{% endblock %} diff --git a/src/newsreader/templates/password-reset/password-reset-confirm.html b/src/newsreader/templates/password-reset/password-reset-confirm.html index 93c1975..d0d5037 100755 --- a/src/newsreader/templates/password-reset/password-reset-confirm.html +++ b/src/newsreader/templates/password-reset/password-reset-confirm.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load static i18n %} +{% load i18n %} {% block meta %}