base.html improvements

- only show social buttons if URLs are defined
- new CSS_OVERRIDE setting for user defined CSS
- new DISABLE_CUSTOM_THEME_JAVASCRIPT setting to disable theme
JavaScript which breaks forms and input fields
This commit is contained in:
Alexander Todorov 2015-11-26 00:34:35 +02:00
parent dd81fafa5f
commit 7f5a7ce939
2 changed files with 29 additions and 2 deletions

View File

@ -46,6 +46,20 @@ To customize, define ``COLOR_SCHEME_CSS`` in ``pelicanconf.py`` with css filenam
COLOR_SCHEME_CSS = 'monokai.css'
```
### User defined CSS
Define ``CSS_OVERRIDE`` in ``pelicanconf.py`` to insert a user defined CSS file
after theme CSS. Example:
```python
CSS_OVERRIDE = 'myblog.css'
```
### Disable theme JavaScript
Set ``DISABLE_CUSTOM_THEME_JAVASCRIPT`` to True if you want to disable
``js/clean-blog.min.js`` in case it affects forms and input fields.
### Analytics
Accept many analytics:

View File

@ -49,6 +49,11 @@
<link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/code_blocks/darkly.css" rel="stylesheet">
{% endif %}
{% if CSS_OVERRIDE %}
<!-- CSS specified by the user -->
<link href="{{ SITEURL }}/{{ CSS_OVERRIDE }}" rel="stylesheet">
{% endif %}
<!-- Custom Fonts -->
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
@ -128,6 +133,7 @@
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center">
{% if TWITTER_URL %}
<li>
<a href="{{ TWITTER_URL }}">
<span class="fa-stack fa-lg">
@ -136,6 +142,8 @@
</span>
</a>
</li>
{% endif %}
{% if FACEBOOK_URL %}
<li>
<a href="{{ FACEBOOK_URL }}">
<span class="fa-stack fa-lg">
@ -144,6 +152,8 @@
</span>
</a>
</li>
{% endif %}
{% if GITHUB_URL %}
<li>
<a href="{{ GITHUB_URL }}">
<span class="fa-stack fa-lg">
@ -152,6 +162,7 @@
</span>
</a>
</li>
{% endif %}
</ul>
<p class="copyright text-muted">Blog powered by <a href="http://getpelican.com">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.</p>
@ -166,8 +177,10 @@
<!-- Bootstrap Core JavaScript -->
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/bootstrap.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/clean-blog.min.js"></script>
{% if not DISABLE_CUSTOM_THEME_JAVASCRIPT %}
<!-- Custom Theme JavaScript -->
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/clean-blog.min.js"></script>
{% endif %}
{% include 'analytics.html' %}
{% include 'disqus_script.html' %}