From b664865f3a370ce1a998eb309e03023b0bb6cc4f Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Mon, 22 Jan 2018 21:12:21 +0100 Subject: Refactoring the templates a bit. Fixing some bugs --- crumbs/static/css/cr_title.css | 4 ++-- crumbs/static/css/crumbs.css | 9 +++++---- crumbs/templates/article.html | 27 +++------------------------ crumbs/templates/article_header.html | 4 +++- crumbs/templates/card_content.html | 14 ++++++++++++++ crumbs/templates/category.html | 30 +++--------------------------- 6 files changed, 30 insertions(+), 58 deletions(-) create mode 100644 crumbs/templates/card_content.html diff --git a/crumbs/static/css/cr_title.css b/crumbs/static/css/cr_title.css index c8344c9..2535083 100644 --- a/crumbs/static/css/cr_title.css +++ b/crumbs/static/css/cr_title.css @@ -40,10 +40,10 @@ p { display: inline-block; } */ -/* a:hover, a:active, a:link{ +a, a:visited a:hover, a:active, a:link { color: #BEBEBE; text-decoration: none; -} */ +} #twitter:hover { color: #6997c8; diff --git a/crumbs/static/css/crumbs.css b/crumbs/static/css/crumbs.css index 15c1c94..e87717d 100644 --- a/crumbs/static/css/crumbs.css +++ b/crumbs/static/css/crumbs.css @@ -14,6 +14,7 @@ body { -webkit-font-smoothing:antialiased; text-rendering: optimizeLegibility; margin: 0; + overflow-y: scroll; } a { @@ -63,8 +64,8 @@ h1, h2, h3, h4 { line-height: 50px; font-weight: 500; font-size: 22px; - padding-top: 12px; - padding-bottom: 25px; + padding-top: 22px; + padding-bottom: 32px; /* padding-right: 32px; height: 50px; @@ -199,8 +200,8 @@ code { padding: 3px 3px; } font-size: 22px; font-weight: 300; padding-bottom: 15px; - padding-left: 35px; - padding-right: 50px; + padding-left: 25px; + padding-right: 25px; text-indent: 25px; } diff --git a/crumbs/templates/article.html b/crumbs/templates/article.html index 3406502..9cb1d52 100755 --- a/crumbs/templates/article.html +++ b/crumbs/templates/article.html @@ -8,29 +8,8 @@

{{ article.title }}

-
+{% with type='single' %} +{% include "card_content.html" %} +{% endwith %} -
- {% set in_article = true %} - {% include "article_header.html" %} -
- -
- {{ article.content }} -
-
- - {% endblock %} diff --git a/crumbs/templates/article_header.html b/crumbs/templates/article_header.html index 4f265b7..be8283f 100644 --- a/crumbs/templates/article_header.html +++ b/crumbs/templates/article_header.html @@ -2,8 +2,10 @@

< Back

--> -{% if in_article == true %} +{% if type == 'single' %}

⇠ Back

+{% else %} +

{{ article.title }}

{% endif %}
diff --git a/crumbs/templates/card_content.html b/crumbs/templates/card_content.html new file mode 100644 index 0000000..245d66b --- /dev/null +++ b/crumbs/templates/card_content.html @@ -0,0 +1,14 @@ + +
+
+ {% include "article_header.html" %} +
+ +
+ {% if type == 'single' %} + {{ article.content }} + {% else %} + {{ article.summary }} + {% endif %} +
+
diff --git a/crumbs/templates/category.html b/crumbs/templates/category.html index 916ea92..f741c6e 100755 --- a/crumbs/templates/category.html +++ b/crumbs/templates/category.html @@ -8,33 +8,9 @@

{{ category }}

{% for article in articles %} -
-
-

{{ article.title }}

- {% set in_article = false %} - {% include "article_header.html" %} -
- -
- {{ article.summary }} -
-
+ {% with type='multi' %} + {% include "card_content.html" %} + {% endwith %} {% endfor %} - - - - - - - - - - - - - - - - {% endblock content %} -- cgit v1.2.3