Created
November 27, 2019 21:40
-
-
Save gabrielzevedo/9c18f4da037910f9dc0dc956546b399f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends _layout %} | |
{% block banner %} | |
<section id="main-banners"> | |
{% if template_settings('image:banner_tarja_sup') %} | |
<div class="container{{ template_settings('if:force_content') and template_settings('if:force_banner') ? '-fluid' : '' }}"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
<div class="bannerTarja"> | |
{% if template_settings('text:banner_tarja_sup') != null %}<a href="{{ template_settings('text:banner_tarja_sup') }}" {% if 'http' in template_settings('text:banner_tarja_sup') %}target="_blank"{% endif %}>{% endif %} | |
<img src="{{ host_url('uploads/images/full/' ~ template_settings('image:banner_tarja_sup')) }}" /> | |
{% if template_settings('text:banner_tarja_sup') != null %}</a>{% endif %} | |
</div> | |
</div> | |
</div> | |
</div> | |
{% endif %} | |
<div class="container{{ template_settings('if:force_banner') ? '-fluid' : '' }}"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
<div id="carousel" class="carousel slide" data-ride="carousel"> | |
<div class="carousel-inner"> | |
{% for banner in banners %} | |
<div class="item{{ loop.first ? ' active' : '' }}"> | |
{{ linked_banner(banner) }} | |
</div> | |
{% endfor %} | |
</div> | |
{% if banners|count > 1 %} | |
<ol class="carousel-indicators"> | |
{% for banner in banners %} | |
<li data-target="#carousel" data-slide-to="{{ loop.index - 1 }}" class="{{ loop.first ? 'active' : 'passive' }}"></li> | |
{% endfor %} | |
</ol> | |
{% if template_settings('if:arrowshow')%} | |
<a class="left carousel-control" href="#carousel" data-slide="prev"> | |
<span class="arrowleft"></span> | |
</a> | |
<a class="right carousel-control" href="#carousel" data-slide="next"> | |
<span class="arrowright"></span> | |
</a> | |
{% endif %} | |
{% endif %} | |
</div> | |
</div> | |
</div> | |
</div> | |
<script type="text/javascript"> | |
$(window).load(function(){ | |
$('.carousel-control').css('opacity','1'); | |
var ch = ($('.carousel-inner').height()-60)/2; | |
$('.carousel-control.left').css("top",ch); | |
$('.carousel-control.right').css("top",ch); | |
}); | |
</script> | |
{% if template_settings('image:banner_tarja_inf') %} | |
<div class="container{{ template_settings('if:force_content') and template_settings('if:force_banner') ? '-fluid' : '' }}"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
<div class="bannerTarjaInf"> | |
{% if template_settings('text:banner_tarja_inf') != null %}<a href="{{ template_settings('text:banner_tarja_inf') }}" {% if 'http' in template_settings('text:banner_tarja_inf') %}target="_blank"{% endif %}>{% endif %} | |
<img src="{{ host_url('uploads/images/full/' ~ template_settings('image:banner_tarja_inf')) }}" /> | |
{% if template_settings('text:banner_tarja_inf') != null %}</a>{% endif %} | |
</div> | |
</div> | |
</div> | |
</div> | |
{% endif %} | |
{% if template_settings('select:banner_extra') != "Não" %} | |
<div class="container{{ template_settings('if:force_content') and template_settings('if:force_banner') ? '-fluid' : '' }}"> | |
<div class="row"> | |
{% if template_settings('select:banner_extra') == "1" %} | |
<div class="col-xs-12"> | |
<div class="bannerExtra"> | |
{% if template_settings('text:banner_one') != null %}<a href="{{ template_settings('text:banner_one') }}" {% if 'http' in template_settings('text:banner_one') %}target="_blank"{% endif %}>{% endif %} | |
<img src="{{ host_url('uploads/images/full/' ~ template_settings('image:banner_one')) }}" /> | |
{% if template_settings('text:banner_one') != null %}</a>{% endif %} | |
</div> | |
</div> | |
{% elseif template_settings('select:banner_extra') == "2" %} | |
<div class="col-xs-6"> | |
<div class="bannerExtra"> | |
{% if template_settings('text:banner_one') != null %}<a href="{{ template_settings('text:banner_one') }}" {% if 'http' in template_settings('text:banner_one') %}target="_blank"{% endif %}>{% endif %} | |
<img src="{{ host_url('uploads/images/full/' ~ template_settings('image:banner_one')) }}" /> | |
{% if template_settings('text:banner_one') != null %}</a>{% endif %} | |
</div> | |
</div> | |
<div class="col-xs-6"> | |
<div class="bannerExtra"> | |
{% if template_settings('text:banner_two') != null %}<a href="{{ template_settings('text:banner_two') }}" {% if 'http' in template_settings('text:banner_two') %}target="_blank"{% endif %}>{% endif %} | |
<img src="{{ host_url('uploads/images/full/' ~ template_settings('image:banner_two')) }}" /> | |
{% if template_settings('text:banner_two') != null %}</a>{% endif %} | |
</div> | |
</div> | |
{% elseif template_settings('select:banner_extra') == "3" %} | |
<div class="col-xs-4"> | |
<div class="bannerExtra"> | |
{% if template_settings('text:banner_one') != null %}<a href="{{ template_settings('text:banner_one') }}" {% if 'http' in template_settings('text:banner_one') %}target="_blank"{% endif %}>{% endif %} | |
<img src="{{ host_url('uploads/images/full/' ~ template_settings('image:banner_one')) }}" /> | |
{% if template_settings('text:banner_one') != null %}</a>{% endif %} | |
</div> | |
</div> | |
<div class="col-xs-4"> | |
<div class="bannerExtra"> | |
{% if template_settings('text:banner_two') != null %}<a href="{{ template_settings('text:banner_two') }}" {% if 'http' in template_settings('text:banner_two') %}target="_blank"{% endif %}>{% endif %} | |
<img src="{{ host_url('uploads/images/full/' ~ template_settings('image:banner_two')) }}" /> | |
{% if template_settings('text:banner_two') != null %}</a>{% endif %} | |
</div> | |
</div> | |
<div class="col-xs-4"> | |
<div class="bannerExtra"> | |
{% if template_settings('text:banner_three') != null %}<a href="{{ template_settings('text:banner_three') }}" {% if 'http' in template_settings('text:banner_three') %}target="_blank"{% endif %}>{% endif %} | |
<img src="{{ host_url('uploads/images/full/' ~ template_settings('image:banner_three')) }}" /> | |
{% if template_settings('text:banner_three') != null %}</a>{% endif %} | |
</div> | |
</div> | |
{% endif %} | |
</div> | |
</div> | |
{% endif %} | |
</section> | |
{% endblock %} | |
{% block blog %} | |
{% if template_settings('if:blog') %} | |
{# Script Grid #} | |
{% if get_collection('blog') %} | |
<section id="blog"> | |
<div class="container{{ template_settings('if:force_extras') ? '-fluid' : '' }}"> | |
<div class="inner-content"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
{% if template_settings('image:bh_last') %} | |
<img class="block-header" src="{{ theme_upload_url('images/medium/') ~ template_settings('image:bh_last') }}" | |
{% else %} | |
<h2 class="block-header"><span>{{ 'Últimos Posts'|trans({'en':'Latest Posts'}) }}</span></h2> | |
{% endif %} | |
<div class="row blog-block"> | |
{% for item in get_collection('blog', {'limit': 4}) %} | |
<div class="blog-item col-xs-3"> | |
<span class="time">{{ item.created_at|to_formatted_date }}</span> | |
<p class="title"><a href="{{ site_url('blog?single=' ~ item.slug) }}">{{ item['text:title'] }}</a></p> | |
{% if template_settings('select:blog_home') == "Resumo" %} | |
<span class="resume">{{ item['textarea:resume'] }}</span> | |
{% else %} | |
<a href="{{ site_url('blog?single=' ~ item.slug) }}"><img src="{{ host_url('uploads/images/small/' ~ item['image:cover']) }}" alt="{{item['text:title']}}"></a> | |
{% endif %} | |
<span class="readmore"><a href="{{ site_url('blog?single=' ~ item.slug) }}">{{ "Leia Mais"|trans({'en':'Read More'}) }} »</a></span> | |
</div> | |
{% endfor %} | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
{% endif %} | |
{% endif %} | |
{% endblock %} | |
{% block content %} | |
{# Produtos por linha #} | |
{% if template_settings('select:list_prod_cols') == '2' %} | |
{% set col_width = '6' %} | |
{% elseif template_settings('select:list_prod_cols') == '3' %} | |
{% set col_width = '4' %} | |
{% elseif template_settings('select:list_prod_cols') == '4' %} | |
{% set col_width = '3' %} | |
{% elseif template_settings('select:list_prod_cols') == '6' %} | |
{% set col_width = '2' %} | |
{% endif %} | |
{% if template_settings('image:bh_feat') %} | |
<img class="block-header" src="{{ theme_upload_url('images/medium/') ~ template_settings('image:bh_feat') }}"> | |
{% elseif products|length > 0 %} | |
<h2 class="block-header"><span>{{ 'Destaques'|trans({'en':'Featured'}) }}</span></h2> | |
{% endif %} | |
{% import 'product_listing.html' as product_listing %} | |
{% if template_settings('if:sidebar_home') %} | |
<div class="row"> | |
<div class='col-xs-3 sidebar sidebar-home'> | |
{% for cat in categories %} | |
{% if cat.category.slug != "home" %} | |
<div class="side-header"> | |
{{cat.category.name}} | |
</div> | |
{% if cat.children|count > 0 %} | |
<ul> | |
{% for child in cat.children %} | |
<li class='inactive'> | |
<a href="{{ site_url(cat.category.slug ~ '/' ~ child.category.slug) }}"> | |
{{ child.category.name }} | |
</a> | |
</li> | |
{% endfor %} | |
</ul> | |
{% endif %} | |
{% endif %} | |
{% endfor %} | |
</div> | |
<div class="col-xs-9"> | |
<div class="row prod-list"> | |
{{ product_listing.script() }} | |
{% for product in products %} | |
{{ product_listing.item(product, category, col_width|default(3)) }} | |
{% endfor %} | |
</div> | |
</div> | |
</div> | |
{% else %} | |
<div class="row prod-list"> | |
{{ product_listing.script() }} | |
{% for product in products %} | |
{{ product_listing.item(product, category, col_width|default(3)) }} | |
{% endfor %} | |
</div> | |
{% endif %} | |
{% endblock %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment