Files
kupshop/web/templates/kupkolo/base.tpl
2025-08-02 16:30:27 +02:00

170 lines
5.1 KiB
Smarty

<!DOCTYPE html>
{get_contexts language=1 assign="contexts"}
{$activeLang = $contexts.language->getActive()}
<html class="no-js lang-{$ctrl.active_language}" {block "html-lang"}lang="{$ctrl.active_language}"{/block}>
<head>
{block "head"}
<meta charset="utf-8">
{block "meta-viewport"}
{if {web_version} == 'desktop'}
<meta name="viewport" content="width=1280">
{else}
<meta name="viewport" content="width=device-width, initial-scale=1">
{/if}
{/block}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{block "header-title"}<title>{$header.pageTitle}</title>{/block}
{block css}
{block fonts}{/block}
{block "css-entry"}
{encore_entry_link_tags entry='app'}
{/block}
{/block}
{include "block.sentry.tpl"}
{include "components/js_init.tpl"}
{block "meta-author"}
<meta name="author" content="{$dbcfg.shop_firm_name}">
{/block}
<meta name="web_author" content="wpj.cz">
{block "meta-description"}
<meta name="description" content="{$header.meta_description|default:$dbcfg.shop_description}">
{/block}
{block "meta-robots"}
{if $cfg.Addr.full|strstr:".wpj.biz"}
{* neindexovat beta domeny *}
<meta name="robots" content="noindex, nofollow">
{elseif $smarty.get.full_version}
{* neindexovat ale povolit prochazeni full verze webu *}
<meta name="robots" content="noindex, follow">
{else}
<meta name="robots" content="{$header.robots}">
{/if}
{/block}
{block "canonical"} {* musi byt na strance jen jednou! *}
{if $smarty.get}
<link rel="canonical" href="{get_canonical_url}">
{/if}
{/block}
{* rekne Googlu, ze se jedna o sekvenci, aby to nebral jako duplicitu *}
{if $body.pager.count > 1}
{if $body.pager.number > 1}
<link rel="prev" href="{$body.pager->getUrl(["page" => {{$body.pager.number}-1} ])}">
{/if}
{if $body.pager.number < $body.pager.count}
<link rel="next" href="{$body.pager->getUrl(["page" => {{$body.pager.number}+1}])}">
{/if}
{/if}
{block favicon}
<link rel="shortcut icon" href="{static_url url="/templates/images/favicon.ico"}">
{/block}
<link rel="Contents" href="{url s=sitemap}" type="text/html">
<link rel="Search" href="{url s=search}" type="text/html">
{foreach $dbcfg.analytics.google_site_verifications as $row}
<meta name="google-site-verification" content="{$row.value}">
{/foreach}
{foreach $dbcfg.analytics.facebook_site_verifications as $row}
<meta name="facebook-domain-verification" content="{$row.value}">
{/foreach}
{foreach $dbcfg.analytics.pinterest_site_verifications as $row}
<meta name="p:domain_verify" content="{$row.value}"/>
{/foreach}
{if $dbcfg.analytics.seznam_webmaster.id}
<meta name="seznam-wmt" content="{$dbcfg.analytics.seznam_webmaster.id}" >
{/if}
{if !isDebug()}
{include "block.ga4.tpl"}
{/if}
{include "block.gtm.tpl" gtm_type="gtm"}
{include "block.gtm.script.tpl"}
{/block}
</head>
<body>
{function responsiveSwitch}
{if {web_version} == 'desktop'}
<a href="{path('kupshop_content_version_switchversion', ['type' => 'default'])}">{t}Mobilní verze{/t}</a>
{else}
<a href="{path('kupshop_content_version_switchversion', ['type' => 'desktop'])}">{t}Klasická verze{/t}</a>
{/if}
{/function}
{include "block.gtm.noscript.tpl"}
{block "body-start"}{/block}
{block body}
{/block}
{block "microdata"}
{include "block.schema.tpl"}
{/block}
{if $dbcfg.cookie_bar.enable == "Y"}
{if $dbcfg.cookie_bar.focus == "Y"}
{include "focus/focus.cookies.tpl" class="focus-cookiebara"}
{else}
{include "block.cookie_bar.tpl"}
{/if}
{/if}
<!-- Site JS -->
{block "js-polyfills"}
<script crossorigin="anonymous" src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=default%2Cfetch%2CIntersectionObserver"></script>
{/block}
{block "js-end"}
{block "js-entry"}
{encore_entry_script_tags entry='app'}
{ifmodule "JS_SHOP"}
{encore_entry_script_tags entry='js-shop'}
{/ifmodule}
{ifmodule "JS_MENU"}
{encore_entry_script_tags entry='js-menu'}
{/ifmodule}
{/block}
{block "js-dynamic-load"}
{* veci co se nedaji includovat do webpacku, protoze se `if`uji v sablone. Napr. preklady bootsrap validator, skript pro zasilkovnu, ... *}
{/block}
<script>
wpj.onReady.processAll();
{block onready}
{/block}
</script>
{/block}
{block wpjToolbar}
{if $header.wpjToolbar and !$smarty.get.no_toolbar}
{include "block.wpj_toolbar.tpl"}
{/if}
{/block}
{if getAdminUser() and !$ctrl.active_language_code}
<script>
try {
Sentry.captureMessage('Missing language_code');
} catch (e) {
console.log(e);
}
</script>
{/if}
{block analytics}
{if !isDebug()}
{include "block.analytics.tpl" inline}
{/if}
{/block}
</body>
</html>