diff options
author | Katharina Fey <kookie@spacekookie.de> | 2018-01-22 21:12:21 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2018-01-22 21:12:21 +0100 |
commit | b664865f3a370ce1a998eb309e03023b0bb6cc4f (patch) | |
tree | 495ae843469720fe4bdb2cb312f23d7ab63f7eb9 | |
parent | 25fd8b3905c9b7d092281b481826a744c0dadd40 (diff) |
Refactoring the templates a bit. Fixing some bugs
-rw-r--r-- | crumbs/static/css/cr_title.css | 4 | ||||
-rw-r--r-- | crumbs/static/css/crumbs.css | 9 | ||||
-rwxr-xr-x | crumbs/templates/article.html | 27 | ||||
-rw-r--r-- | crumbs/templates/article_header.html | 4 | ||||
-rw-r--r-- | crumbs/templates/card_content.html | 14 | ||||
-rwxr-xr-x | crumbs/templates/category.html | 30 |
6 files changed, 30 insertions, 58 deletions
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 @@ <h1>{{ article.title }}</h1> -<div class="card"> +{% with type='single' %} +{% include "card_content.html" %} +{% endwith %} - <div class="card-header"> - {% set in_article = true %} - {% include "article_header.html" %} - </div> - - <div class="card-content"> - {{ article.content }} - </div> -</div> - - <!-- <div class="col-lg-9 content"> - {{ article.content }} - - {% if article.related_posts %} - <h4>Articles connexes</h4> - <dl class="dl-horizontal"> - {% for related_post in article.related_posts %} - <dt>{{ related_post.locale_date}}</dt> - <dd><a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a></dd> - {% endfor %} - </dl> - {% endif %} - </div> --> {% 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 @@ <p>< Back</p> </div> --> -{% if in_article == true %} +{% if type == 'single' %} <h3 class="card-header-url"><a href="{{ SITEURL }}/{{ article.category|lower }}"> ⇠ Back</a></h3> +{% else %} +<h2 class="card-header-url"><b><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></b></h2> {% endif %} <div class="article-meta"> 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 @@ + +<div class="card"> + <div class="card-header"> + {% include "article_header.html" %} + </div> + + <div class="card-content"> + {% if type == 'single' %} + {{ article.content }} + {% else %} + {{ article.summary }} + {% endif %} + </div> +</div> 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 @@ <h1>{{ category }}</h1> {% for article in articles %} -<div class="card"> - <div class="card-header"> - <h2 class="card-header-url"><b><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></b></h2> - {% set in_article = false %} - {% include "article_header.html" %} - </div> - - <div class="card-content"> - {{ article.summary }} - </div> -</div> + {% with type='multi' %} + {% include "card_content.html" %} + {% endwith %} {% endfor %} - - -<!-- <div class="col-lg-12 content"> --> - <!-- <dl class="dl-horizontal"> --> - - <!-- This loops through all the articles --> - <!-- {% for article in articles %} --> - <!-- <dt><p>{{ article.locale_date}}</p></dt> --> - <!-- <dd> --> - <!-- <a href="{{ SITEURL }}/{{ article.url }}"><h2>{{ article.title }}</h2></a> --> - <!-- <p>{{ article.summary }}</p> --> - <!-- </dd> --> - <!-- {% endfor %} --> - <!-- </dl> --> -<!-- </div> --> - {% endblock content %} |