{% extends '@Web/layout.html.twig' %}
{% block title %}
{{ meta.title | raw }}
{% endblock %}
{% block extraGoogleTagScript %}
{{ include('@Web/google_gtag.html.twig') }}
{% endblock %}
{% block meta %}
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"/>
<meta name="keywords" content="{{ meta.keywords | raw }}"/>
<meta name="description" content="{{ meta.description | raw }}"/>
<meta property="og:type" content="website"/>
<meta property="og:title" content="{{ meta.title | raw }}"/>
<meta property="og:description" content="{{ meta.description | raw ~ ' ' ~ meta.specs | raw }}"/>
<meta property="og:image" content="{{ te.replaceStr('\\', '/', mainImage) }}"/>
<meta property="og:image:width" content="467"/>
<meta property="og:image:height" content="326"/>
<meta property="og:image:type" content="image/jpeg"/>
<meta property="og:locale" content="{{ te.locale.getCurLocaleISO() }}"/>
<meta property="og:url" content="{{ te.request.uri }}"/>
<meta property="og:site_name" content="Tile.Expert"/>
<meta name="Priority" content="1"/>
<meta name="locale" content="{{ te.locale.getCurLocaleISO() }}"/>
{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('_css/collection.min.css') }}"/>
<link href="{{ asset('build/stylesheets/common_components.css') }}" rel="stylesheet"/>
{% if ldJson %}
{% include '@Web/Tile/ldjson.html.twig' with { 'collection': initialState.collection } %}
{% endif %}
{% endblock %}
{% block javascripts %}
{{ parent() }}
{% if app.environment != 'test' and app.environment != 'te_dev' %}
<script
src='https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit&hl={{ userLocale() }}'
async="async"></script>
<script type="text/javascript">
var captchaComment;
var onloadCallback = function () {
if (document.getElementById('captchaComment')) {
captchaComment = grecaptcha.render('captchaComment', {
'sitekey': '{{ recaptcha }}'
});
}
};
</script>
{% endif %}
<script src="{{ asset('build/client-bundle.js') }}"></script>
{% if te.checkIsDev %}
<script src="{{ asset('_js/collection-react.js') }}" defer></script>
{% else %}
<script src="{{ asset('_js/collection-react.min.js') }}"></script>
{% endif %}
{% endblock %}
{% block googleTagScript %}
{% if googleRemarketing is defined and googleRemarketing %}
{# для страниц с реактом, возможно в TWIG-шаблоне останется только заглушка, а логика переместится в реакт! #}
<!-- tile:index -->
{% if initialState['collection'] is defined and initialState['collection']['name'] is defined and
initialState['collection']['itemsIdArray'] is defined %}
{% set collName = initialState['collection']['name'] %}
{% set collArtIds = initialState['collection']['itemsIdArray'] %}
{% endif %}
{% endif %}
{% endblock %}
{% block content %}
{% if initialState.liteMenu.collection.selected is not null %}
{# это костыль, чтобы выбранная фабрика в быстрых фильтрах попадала в состояние выбраых фильтров #}
<div
class="divDataFs"
data-filtersearch='{
"collection": {{ initialState.liteMenu.collection.selected.id }},
"factory": {{ initialState.liteMenu.collection.selected.factory.id }}
}'
></div>
{% endif %}
{{ redux_store('appStore', initialState) }}
{{ react_component('App', {'rendering': te.parameter('react_rendering'), 'props': baseProps()}) }}
{% endblock %}