{# block page %}
<section id="news{{ page.sub_group ? '_sub_' ~ page.sub_group }}" class="blog{{ data.store_enabled ? ' has-store' }} no-padding-top news">
	<h1>{{ page.name }}</h1>
	<div class="container">
		{% block title %}
			<div class="row os-animation text-center" data-os-animation="fadeInUp">
				<div class="col-md-6 col-sm-6 col-xxs-12 title-text">
					<h2 class="title">{{ page.name }}</h2>
				</div>
				<div class="col-md-6 col-sm-6 col-xxs-12 simple-text">
					<h3 class="description text-left">{{ page.desc }}</h3>
				</div>
			</div>
		{% endblock %}
		
		{% if page.filter %}
			{% block filter %}
				<div class="news-filter col-xs-12 os-animation animated fadeInUp" data-os-animation="fadeInUp">
					<div class="col-md-9 col-xs-8 col-xxs-12">
						<ul class="isotope-filters no-padding-top">
							<li class="active"><a class="active" data-filter="*" href="#">{{ out.store.all }}</a></li>
							{% for category in data.categories %}
								{% block filter_category %}
									<li><a data-filter="[data-cat='{{ category.id_category }}']" href="#">{{ category.desc }}</a></li>
								{% endblock %}
							{% endfor %}
						</ul>
					</div>
					<div class="col-md-3 col-xs-4 col-xs-12">
						<input type="text" id="isotope-filters_{{ page.sub_group }}" placeholder="{{ out.store.search }}" class="form-control">
					</div>
				</div>
			{% endblock %}
		{% endif %}
		
		{% block content %}
			<div class="row group show" style="width: 100%;">
				{% for news in data.news %}
					{% set category = (site.show_news_categories and news.category ? news.category ~ ' - ') %}
					{% set title = category ~ news.title %}
					
					{% set has_content = news.title_text1 or news.title_text2 or news.title_text3 or (news.text1 and news.text1 != '<br>') or (news.text2 and news.text2 != '<br>') or (news.text3 and news.text3 != '<br>') %}
					
					{% block article %}
						<article id="news_{{ news.id_n }}" class="col-md-{{ cols }} col-sm-6 col-xxs-12" data-cat="{{ news.id_news_categories }}">
							<h1>{{ title | raw }}</h1>
							{% block article_header %}
								<div class="article-image">
									{% if news.youtube %}
										{% block article_header_youtube %}
											<div class="embeddedvideo" style="background:url('{{ constant('ROOT_URL_SCHEME') }}://img.youtube.com/vi/{{ news.youtube }}/0.jpg');background-size:cover;background-position:center center;">
												<img src="{{ youtube_src }}" data-id="{{ news.youtube }}" class="youtube_video" style="background:url('/images/youtube-play.png') no-repeat center;" alt="{{ news.title }}"/>
											</div>
										{% endblock %}
									{% else %}
										{% block article_header_image %}
											{% if page.full_page %}
												<a href="/{{ constant('SITE_LANG') }}/news/{{ news.id_n }}.html" target="_self">
											{% else %}
												<a href="{{data.store_enabled ? '/store' }}/get/{{ news.id_n }}.html?lightbox%5Bwidth%5D=640&amp;lightbox%5Bheight%5D=75p" rel="nofollow">
											{% endif %}
												<img src="/{{ news.src_thumb }}" alt="{{ news.title }}"/>
											</a>
										{% endblock %}
									{% endif %}
								</div>
							{% endblock %}
							
							<div class="no-padding">
								
								{% block article_title %}
									<h2 class="title text-center">{{ category }}<span>{{ news.title|escape('html')|replace({'&amp;euro;':'&euro;'})|raw }}</span></h2>
									<h3 class="date"><time datetime="{{ news.html5_date }}">{{ news.date }}</time></h3>
								{% endblock %}
								{% block _ext_store_news_articles_price %}{% endblock %}
								
								{% block article_contents %}
									{% if news.html and news.html != '<br>' and news.html != '<p>&nbsp;</p>' %}
										{% block article_content %}
											<div class="padding-30 no-padding-top no-padding-bottom description text-left">
												{{ ('<p>' ~ news.html ~ '</p>') | preg_replace(cleaner.p.regex, cleaner.p.replace) | raw }}
											</div>
										{% endblock %}
									{% endif %}
									
									{% if news.doc_list|length or news.url %}
										<div class="padding-30 no-padding-top no-padding-bottom description text-left">
											{% for doc in news.doc_list %}
												{% block article_doc %}
													<a href="/{{ doc.src }}" target="_blank" class="small-button" rel="nofollow">
														<i class="fa fa-file-pdf-o"></i>&nbsp;{{ doc.title }}
													</a>&nbsp;
												{% endblock %}
											{% endfor %}
											
											{% if news.url %}
												{% block article_read_more %}
													<a href="{{ news.url }}" target="_blank" class="small-button" rel="nofollow"><i class="fa fa-link"></i> {{ out.read_more }}</a>
												{% endblock %}
											{% endif %}
										</div>
									{% endif %}
								
								{% endblock %}
							</div>
								
							{% block article_hidden_section %}
								<section>
									<h1>{{ title | raw }}</h1>
									<h2 class="text-center">{{ title | raw }}</h2>
									{% if (news.n_images > 1) and site.lightbox_news_thumbs %}
										{% block article_hidden_slideshow %}
										<div>
											<div>
												<img src="/{{ news.src_thumb }}" class="img-responsive" style="width:128px;border:3px solid #FFF">
											</div>
										</div>
										{% endblock %}
									{% endif %}
									{% if has_content %}
										<article class="col-md-4 col-sm-6 col-xs-12">
											<h1>{{ news.title_text1 }}</h1>
											<h2>{{ news.title_text1 }}</h2>
											<p>{{ news.text1 | raw }}</p>
										</article>
										<article class="col-md-4 col-sm-6 col-xs-12">
											<h1>{{ news.title_text2 }}</h1>
											<h2>{{ news.title_text2 }}</h2>
											<p>{{ news.text2 | raw }}</p>
										</article>
										<article class="col-md-4 col-sm-6 col-xs-12">
											<h1>{{ news.title_text3 }}</h1>
											<h2>{{ news.title_text3 }}</h2>
											<p>{{ news.text3 | raw }}</p>
										</article>
										<div class="clearfix"></div>
									{% endif %}
								</section>
							{% endblock article_hidden_section %}
						</article>
					{% endblock article %}
				{% endfor %}
			</div>
		{% endblock content %}
	</div>
</section>
{% endblock page #}

{% block page %}
<section id="news{{ page.sub_group ? '_sub_' ~ page.sub_group }}" class="news container-fluid section{{ data.store_enabled ? ' has-store' }}">
	{% set carousel_id = page.group ~ (page.sub_group ? '-sub-' ~ page.sub_group) %}
	
	<header class="title mobile-center">
		<h1>{{ page.name }}</h1>
		{% block title %}
			<h2 class="text-center">{{ page.name }}</h2>
			<h3 class="text-center">{{ page.desc }}</h3>
		{% endblock %}
	</header>
	
	<div id="carousel-{{ carousel_id }}" class="carousel slide carousel-fade bs-carousel" data-ride="carousel">
		{% block content %}
		<div class="carousel-inner" role="listbox">
			{% for news in data.news %}
				{% set category = (site.show_news_categories and news.category ? news.category ~ ' - ') %}
				{% set title = category ~ news.title %}
			
				{% set has_content = news.title_text1
					or news.title_text2
					or news.title_text3
					or (news.text1 and news.text1 != '<br>')
					or (news.text2 and news.text2 != '<br>')
					or (news.text3 and news.text3 != '<br>')
				%}
			
				{% block article %}
				<article id="news_{{ news.id_n }}" class="item {{ loop.first ? 'active' }}" data-cat="{{ news.id_news_categories }}">
					{% block article_contents %}
					<div class="container">
						<h1>{{title}}</h1>
						<div class="row">
							{% block article_image %}
								<div class="col-sm-6 padding-10-0">
									<div class="article-image">
										{% if news.id_youtube %}
											{% block article_image_youtube %}
													<div class="embeddedvideo" style="background:url('{{ root_url_scheme() }}://img.youtube.com/vi/{{ news.id_youtube }}/mqdefault.jpg');background-size:cover;background-position:center center;">
														<img src="{{ youtube_src }}" data-id="{{ news.id_youtube }}" class="youtube_video" style="background:url('/images/youtube-play.png') no-repeat center;"/>
													</div>
											{% endblock %}
										{% else %}
											{% block article_image_image %}
												{% if page.full_page %}
													<a href="/{{ siteLang }}/news/{{ news.id_n }}/{{ (category ~ news.title|escape('html')|replace({'&amp;euro;':'&euro;'})|raw)|url_clean_title() }}.html" target="_self">
												{% else %}
													<a href="{{data.store_enabled ? '/store' }}/get/{{ news.id_n }}.html?lightbox%5Bwidth%5D=640&amp;lightbox%5Bheight%5D=75p" rel="nofollow">
												{% endif %}
														<img src="{{ news.src_thumb }}" alt="{{ news.title }}"/>
													</a>
											{% endblock %}
										{% endif %}
									</div>
								
								</div>
							{% endblock article_image %}
							
							<div class="col-sm-5 col-sm-push-1">
								<section class="mobile-center">
									{% block article_title %}
										<header>
											<h2>{{ category }}{{ news.title|escape('html')|replace({'&amp;euro;':'&euro;'})|raw }}</h2>
											<h3 class="calendar"><time datetime="{{ news.html5_date }}">{{ news.date }}</time></h3>
											{% block _ext_store_news_articles_price %}{% endblock %}
										</header>
									{% endblock article_title %}
								
							
									{% if news.html and news.html != '<br>' and news.html != '<p>&nbsp;</p>' %}
										{% block article_content %}
											{{ ('<p style="text-align:center;">' ~ news.title_text1 ~ '</p>') | preg_replace(cleaner.p.regex, cleaner.p.replace) | raw }}
										{% endblock %}
									{% endif %}
									
									{% if news.doc_list|length %}
										<div class="docs">
											{% for doc in news.doc_list %}
												{% block article_doc %}
													<a href="/{{ doc.src }}" target="_blank" class="small-button" rel="nofollow">
														<i class="fa fa-file-pdf-o"></i>&nbsp;{{ doc.title }}
													</a>&nbsp;
												{% endblock %}
											{% endfor %}
										</div>
									{% endif %}
									
									{% if news.url %}
										{% block article_read_more %}
											<a href="{{ news.url }}" target="_blank" class="btn btn-default" rel="nofollow"><span><i class="fa fa-link"></i> {{ out.read_more }}</span></a>
										{% endblock %}
									{% endif %}
									
								</section>
							</div>
								
						</div>
					</div>
					{% endblock article_contents %}
					
					
					
					{% block article_hidden_section %}
						<section>
							<h1>{{ title | raw }}</h1>
							<h2 class="text-center hidden">{{ title | raw }}</h2>
							{% if (news.n_images > 1) and site.lightbox_news_thumbs %}
								{% block article_hidden_slideshow %}
								<div>
									<div>
										<img src="/{{ news.src_thumb }}" class="img-responsive" style="width:128px;border:3px solid #FFF">
									</div>
								</div>
								{% endblock %}
							{% endif %}
							{% if has_content %}
								<article class="col-md-4 col-sm-6 col-xs-12">
									<h1>{{ news.title_text1 }}</h1>
									<h2>{{ news.title_text1 }}</h2>
									<p>{{ news.text1 | raw }}</p>
								</article>
								<article class="col-md-4 col-sm-6 col-xs-12">
									<h1>{{ news.title_text2 }}</h1>
									<h2>{{ news.title_text2 }}</h2>
									<p>{{ news.text2 | raw }}</p>
								</article>
								<article class="col-md-4 col-sm-6 col-xs-12">
									<h1>{{ news.title_text3 }}</h1>
									<h2>{{ news.title_text3 }}</h2>
									<p>{{ news.text3 | raw }}</p>
								</article>
								<div class="clearfix"></div>
							{% endif %}
						</section>
					{% endblock article_hidden_section %}
					
					
				</article>
				{% endblock article %}
			{% endfor %}
		</div>
		{% endblock content %}

		{% if data.news|length > 1 %}
			{% block content_controls %}
				<a class="left carousel-control" href="#carousel-{{ carousel_id }}" data-slide="prev">
					<span class="fa fa-chevron-left" aria-hidden="true"></span>
				</a>
				<a class="right carousel-control" href="#carousel-{{ carousel_id }}" data-slide="next">
					<span class="fa fa-chevron-right" aria-hidden="true"></span>
				</a>
			{% endblock content_controls %}
		{% endif %}
	</div>
</section>
{% endblock page %}