Parcourir la source

Move LANDING_PAGE_ABOUT to _defaults

Talha Mansoor il y a 11 ans
Parent
commit
f5fb0dbf77
2 fichiers modifiés avec 15 ajouts et 0 suppressions
  1. 13 0
      templates/_includes/_defaults.html
  2. 2 0
      templates/index.html

+ 13 - 0
templates/_includes/_defaults.html

@@ -105,3 +105,16 @@ search results and social media #}
 {% set SITESUBTITLE = SITESUBTITLE %}
 {% 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',
+                      'details': '<p>I am a software developer. This blog is'
+                                 'my personal space in the cyber world!</p>'
+                     }
+#}
+{% if not LANDING_PAGE_ABOUT %}
+{% set LANDING_PAGE_ABOUT = '' %}
+{% else %}
+{% set LANDING_PAGE_ABOUT = LANDING_PAGE_ABOUT %}
+{% endif %}
+

+ 2 - 0
templates/index.html

@@ -6,6 +6,7 @@
 
 {% block meta_tags_in_head %}
 {{ super() }}
+{% from '_includes/_defaults.html' import LANDING_PAGE_ABOUT with context %}
 {% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.title %}
 <meta property="og:title" content="{{ LANDING_PAGE_ABOUT.title }}"/>
 <meta name="twitter:title" content="{{ LANDING_PAGE_ABOUT.title }}">
@@ -35,6 +36,7 @@
 {% endblock meta_tags_in_head %}
 
 {% block content %}
+{% from '_includes/_defaults.html' import LANDING_PAGE_ABOUT with context %}
 <div class="row-fluid">
     {% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.title %}
     {% set css_class = 'span10 offset2' %}