Header fixes (#25)

* #21 changing logic to selecting cover image

- For categories, tags

- Some code refactor and indenting

* #21 initial codes for pelican unit tests

* #21 few more testing changes

* Ref #21 unit tests for article tests coverimages

* Ref #21 unit tests for page, tags, category and author coverimages

* Ref #21 readme updated
This commit is contained in:
Arul 2018-05-14 13:26:35 +05:30 committed by GitHub
parent 994b999633
commit 7b26ad1013
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 1283 additions and 127 deletions

View file

@ -6,6 +6,16 @@
{% include 'partials/jsonld.html' %}
{% endblock %}
{% if HEADER_COVER %}
{% if HEADER_COVER|lower|truncate(4, True, '') == "http" %}
{% set selected_cover = HEADER_COVER %}
{% else %}
{% set selected_cover = SITEURL+"/"+HEADER_COVER %}
{% endif %}
{% elif HEADER_COLOR %}
{% set selected_color = HEADER_COLOR %}
{% endif %}
{% block header %}
<!-- Page Header -->
<!-- Set your background image for this header on the line below. -->
@ -25,13 +35,14 @@
{% if SITESUBTITLE %}
<span class="blog-description">{{ SITESUBTITLE }}</span>
{% endif %}
{% if HEADER_COVER %}
<div class="blog-cover cover" style="background-image: url('{{ HEADER_COVER }}')">
{% elif HEADER_COLOR %}
<div class="blog-cover cover" style="background-color: {{ HEADER_COLOR }}">
{% if selected_cover %}
<div class="blog-cover cover" style="background-image: url('{{ selected_cover }}')">
{% elif selected_color %}
<div class="blog-cover cover" style="background-color: {{ selected_color }}">
{% else %}
<div class="blog-cover cover" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
{% endif %}
<div class="blog-cover cover" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/post-bg.jpg')">
{% endif %}
</div>
</header>
@ -44,4 +55,4 @@
{% include "partials/loop.html" %}
</main>
</div>
{% endblock content %}
{% endblock content %}