From 2c0e17cb977a1e8782799b337df8b1583d019906 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Mon, 12 Oct 2015 22:36:01 +0200 Subject: bootstraping react --- src/web/templates/categories.html | 36 ++++++++ src/web/templates/edit_category.html | 23 +++++ src/web/templates/emails/new_account.txt | 4 +- src/web/templates/feed_list.html | 2 +- src/web/templates/feeds.html | 2 +- src/web/templates/home2.html | 8 ++ src/web/templates/layout.html | 53 ++++------- src/web/templates/layout.html.orig | 149 +++++++++++++++++++++++++++++++ src/web/templates/opml.xml | 4 +- 9 files changed, 240 insertions(+), 41 deletions(-) create mode 100644 src/web/templates/categories.html create mode 100644 src/web/templates/edit_category.html create mode 100644 src/web/templates/home2.html create mode 100644 src/web/templates/layout.html.orig (limited to 'src/web/templates') diff --git a/src/web/templates/categories.html b/src/web/templates/categories.html new file mode 100644 index 00000000..a61cc4b2 --- /dev/null +++ b/src/web/templates/categories.html @@ -0,0 +1,36 @@ +{% extends "layout.html" %} +{% block content %} +
+

{{ _("You have %(categories)d categories · Add a %(start_link)scategory%(end_link)s", categories=categories|count, start_link=("" % url_for("category.form"))|safe, end_link=""|safe) }}

+ {% if categories|count == 0 %} +

{{_("No category")}}

+ {% else %} +
+ + + + + + + + + + + + {% for category in categories|sort(attribute="name") %} + + + + + + + + {% endfor %} + +
#{{ _('Name') }}{{ _('Feeds') }}{{ _('Articles') }}{{ _('Actions') }}
{{ loop.index }}{{ category.name }}{{ feeds_count.get(category.id, 0) }}( {{ unread_article_count.get(category.id, 0) }} ) {{ article_count.get(category.id, 0) }} + + +
+
+ {% endif %} +{% endblock %} diff --git a/src/web/templates/edit_category.html b/src/web/templates/edit_category.html new file mode 100644 index 00000000..93c952d6 --- /dev/null +++ b/src/web/templates/edit_category.html @@ -0,0 +1,23 @@ +{% extends "layout.html" %} +{% block content %} +
+
+

{{ action }}

+
+ {{ form.hidden_tag() }} +
+ +
+ {{ form.name(class_="form-control", size="100%") }} +
+ {% for error in form.name.errors %} {{ error }}
{% endfor %} +
+
+
+ {{ form.submit(class_="btn btn-default") }} +
+
+
+
+
+{% endblock %} diff --git a/src/web/templates/emails/new_account.txt b/src/web/templates/emails/new_account.txt index 6397f502..6335a34e 100644 --- a/src/web/templates/emails/new_account.txt +++ b/src/web/templates/emails/new_account.txt @@ -1,11 +1,11 @@ Hello {{ user.firstname }} {{ user.lastname }}, An account has been created for you. -You can now access the pyAggr3g470r platform ({{ platform_url }}). +You can now access the JARR platform ({{ platform_url }}). Your login is your e-mail address and your password is: --- {{ password }} --- -Regards, \ No newline at end of file +Regards, diff --git a/src/web/templates/feed_list.html b/src/web/templates/feed_list.html index 51561dee..114ae960 100644 --- a/src/web/templates/feed_list.html +++ b/src/web/templates/feed_list.html @@ -1,4 +1,4 @@ -{% if feeds| count == 0 %} +{% if feeds.count() == 0 %}

{{_("No feed")}}

{% else %}
diff --git a/src/web/templates/feeds.html b/src/web/templates/feeds.html index 074957f7..9523d43f 100644 --- a/src/web/templates/feeds.html +++ b/src/web/templates/feeds.html @@ -1,7 +1,7 @@ {% extends "layout.html" %} {% block content %}
-

{{ _('You are subscribed to') }} {{ feeds|count }} {{ _('feeds') }} · {{ _('Add a') }} {{ _('feed') }}

+

{{ _('You are subscribed to %(feed_count)d feeds.', feed_count=feeds.count()) }} · {{ _('Add a') }} {{ _('feed') }}

{% include "feed_list.html" %}
{% endblock %} diff --git a/src/web/templates/home2.html b/src/web/templates/home2.html new file mode 100644 index 00000000..54413b35 --- /dev/null +++ b/src/web/templates/home2.html @@ -0,0 +1,8 @@ +{% extends "layout.html" %} +{% block content %} +
+ + + + +{% endblock %} diff --git a/src/web/templates/layout.html b/src/web/templates/layout.html index eb213ca5..db5b6589 100644 --- a/src/web/templates/layout.html +++ b/src/web/templates/layout.html @@ -7,12 +7,12 @@ JARR{% if head_titles %} - {{ ' - '.join(head_titles) }}{% endif %} - + - + - - + + {% endblock %} @@ -125,42 +125,25 @@
- {% block messages %} - {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - {% for category, message in messages %} -
- - {{ message }} -
- {% endfor %} - {% endif %} - {% endwith %} - {% endblock %} + {% block messages %} + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} +
+ + {{ message }} +
+ {% endfor %} + {% endif %} + {% endwith %} + {% endblock %}
{% block content %}{% endblock %} - - - - - + + diff --git a/src/web/templates/layout.html.orig b/src/web/templates/layout.html.orig new file mode 100644 index 00000000..1abb0b68 --- /dev/null +++ b/src/web/templates/layout.html.orig @@ -0,0 +1,149 @@ + + + + {% block head %} + + + + + JARR{% if head_titles %} - {{ ' - '.join(head_titles) }}{% endif %} + + + + + + + {% endblock %} + + + +
+ +
+ {% block messages %} + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} +
+ + {{ message }} +
+ {% endfor %} + {% endif %} + {% endwith %} + {% endblock %} +
+ + {% block content %}{% endblock %} + + + + + + + + diff --git a/src/web/templates/opml.xml b/src/web/templates/opml.xml index 96fe66f5..051d3af6 100644 --- a/src/web/templates/opml.xml +++ b/src/web/templates/opml.xml @@ -1,5 +1,5 @@ - + Feeds of {{ user.nickname }} @@ -11,4 +11,4 @@ {% for feed in user.feeds %} {% endfor %} - \ No newline at end of file + -- cgit