Skip to content

Commit

Permalink
Fix per-page color and image
Browse files Browse the repository at this point in the history
  • Loading branch information
qwtel committed Sep 11, 2016
1 parent e3b40a4 commit 26766f2
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@

<link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url }}" />

{% assign color = page.color %}
{% assign color = site.color %}
{% assign image = site.image %}

{% unless color %}
{% if page.tag %}
{% assign tag = site.data.tags[page.tag] %}
{% assign color = tag.color %}
{% else %}
{% if page.tags.size > 0 %}
{% assign tag_name = page.tags[0] %}
{% assign tag = site.data.tags[tag_name] %}
{% assign color = tag.color %}
{% endif %}
{% if page.tag %}
{% assign tag = site.data.tags[page.tag] %}
{% if tag.color %}{% assign color = tag.color %}{% endif %}
{% if tag.image %}{% assign image = tag.image %}{% endif %}
{% else %}
{% if page.tags.size > 0 %}
{% assign tag_name = page.tags[0] %}
{% assign tag = site.data.tags[tag_name] %}
{% if tag.color %}{% assign color = tag.color %}{% endif %}
{% if tag.image %}{% assign image = tag.image %}{% endif %}
{% endif %}
{% endunless %}
{% endif %}

{% unless color %}
{% assign color = site.color %}
{% endunless %}
{% if page.color %}{% assign color = page.color %}{% endif %}
{% if page.image %}{% assign image = page.image %}{% endif %}

<style>
html {
Expand Down

0 comments on commit 26766f2

Please sign in to comment.