Browse Source

Move USE_FAVICON to _defaults

Talha Mansoor 11 years ago
parent
commit
13840ff70b
2 changed files with 11 additions and 1 deletions
  1. 9 0
      templates/_includes/_defaults.html
  2. 2 1
      templates/_includes/favicon_links.html

+ 9 - 0
templates/_includes/_defaults.html

@@ -105,6 +105,15 @@ search results and social media #}
 {% set SITESUBTITLE = SITESUBTITLE %}
 {% endif %}
 
+{# Set it to True to display favicon and speed dial icon. Also make sure that
+you have placed images in the appropriate directory and defined STATIC_PATHS
+accordingly #}
+{% if not USE_FAVICON %}
+{% set USE_FAVICON = False %}
+{% else %}
+{% set USE_FAVICON = USE_FAVICON %}
+{% endif %}
+
 {# It is a dictionary with two keys: title, details. Value of each key is a
 string. It is used to display About me section on the home page.
 LANDING_PAGE_ABOUT = {'title': 'Talha Mansoor',

+ 2 - 1
templates/_includes/favicon_links.html

@@ -1,4 +1,5 @@
-{%if USE_FAVICON %}
+{% from '_includes/_defaults.html' import USE_FAVICON with context %}
+{%if USE_FAVICON == True %}
         <link rel="shortcut icon" href="{{ SITEURL }}/theme/images/favicon.ico" type="image/x-icon" />
         <link rel="apple-touch-icon" href="{{ SITEURL }}/theme/images/apple-touch-icon.png" />
         <link rel="apple-touch-icon" sizes="57x57" href="{{ SITEURL }}/theme/images/apple-touch-icon-57x57.png" />