{{ header }}
<div class="container">
    <ul class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
            <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
        {% endfor %}
        <li>{{ heading_title }}</li>
    </ul>
	<div class="main">
        <div class="row">
            {% if layout == "left" %}
            <div class="col-md-3 col-xs-12">
                {{ category_list_widget }}
                {{ latest_blog_widget }}
            </div>
            {% endif %}
            {% if layout == "left" or layout == "right" %}
                {% set class = 'col-md-9 col-sm-12 col-xs-12' %}
            {% else %}
                {% set class = 'col-xs-12' %}
            {% endif %}
            <div id="content" class="{{ class }}">
				<h1>{{ heading_title }}</h1>
				<div class="tool-bar">	
					<div class="row">
						<div class="col-sm-6 col-xs-6">
							<div class="btn-group btn-group-sm">
								<button type="button"  onclick="location='{{ grid_content_link }}'" class="btn-grid-view btn btn-default {% if post_content == 'grid' %}active{% endif %}" data-toggle="tooltip" title="{{ button_grid }}"></button>
								<button type="button"  onclick="location='{{ list_content_link }}'" class="btn-list-view btn btn-default {% if post_content == 'list' %}active{% endif %}" data-toggle="tooltip" title="{{ button_list }}"></button>
								
							</div>
						</div>
						<div class="col-sm-6 col-xs-6">
							<div class="post-item-limit form-group input-group input-group-sm">
								<label class="input-group-addon" for="input-limit">{{ text_limit }}</label>
								<select id="input-limit" class="form-control" onchange="location = this.value;">
									{% for limits in limits %}
										{% if limits.value == limit %}
											<option value="{{ limits.href }}" selected="selected">{{ limits.text }}</option>
										{% else %}
											<option value="{{ limits.href }}">{{ limits.text }}</option>
										{% endif %}
									{% endfor %}
								</select>
							</div>
						</div>
					</div>
				</div>
                {% if posts %}
                    <div class="post-page">
                        {% set i = 0 %}
                        {% if post_content == "grid" %}
                            <div class="row">
                                {% for post in posts %}
                                    {% set i = i + 1 %}
                                    <div class="post-layout col-sm-4 col-xs-6">
										<div class="post-grid">
											<div class="post-item {{ (i % 2 == 0) ? 'even' : 'odd' }}">
												<div class="post-image">
													<a title="{{ post.name }}" href="{{ post.href }}"><img src="{{ post.image }}" alt="{{ post.name }}" /></a>
												</div>
												<div class="post-cation">
													<div class="post-date-author">
														<span class="post-date">{{ post.date_added }}</span>
														<span class="post-author">{% if post.author %}{{ post.author }}{% endif %}</span>
													</div>
													<h4 class="post-name"><a  href="{{ post.href }}">{{ post.name }}</a></h4>
													<div class="post-intro">{{ post.intro_text }}</div>
													<div class="btn-more"><a href="{{ post.href }}">{{ button_show }}</a></div>
												</div>
											</div>
										</div>
                                    </div>
                                {% endfor %}
                            </div>
                        {% endif %}

                        {% if post_content == "list" %}
                            {% for post in posts %}
                                {% set i = i + 1 %}
                                <div class="post-layout">
									<div class="post-list">
										<div class="post-item {{ (i % 2 == 0) ? 'even' : 'odd' }}">
											<div class="post-intro row">
												<div class="col-xs-4">
													<div class="post-image">
														<a title="{{ post.name }}" href="{{ post.href }}"><img src="{{ post.image }}" alt="{{ post.name }}" /></a>
													</div>
												</div>
												<div class="col-xs-8">
													<div class="post-cation">
														<div class="post-date-author">
															<span class="post-date">{{ post.date_added }}</span>
															<span class="post-author">{% if post.author %}{{ post.author }}{% endif %}</span>
														</div>
														<h4 class="post-name"><a  href="{{ post.href }}">{{ post.name }}</a></h4>
														<div class="post-intro">{{ post.intro_text }}</div>
														<div class="btn-more"><a href="{{ post.href }}">{{ button_show }}</a></div>
													</div>
												</div>
											</div>
										</div>
									</div>
                                </div>
                            {% endfor %}
                        {% endif %}
                    </div>
					<div class="tool-bar-bottom">
						<div class="row">
							<div class="col-sm-6 show-page text-left">{{ pagination }}</div>
							<div class="col-sm-6 text-right">{{ results }}</div>
						</div>
					</div>
                {% else %}
                    <p>{{ text_post_empty }}</p>
                {% endif %}
            </div>
            {% if layout == "right" %}
            <div class="col-md-3 col-xs-12">
                {{ category_list_widget }}
                {{ latest_blog_widget }}
            </div>
            {% endif %}
        </div>
    </div>
</div>
{{ footer }}
