<?php
use Twig\Environment;
use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @CustomContentPdp/storefront/page/product-detail/index.html.twig */
class __TwigTemplate_63d1c0d382b6850a2ba12ed36964f29f extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'page_product_detail_tabs' => [$this, 'block_page_product_detail_tabs'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@AmMacTrade/storefront/page/product-detail/index.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@CustomContentPdp/storefront/page/product-detail/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@CustomContentPdp/storefront/page/product-detail/index.html.twig"));
$this->parent = $this->loadTemplate("@AmMacTrade/storefront/page/product-detail/index.html.twig", "@CustomContentPdp/storefront/page/product-detail/index.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_page_product_detail_tabs($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_product_detail_tabs"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_product_detail_tabs"));
// line 4
echo "
";
// line 7
echo " ";
// line 13
echo "
<div class=\"m1 menu\">
<div id=\"menu-center\">
<ul>
";
// line 18
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 18), "extensions", [], "any", false, false, false, 18), "netiProductCms", [], "any", false, false, false, 18) && sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 18), "extensions", [], "any", false, false, false, 18), "netiProductCms", [], "any", false, false, false, 18), "getAboveProductDetailDescriptionContent", [], "method", false, false, false, 18))) {
// line 19
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 19), "extensions", [], "any", false, false, false, 19), "netiProductCms", [], "any", false, false, false, 19), "getAboveProductDetailDescriptionContent", [], "method", false, false, false, 19));
foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
// line 20
if (twig_in_filter("Technische", $context["content"])) {
// line 21
echo "<li><a href=\"#technische\">Technische Daten</a></li>
";
}
// line 22
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 24
echo "
";
}
// line 26
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 26), "extensions", [], "any", false, false, false, 26), "netiProductCms", [], "any", false, false, false, 26) && sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 26), "extensions", [], "any", false, false, false, 26), "netiProductCms", [], "any", false, false, false, 26), "getAboveProductDetailDescriptionContent", [], "method", false, false, false, 26))) {
// line 27
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 27), "extensions", [], "any", false, false, false, 27), "netiProductCms", [], "any", false, false, false, 27), "getAboveProductDetailDescriptionContent", [], "method", false, false, false, 27));
foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
// line 28
if (twig_in_filter("Kombinierbare", $context["content"])) {
// line 29
echo "<li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
";
}
// line 30
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 33
echo "
";
}
// line 35
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 35), "extensions", [], "any", false, false, false, 35), "netiProductCms", [], "any", false, false, false, 35) && sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 35), "extensions", [], "any", false, false, false, 35), "netiProductCms", [], "any", false, false, false, 35), "getAboveProductDescriptionContent", [], "method", false, false, false, 35))) {
// line 36
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 36), "extensions", [], "any", false, false, false, 36), "netiProductCms", [], "any", false, false, false, 36), "getAboveProductDescriptionContent", [], "method", false, false, false, 36));
foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
// line 37
echo "
";
// line 38
if (twig_in_filter("Kombinierbare", $context["content"])) {
// line 39
echo "<li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
";
}
// line 40
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 43
echo "
";
}
// line 45
echo "
";
// line 47
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 47), "extensions", [], "any", false, false, false, 47), "netiProductCms", [], "any", false, false, false, 47) && sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 47), "extensions", [], "any", false, false, false, 47), "netiProductCms", [], "any", false, false, false, 47), "getBelowProductDescriptionContent", [], "method", false, false, false, 47))) {
// line 48
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 48), "extensions", [], "any", false, false, false, 48), "netiProductCms", [], "any", false, false, false, 48), "getBelowProductDescriptionContent", [], "method", false, false, false, 48));
foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
// line 49
echo "
";
// line 50
if (twig_in_filter("Kombinierbare", $context["content"])) {
// line 51
echo "<li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
";
}
// line 52
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 54
echo "
";
}
// line 56
echo "
<li><a href=\"#produktbeschreibung\">Produktbeschreibung</a></li>
";
// line 61
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 61), "extensions", [], "any", false, false, false, 61), "netiProductCms", [], "any", false, false, false, 61) && sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 61), "extensions", [], "any", false, false, false, 61), "netiProductCms", [], "any", false, false, false, 61), "getBelowProductDetailDescriptionContent", [], "method", false, false, false, 61))) {
// line 62
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 62), "extensions", [], "any", false, false, false, 62), "netiProductCms", [], "any", false, false, false, 62), "getBelowProductDetailDescriptionContent", [], "method", false, false, false, 62));
foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
// line 63
if (twig_in_filter("Technische", $context["content"])) {
// line 64
echo "<li><a href=\"#technische\">Technische Daten</a></li>
";
}
// line 65
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 68
echo "
";
}
// line 70
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 70), "extensions", [], "any", false, false, false, 70), "netiProductCms", [], "any", false, false, false, 70) && sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 70), "extensions", [], "any", false, false, false, 70), "netiProductCms", [], "any", false, false, false, 70), "getAboveProductDescriptionContent", [], "method", false, false, false, 70))) {
// line 71
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 71), "extensions", [], "any", false, false, false, 71), "netiProductCms", [], "any", false, false, false, 71), "getAboveProductDescriptionContent", [], "method", false, false, false, 71));
foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
// line 72
echo "
";
// line 73
if (twig_in_filter("Technische", $context["content"])) {
// line 74
echo "<li><a href=\"#technische\">Technische Daten</a></li>
";
}
// line 75
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 78
echo "
";
}
// line 80
echo "
";
// line 82
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 82), "extensions", [], "any", false, false, false, 82), "netiProductCms", [], "any", false, false, false, 82) && sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 82), "extensions", [], "any", false, false, false, 82), "netiProductCms", [], "any", false, false, false, 82), "getBelowProductDescriptionContent", [], "method", false, false, false, 82))) {
// line 83
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 83), "extensions", [], "any", false, false, false, 83), "netiProductCms", [], "any", false, false, false, 83), "getBelowProductDescriptionContent", [], "method", false, false, false, 83));
foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
// line 84
echo "
";
// line 85
if (twig_in_filter("Technische", $context["content"])) {
// line 86
echo "<li><a href=\"#technische\">Technische Daten</a></li>
";
}
// line 87
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 89
echo "
";
}
// line 91
echo "
</ul>
</div>
</div>
";
// line 97
echo "
";
// line 99
echo " <script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js\"></script>
<script>
let onScroll = function(event){
\$('#menu-center a').each(function () {
var scrollPos = \$(document).scrollTop();
var currLink = \$(this);
var refElement = \$(currLink.attr(\"href\"));
scrollPos += 150;
//console.log(refElement.position().top, refElement.height(), scrollPos);
if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
\$('#menu-center ul a').parent().removeClass(\"active\");
console.log('position true', refElement);
currLink.parent().addClass(\"active\");
}
else{
currLink.parent().removeClass(\"active\");
}
});
}
\$(document).ready(function () {
\$(document).on(\"scroll.custom\", onScroll);
//smoothscroll
\$('a[href^=\"#\"]').on('click', function (e) {
e.preventDefault();
\$(document).off(\"scroll.custom\");
\$('a').each(function () {
\$(this).parent().removeClass('active');
})
\$(this).parent().addClass('active');
var target = this.hash;
e.preventDefault();
var pos = \$(this).attr('href');
doScrolling(pos, 1000);
});
});
function doScrolling(element, duration) {
var startingY = window.pageYOffset
var elementY = getElementY(element) + 70
var targetY = document.body.scrollHeight - elementY < window.innerHeight ? document.body.scrollHeight - window.innerHeight : elementY
var diff = (targetY - (130 + 85)) - startingY
var easing = function(t) {
return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1
}
var start
if (!diff)
return
window.requestAnimationFrame(function step(timestamp) {
if (!start)
start = timestamp
var time = timestamp - start
var percent = Math.min(time / duration, 1)
percent = easing(percent)
window.scrollTo(0, startingY + diff * percent)
if (time < duration) {
window.requestAnimationFrame(step);
} else {
\$(element).parent().addClass(\"active\").siblings().removeClass(\"active\");
\$(document).on(\"scroll.custom\", onScroll);
}
})
}
function getElementY(query) {
return window.pageYOffset + document.querySelector(query).getBoundingClientRect().top
}
</script>
";
// line 178
echo "
\t";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@CustomContentPdp/storefront/page/product-detail/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 363 => 178, 283 => 99, 280 => 97, 273 => 91, 269 => 89, 262 => 87, 258 => 86, 256 => 85, 253 => 84, 249 => 83, 247 => 82, 243 => 80, 239 => 78, 231 => 75, 227 => 74, 225 => 73, 222 => 72, 218 => 71, 216 => 70, 212 => 68, 204 => 65, 200 => 64, 198 => 63, 194 => 62, 192 => 61, 185 => 56, 181 => 54, 174 => 52, 170 => 51, 168 => 50, 165 => 49, 161 => 48, 159 => 47, 155 => 45, 151 => 43, 143 => 40, 139 => 39, 137 => 38, 134 => 37, 130 => 36, 128 => 35, 124 => 33, 116 => 30, 112 => 29, 110 => 28, 106 => 27, 104 => 26, 100 => 24, 93 => 22, 89 => 21, 87 => 20, 83 => 19, 81 => 18, 74 => 13, 72 => 7, 68 => 4, 58 => 3, 35 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
{% block page_product_detail_tabs %}
{# start tabs #}
{# <div class=\"new-tabs\">
<ul>
<li><a href=\"#nmytab1\">Produktbeschreibung</a></li>
<li><a href=\"#nmytab2\">Technische Daten</a></li>
</ul>
</div> #}
<div class=\"m1 menu\">
<div id=\"menu-center\">
<ul>
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
{% for content in page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
{%if 'Technische' in content %}
<li><a href=\"#technische\">Technische Daten</a></li>
{% endif %}
{% endfor %}
{% endif %}
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
{% for content in page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
{%if 'Kombinierbare' in content %}
<li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
{% endif %}
{% endfor %}
{% endif %}
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
{% for content in page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
{%if 'Kombinierbare' in content %}
<li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
{% endif %}
{% endfor %}
{% endif %}
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
{% for content in page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
{%if 'Kombinierbare' in content %}
<li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
{% endif %}
{% endfor %}
{% endif %}
<li><a href=\"#produktbeschreibung\">Produktbeschreibung</a></li>
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getBelowProductDetailDescriptionContent() %}
{% for content in page.product.extensions.netiProductCms.getBelowProductDetailDescriptionContent() %}
{%if 'Technische' in content %}
<li><a href=\"#technische\">Technische Daten</a></li>
{% endif %}
{% endfor %}
{% endif %}
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
{% for content in page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
{%if 'Technische' in content %}
<li><a href=\"#technische\">Technische Daten</a></li>
{% endif %}
{% endfor %}
{% endif %}
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
{% for content in page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
{%if 'Technische' in content %}
<li><a href=\"#technische\">Technische Daten</a></li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
</div>
</div>
{# end tabs #}
{# start tab js #}
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js\"></script>
<script>
let onScroll = function(event){
\$('#menu-center a').each(function () {
var scrollPos = \$(document).scrollTop();
var currLink = \$(this);
var refElement = \$(currLink.attr(\"href\"));
scrollPos += 150;
//console.log(refElement.position().top, refElement.height(), scrollPos);
if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
\$('#menu-center ul a').parent().removeClass(\"active\");
console.log('position true', refElement);
currLink.parent().addClass(\"active\");
}
else{
currLink.parent().removeClass(\"active\");
}
});
}
\$(document).ready(function () {
\$(document).on(\"scroll.custom\", onScroll);
//smoothscroll
\$('a[href^=\"#\"]').on('click', function (e) {
e.preventDefault();
\$(document).off(\"scroll.custom\");
\$('a').each(function () {
\$(this).parent().removeClass('active');
})
\$(this).parent().addClass('active');
var target = this.hash;
e.preventDefault();
var pos = \$(this).attr('href');
doScrolling(pos, 1000);
});
});
function doScrolling(element, duration) {
var startingY = window.pageYOffset
var elementY = getElementY(element) + 70
var targetY = document.body.scrollHeight - elementY < window.innerHeight ? document.body.scrollHeight - window.innerHeight : elementY
var diff = (targetY - (130 + 85)) - startingY
var easing = function(t) {
return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1
}
var start
if (!diff)
return
window.requestAnimationFrame(function step(timestamp) {
if (!start)
start = timestamp
var time = timestamp - start
var percent = Math.min(time / duration, 1)
percent = easing(percent)
window.scrollTo(0, startingY + diff * percent)
if (time < duration) {
window.requestAnimationFrame(step);
} else {
\$(element).parent().addClass(\"active\").siblings().removeClass(\"active\");
\$(document).on(\"scroll.custom\", onScroll);
}
})
}
function getElementY(query) {
return window.pageYOffset + document.querySelector(query).getBoundingClientRect().top
}
</script>
{# end tab js #}
\t{#<div class=\"product-detail-tabs tb-pd\">
\t\t{% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
\t</div> #}
{% endblock %}
", "@CustomContentPdp/storefront/page/product-detail/index.html.twig", "/var/www/vhosts/devmt.de/httpdocs/shopware-ce/custom/plugins/CustomContentPdp/src/Resources/views/storefront/page/product-detail/index.html.twig");
}
}