Skip to content

Commit

Permalink
Add header images and background colors. Fixes duilio#52
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed May 5, 2016
1 parent d6c3b15 commit 7f8fcd9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ Sidebar image
- ``SITESEARCH``: [default: 'http://google.com/search'] search engine to which
search form should be pointed (optional)

Header image or background color
--------------------------------

- ``header_cover`` - header background image. Configure as article metadata
- ``HEADER_COVER`` - global header background image setting
- ``header_color`` - header background color. Configure as article metadata
- ``HEADER_COLOR`` - global header background color setting

QR Code generation
-------------

Expand Down
13 changes: 12 additions & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,18 @@
</head>

<body>
<header role="banner">{% include '_includes/header.html' %}</header>
<header role="banner"
{% if article and article.header_cover %}
style="background-image: url('{{ article.header_cover }}')"
{% elif HEADER_COVER %}
style="background-image: url('{{ HEADER_COVER }}')"
{% elif article and article.header_color %}
style="background-color: {{ article.header_color }}"
{% elif HEADER_COLOR %}
style="background-color: {{ HEADER_COLOR }}"
{% endif %}
>
{% include '_includes/header.html' %}</header>
<nav role="navigation">{% include '_includes/navigation.html' %}</nav>
<div id="main">
<div id="content">
Expand Down

0 comments on commit 7f8fcd9

Please sign in to comment.