{% extends theme.template.home|template %}

{% block title %}
    <title>{{site.name}} - {{site.description}}</title>
{% endblock title %}

{% block css %}

    <link rel="stylesheet" href="{{css_links(theme)}}">
    {{wp_head}}
    <style type="text/css">
        {% include theme.layouts.main_nav.style|template with {"self" : theme.layouts.main_nav} %}
        {% include theme.layouts.footer_nav.style|template %}
    </style>
{% endblock css %}


{% block javascript_lib %} 
    {{wp_footer}}
{% endblock javascript_lib %}

{% block javascript_local %}
    {% include theme.layouts.main_nav.site_nav|template %}
    {% include theme.css.blended_css.js.custom|template %}
{% endblock javascript_local %}

{% block content_header %}

{% endblock content_header %}



{% block navigation_header %}
    {% set menu = get_nav_menu("main" , get_block_data(theme, "nav", "wide")) %}
    {% set layout = theme.layouts.main_nav %}
    {% set block = get_block_data(theme, "nav", "wide") %}
    {% include layout.template|template with { "menu" : menu, "theme" : theme, "block" : block, "self" : layout } only %}
{% endblock navigation_header %}

{% block body_class %} {{function("get_body_class", "")|join(' ')}} {% endblock body_class %}


{% block content_hero %} 
{% endblock content_hero %}

{% block content_1 %} 
    {% set article = get_articles() %}
    {# Check if there is article layout exist in Blended Theme#}
    {% if(theme.layouts.article_list) %}
        {% set layout = theme.layouts.article_list %}
        {% set block = get_block_data(theme, "content1", "wide") %}
        {% include layout.template|template with { "article" : article.items, "theme" : theme, "block" : block, "self" : layout } only  %} 
    {% else %}
        {% include "tease-post.twig" with { "article" : article.items } only  %}
    {% endif %}
{% endblock %}


{% block content_2 %} 
    {% if(is_page) %}
        {{post.blended_block_2 | shortcodes | safe}}
    {% endif %}
{% endblock %} 

{% block content_3 %} 
    {% if(is_page) %}
        {{post.blended_block_3 | shortcodes | safe}}
    {% endif %}
{% endblock %} 

{% block content_4 %} 
    {% if(is_page) %}
        {{post.blended_block_4 | shortcodes | safe}}
    {% endif %}
{% endblock %}

{% block content_5 %}
    {% if(is_page) %}
        {{post.blended_block_5 | shortcodes | safe}}
    {% endif %}
{% endblock %}

{% block content_6 %} 
    {% if(is_page) %}
        {{post.blended_block_6 | shortcodes | safe}}
    {% endif %}
{% endblock %}


{% block content_footer %} 
    {{footer_widgets | safe}} 
{% endblock content_footer %}

{% block navigation_footer %}
    {% set menu = get_nav_menu("footer" , get_block_data(theme, "nav", "wide")) %}
    {% set layout = theme.layouts.footer_nav %}
    {% set block = get_block_data(theme, "nav", "wide") %}
    {% include layout.template|template with { "menu" : menu, "theme" : theme, "block" : block, "self" : layout } only %}
{% endblock navigation_footer %}
