example correction that prevents author's cover images from being ove… (#28)

* example correction that prevents author's cover images from being overwritten by inherited code in index.html

* article, author, category and tag extends to base.html instead of index.html
This commit is contained in:
Age Manning 2018-07-09 03:14:41 +10:00 committed by Arul
parent b29690fba3
commit b60a72e189
4 changed files with 36 additions and 7 deletions

View file

@ -1,4 +1,5 @@
{% extends "base.html" %}
{% block title %}{{ article.title }}{% endblock %}
{# <!-- Choosing cover image --> #}
@ -14,14 +15,14 @@
{% else %}
{% set selected_cover = SITEURL+"/"+article.og_image %}
{% endif %}
{% elif article.color %}
{% set selected_color = article.color %}
{% elif HEADER_COVER %}
{% if HEADER_COVER|lower|truncate(4, True, '') == "http" %}
{% set selected_cover = HEADER_COVER %}
{% else %}
{% set selected_cover = SITEURL+"/"+HEADER_COVER %}
{% endif %}
{% elif article.color %}
{% set selected_color = article.color %}
{% elif HEADER_COLOR %}
{% set selected_color = HEADER_COLOR %}
{% endif %}