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
20
README.md
20
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_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
|
### Social URLs
|
||||||
|
|
||||||
Github, Twitter and Facebook URLs set these properties:
|
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
|
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
|
``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
|
rest of your ``SOCIAL`` accounts. A ``<link>`` tag for the external feed will be
|
||||||
placed in <head> instead of the default Pelican feeds.
|
placed in ``<head>`` instead of the default Pelican feeds.
|
||||||
|
|
||||||
### Code highlights
|
### Code highlights
|
||||||
|
|
||||||
@ -90,12 +100,12 @@ will not see the desired results.
|
|||||||
Accept many analytics:
|
Accept many analytics:
|
||||||
|
|
||||||
- Google Analytics: ``GOOGLE_ANALYTICS``;
|
- Google Analytics: ``GOOGLE_ANALYTICS``;
|
||||||
- Gauges: ``GAUGES``
|
- Gauges: ``GAUGES``
|
||||||
- Piwik: ``PIWIK_URL`` and ``PIWIK_SITE_ID``.
|
- Piwik: ``PIWIK_URL`` and ``PIWIK_SITE_ID``.
|
||||||
|
|
||||||
### Twitter cards
|
### Twitter cards
|
||||||
|
|
||||||
Twitter cards are automatically generated if TWITTER_HANDLE is set:
|
Twitter cards are automatically generated if TWITTER_HANDLE is set:
|
||||||
```python
|
```python
|
||||||
TWITTER_HANDLE = "myprofile"
|
TWITTER_HANDLE = "myprofile"
|
||||||
```
|
```
|
||||||
@ -108,7 +118,7 @@ TWITTER_HANDLE = "myprofile"
|
|||||||
- Set ``SHOW_FULL_ARTICLE`` to True to show full article content on index.html
|
- Set ``SHOW_FULL_ARTICLE`` to True to show full article content on index.html
|
||||||
instead of summary;
|
instead of summary;
|
||||||
- Set ``SHOW_SITESUBTITLE_IN_HTML`` to True to make use of the ``SITESUBTITLE``
|
- 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
|
### Articles
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<!-- Page Header -->
|
<!-- Page Header -->
|
||||||
{% if HEADER_COVER %}
|
{% if HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -93,6 +93,8 @@
|
|||||||
<header class="intro-header" style="background-image: url('{{ article.header_cover }}')">
|
<header class="intro-header" style="background-image: url('{{ article.header_cover }}')">
|
||||||
{% elif HEADER_COVER %}
|
{% elif HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/post-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/post-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<!-- Page Header -->
|
<!-- Page Header -->
|
||||||
{% if HEADER_COVER %}
|
{% if HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<!-- Page Header -->
|
<!-- Page Header -->
|
||||||
{% if HEADER_COVER %}
|
{% if HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<!-- Page Header -->
|
<!-- Page Header -->
|
||||||
{% if HEADER_COVER %}
|
{% if HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<!-- Page Header -->
|
<!-- Page Header -->
|
||||||
{% if HEADER_COVER %}
|
{% if HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
<!-- Set your background image for this header on the line below. -->
|
<!-- Set your background image for this header on the line below. -->
|
||||||
{% if HEADER_COVER %}
|
{% if HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
<header class="intro-header" style="background-image: url('{{ page.header_cover }}')">
|
<header class="intro-header" style="background-image: url('{{ page.header_cover }}')">
|
||||||
{% elif HEADER_COVER %}
|
{% elif HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<!-- Page Header -->
|
<!-- Page Header -->
|
||||||
{% if HEADER_COVER %}
|
{% if HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
{% block header %}
|
{% block header %}
|
||||||
{% if HEADER_COVER %}
|
{% if HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<!-- Page Header -->
|
<!-- Page Header -->
|
||||||
{% if HEADER_COVER %}
|
{% if HEADER_COVER %}
|
||||||
<header class="intro-header" style="background-image: url('{{ 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 %}
|
{% else %}
|
||||||
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/home-bg.jpg')">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user