Merge pull request #31 from drgarcia1986/flat-header
add `HEADER_COLOR` option to render header with a simple color
This commit is contained in:
commit
5e0fb122a1
16
README.md
16
README.md
@ -18,6 +18,16 @@ To define custom header cover, set the property ``HEADER_COVER`` in ``pelicancon
|
||||
HEADER_COVER = 'static/my_image.png'
|
||||
```
|
||||
|
||||
### Header Color
|
||||
|
||||
To define a simple header background color, set the property ``HEADER_COLOR`` in ``pelicanconf.py``:
|
||||
|
||||
```python
|
||||
HEADER_COLOR = 'black'
|
||||
```
|
||||
|
||||
you can use any valid css color.
|
||||
|
||||
### Social URLs
|
||||
|
||||
Github, Twitter and Facebook URLs set these properties:
|
||||
@ -36,8 +46,8 @@ If you have new links add them to SOCIAL. The Name has to be the name of the cor
|
||||
|
||||
You can specify an external feed URL (e.g. FeedBurner) in ``SOCIAL`` using the
|
||||
``rss`` or ``rss-square`` icons. The icon will be shown in the footer with the
|
||||
rest of your ``SOCIAL`` accounts. A <link> tag for the external feed will be
|
||||
placed in <head> instead of the default Pelican feeds.
|
||||
rest of your ``SOCIAL`` accounts. A ``<link>`` tag for the external feed will be
|
||||
placed in ``<head>`` instead of the default Pelican feeds.
|
||||
|
||||
### Code highlights
|
||||
|
||||
@ -108,7 +118,7 @@ TWITTER_HANDLE = "myprofile"
|
||||
- Set ``SHOW_FULL_ARTICLE`` to True to show full article content on index.html
|
||||
instead of summary;
|
||||
- Set ``SHOW_SITESUBTITLE_IN_HTML`` to True to make use of the ``SITESUBTITLE``
|
||||
variable inside the <title> HTML tag;
|
||||
variable inside the ``<title>`` HTML tag;
|
||||
|
||||
### Articles
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
<!-- Page Header -->
|
||||
{% if HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||
{% endif %}
|
||||
|
@ -93,6 +93,8 @@
|
||||
<header class="intro-header" style="background-image: url('{{ article.header_cover }}')">
|
||||
{% elif HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/post-bg.jpg')">
|
||||
{% endif %}
|
||||
|
@ -6,6 +6,8 @@
|
||||
<!-- Page Header -->
|
||||
{% if HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||
{% endif %}
|
||||
|
@ -6,6 +6,8 @@
|
||||
<!-- Page Header -->
|
||||
{% if HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||
{% endif %}
|
||||
|
@ -6,6 +6,8 @@
|
||||
<!-- Page Header -->
|
||||
{% if HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||
{% endif %}
|
||||
|
@ -6,6 +6,8 @@
|
||||
<!-- Page Header -->
|
||||
{% if HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||
{% endif %}
|
||||
|
@ -5,6 +5,8 @@
|
||||
<!-- Set your background image for this header on the line below. -->
|
||||
{% if HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||
{% endif %}
|
||||
|
@ -8,6 +8,8 @@
|
||||
<header class="intro-header" style="background-image: url('{{ page.header_cover }}')">
|
||||
{% elif HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||
{% endif %}
|
||||
|
@ -6,6 +6,8 @@
|
||||
<!-- Page Header -->
|
||||
{% if HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||
{% endif %}
|
||||
|
@ -3,6 +3,8 @@
|
||||
{% block header %}
|
||||
{% if HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||
{% endif %}
|
||||
|
@ -6,6 +6,8 @@
|
||||
<!-- Page Header -->
|
||||
{% if HEADER_COVER %}
|
||||
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
||||
{% elif HEADER_COLOR %}
|
||||
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
||||
{% else %}
|
||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user