<?php
use Twig\Environment;
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;
/* brand.twig */
class __TwigTemplate_a2f6efa23cbf640c07db2f55adfe7f1fa472283d2d2f3f3243921ec5ec726a43 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'main' => [$this, 'block_main'],
'javascript' => [$this, 'block_javascript'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "fullwidth_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "brand.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "brand.twig"));
$this->parent = $this->loadTemplate("fullwidth_frame.twig", "brand.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 4
echo "
";
// line 6
echo " ";
$context["parentId"] = 34;
// line 7
echo " ";
$context["ParentCategory"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "find", [0 => (isset($context["parentId"]) || array_key_exists("parentId", $context) ? $context["parentId"] : (function () { throw new RuntimeError('Variable "parentId" does not exist.', 7, $this->source); })())], "method", false, false, false, 7);
// line 8
echo " ";
$context["childCategories"] = twig_sort_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["ParentCategory"]) || array_key_exists("ParentCategory", $context) ? $context["ParentCategory"] : (function () { throw new RuntimeError('Variable "ParentCategory" does not exist.', 8, $this->source); })()), "children", [], "any", false, false, false, 8), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 8, $this->source); })()), "sortNo", [], "any", false, false, false, 8) <=> twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 8, $this->source); })()), "sortNo", [], "any", false, false, false, 8)); });
// line 9
echo "
<div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">Brand</span><small>ブランドから探す</small></h2>
</div><!--/.home_title__inner-->
<div class=\"brand_sort_area\">
<ul class=\"sort-btn\">
<li class=\"sort_search_btn\">
<input class=\"search-field form-control\" type=\"text\" name=\"search\" placeholder=\"ブランド名検索\">
<img class=\"seach_icon\" src=\"";
// line 18
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/search-dark.svg"), "html", null, true);
echo "\" alt=\"\">
</li>
<li class=\"alphabet_wrap\">
<ul class=\"alphabet\">
<li class=\"brand_A\"><span>A</span></li>
<li class=\"brand_B\"><span>B</span></li>
<li class=\"brand_C\"><span>C</span></li>
<li class=\"brand_D\"><span>D</span></li>
<li class=\"brand_E\"><span>E</span></li>
<li class=\"brand_F\"><span>F</span></li>
<li class=\"brand_G\"><span>G</span></li>
<li class=\"brand_H\"><span>H</span></li>
<li class=\"brand_I\"><span>I</span></li>
<li class=\"brand_J\"><span>J</span></li>
<li class=\"brand_K\"><span>K</span></li>
<li class=\"brand_L\"><span>L</span></li>
<li class=\"brand_M\"><span>M</span></li>
<li class=\"brand_N\"><span>N</span></li>
<li class=\"brand_O\"><span>O</span></li>
<li class=\"brand_P\"><span>P</span></li>
<li class=\"brand_Q\"><span>Q</span></li>
<li class=\"brand_R\"><span>R</span></li>
<li class=\"brand_S\"><span>S</span></li>
<li class=\"brand_T\"><span>T</span></li>
<li class=\"brand_U\"><span>U</span></li>
<li class=\"brand_V\"><span>V</span></li>
<li class=\"brand_W\"><span>W</span></li>
<li class=\"brand_X\"><span>X</span></li>
<li class=\"brand_Y\"><span>Y</span></li>
<li class=\"brand_Z\"><span>Z</span></li>
</ul>
</li>
</ul>
<ul class=\"grid\">
";
// line 53
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, (isset($context["childCategories"]) || array_key_exists("childCategories", $context) ? $context["childCategories"] : (function () { throw new RuntimeError('Variable "childCategories" does not exist.', 53, $this->source); })()), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 53, $this->source); })()), "slug", [], "any", false, false, false, 53) <=> twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 53, $this->source); })()), "slug", [], "any", false, false, false, 53)); }));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 54
echo " <li class=\"item brand_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "slug", [], "any", false, false, false, 54), "html", null, true);
echo "\">
<a class=\"item_content\" href=\"#target";
// line 55
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 55), "html", null, true);
echo "\" data-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 55), "html", null, true);
echo "\">
<div class=\"thumb\">
<img src=\"";
// line 57
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "file_name", [], "any", false, false, false, 57)), "save_image"), "html", null, true);
echo "\">
</div><!--/.thumb-->
<span class=\"ttl_en\">";
// line 59
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "englishText", [], "any", false, false, false, 59), "html", null, true);
echo "</span>
<span class=\"ttl\">";
// line 60
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "japaneseText", [], "any", false, false, false, 60), "html", null, true);
echo "</span>
<span class=\"search_keywords\">";
// line 61
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "searchKeywords", [], "any", false, false, false, 61), "html", null, true);
echo "</span>
</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 65
echo " </ul>
</div><!--/wrapper-->
<section class=\"brand_display_section\">
";
// line 71
echo " ";
$context["filteredCategories"] = twig_array_filter($this->env, (isset($context["childCategories"]) || array_key_exists("childCategories", $context) ? $context["childCategories"] : (function () { throw new RuntimeError('Variable "childCategories" does not exist.', 71, $this->source); })()), function ($__category__) use ($context, $macros) { $context["category"] = $__category__; return twig_in_filter(twig_upper_filter($this->env, twig_slice($this->env, twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 71, $this->source); })()), "slug", [], "any", false, false, false, 71), 0, 1)), [0 => "A", 1 => "B", 2 => "C", 3 => "D", 4 => "E"]); });
// line 72
echo " ";
if ((isset($context["filteredCategories"]) || array_key_exists("filteredCategories", $context) ? $context["filteredCategories"] : (function () { throw new RuntimeError('Variable "filteredCategories" does not exist.', 72, $this->source); })())) {
// line 73
echo " <div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">A-E</span></h2>
</div><!--/.home_title__inner-->
<div class=\"category_detail_list\">
";
// line 77
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, (isset($context["filteredCategories"]) || array_key_exists("filteredCategories", $context) ? $context["filteredCategories"] : (function () { throw new RuntimeError('Variable "filteredCategories" does not exist.', 77, $this->source); })()), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 77, $this->source); })()), "slug", [], "any", false, false, false, 77) <=> twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 77, $this->source); })()), "slug", [], "any", false, false, false, 77)); }));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 78
echo " <a id=\"target";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 78), "html", null, true);
echo "\" class=\"category_detail_block\" href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 78), "html", null, true);
echo "\">
<div class=\"category_detail_block__inner\">
<div class=\"category_detail_block__img\">
<img src=\"";
// line 81
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "file_name", [], "any", false, false, false, 81)), "save_image"), "html", null, true);
echo "\">
</div>
<div class=\"category_detail_block__txt\">
<div class=\"logo_ja_block\">
<img src=\"";
// line 86
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "logo_file_name", [], "any", false, false, false, 86)), "save_image"), "html", null, true);
echo "\">
<p class=\"cat_ttl\">";
// line 87
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "japaneseText", [], "any", false, false, false, 87), "html", null, true);
echo "</p>
</div><!--/.logo_ja_block-->
<p>";
// line 90
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["category"], "content", [], "any", true, true, false, 90)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["category"], "content", [], "any", false, false, false, 90), "説明文がありません")) : ("説明文がありません")), "html", null, true);
echo "</p>
<div class=\"text-right\">
<span class=\"base_link_brn\">
<span>詳細を見る</span>
<span>詳細を見る</span>
</span>
</div><!--/.text-right-->
</div><!--./category_detail_block__txt-->
</div><!--/.category_detail_block__inner-->
</a><!--/.category_detail_block-->
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 101
echo " </div><!--/.category_detail_list-->
";
}
// line 103
echo "
";
// line 105
echo " ";
$context["filteredCategories"] = twig_array_filter($this->env, (isset($context["childCategories"]) || array_key_exists("childCategories", $context) ? $context["childCategories"] : (function () { throw new RuntimeError('Variable "childCategories" does not exist.', 105, $this->source); })()), function ($__category__) use ($context, $macros) { $context["category"] = $__category__; return twig_in_filter(twig_upper_filter($this->env, twig_slice($this->env, twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 105, $this->source); })()), "slug", [], "any", false, false, false, 105), 0, 1)), [0 => "F", 1 => "G", 2 => "H", 3 => "I", 4 => "J"]); });
// line 106
echo " <div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">F-J</span></h2>
</div><!--/.home_title__inner-->
";
// line 109
if ((isset($context["filteredCategories"]) || array_key_exists("filteredCategories", $context) ? $context["filteredCategories"] : (function () { throw new RuntimeError('Variable "filteredCategories" does not exist.', 109, $this->source); })())) {
// line 110
echo " <div class=\"category_detail_list\">
";
// line 111
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, (isset($context["filteredCategories"]) || array_key_exists("filteredCategories", $context) ? $context["filteredCategories"] : (function () { throw new RuntimeError('Variable "filteredCategories" does not exist.', 111, $this->source); })()), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 111, $this->source); })()), "slug", [], "any", false, false, false, 111) <=> twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 111, $this->source); })()), "slug", [], "any", false, false, false, 111)); }));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 112
echo " <a id=\"target";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 112), "html", null, true);
echo "\" class=\"category_detail_block\" href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 112), "html", null, true);
echo "\">
<div class=\"category_detail_block__inner\">
<div class=\"category_detail_block__img\">
<img src=\"";
// line 115
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "file_name", [], "any", false, false, false, 115)), "save_image"), "html", null, true);
echo "\">
</div>
<div class=\"category_detail_block__txt\">
<div class=\"logo_ja_block\">
<img src=\"";
// line 119
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "logo_file_name", [], "any", false, false, false, 119)), "save_image"), "html", null, true);
echo "\">
<p class=\"cat_ttl\">";
// line 120
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "japaneseText", [], "any", false, false, false, 120), "html", null, true);
echo "</p>
</div><!--/.logo_ja_block-->
<p>";
// line 122
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["category"], "content", [], "any", true, true, false, 122)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["category"], "content", [], "any", false, false, false, 122), "説明文がありません")) : ("説明文がありません")), "html", null, true);
echo "</p>
<div class=\"text-right\">
<span class=\"base_link_brn\">
<span>詳細を見る</span>
<span>詳細を見る</span>
</span>
</div><!--/.text-right-->
</div><!--./category_detail_block__txt-->
</div><!--/.category_detail_block__inner-->
</a><!--/.category_detail_block-->
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 133
echo " </div><!--/.category_detail_list-->
";
}
// line 135
echo "
";
// line 137
echo " ";
$context["filteredCategories"] = twig_array_filter($this->env, (isset($context["childCategories"]) || array_key_exists("childCategories", $context) ? $context["childCategories"] : (function () { throw new RuntimeError('Variable "childCategories" does not exist.', 137, $this->source); })()), function ($__category__) use ($context, $macros) { $context["category"] = $__category__; return twig_in_filter(twig_upper_filter($this->env, twig_slice($this->env, twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 137, $this->source); })()), "slug", [], "any", false, false, false, 137), 0, 1)), [0 => "K", 1 => "L", 2 => "M", 3 => "N", 4 => "O"]); });
// line 138
echo " ";
if ((isset($context["filteredCategories"]) || array_key_exists("filteredCategories", $context) ? $context["filteredCategories"] : (function () { throw new RuntimeError('Variable "filteredCategories" does not exist.', 138, $this->source); })())) {
// line 139
echo " <div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">K-O</span></h2>
</div><!--/.home_title__inner-->
<div class=\"category_detail_list\">
";
// line 143
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, (isset($context["filteredCategories"]) || array_key_exists("filteredCategories", $context) ? $context["filteredCategories"] : (function () { throw new RuntimeError('Variable "filteredCategories" does not exist.', 143, $this->source); })()), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 143, $this->source); })()), "slug", [], "any", false, false, false, 143) <=> twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 143, $this->source); })()), "slug", [], "any", false, false, false, 143)); }));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 144
echo " <a id=\"target";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 144), "html", null, true);
echo "\" class=\"category_detail_block\" href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 144), "html", null, true);
echo "\">
<div class=\"category_detail_block__inner\">
<div class=\"category_detail_block__img\">
<img src=\"";
// line 147
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "file_name", [], "any", false, false, false, 147)), "save_image"), "html", null, true);
echo "\">
</div>
<div class=\"category_detail_block__txt\">
<div class=\"logo_ja_block\">
<img src=\"";
// line 151
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "logo_file_name", [], "any", false, false, false, 151)), "save_image"), "html", null, true);
echo "\">
<p class=\"cat_ttl\">";
// line 152
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "japaneseText", [], "any", false, false, false, 152), "html", null, true);
echo "</p>
</div><!--/.logo_ja_block-->
<p>";
// line 154
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["category"], "content", [], "any", true, true, false, 154)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["category"], "content", [], "any", false, false, false, 154), "説明文がありません")) : ("説明文がありません")), "html", null, true);
echo "</p>
<div class=\"text-right\">
<span class=\"base_link_brn\">
<span>詳細を見る</span>
<span>詳細を見る</span>
</span>
</div><!--/.text-right-->
</div><!--./category_detail_block__txt-->
</div><!--/.category_detail_block__inner-->
</a><!--/.category_detail_block-->
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 165
echo " </div><!--/.category_detail_list-->
";
}
// line 167
echo "
";
// line 169
echo " ";
$context["filteredCategories"] = twig_array_filter($this->env, (isset($context["childCategories"]) || array_key_exists("childCategories", $context) ? $context["childCategories"] : (function () { throw new RuntimeError('Variable "childCategories" does not exist.', 169, $this->source); })()), function ($__category__) use ($context, $macros) { $context["category"] = $__category__; return twig_in_filter(twig_upper_filter($this->env, twig_slice($this->env, twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 169, $this->source); })()), "slug", [], "any", false, false, false, 169), 0, 1)), [0 => "P", 1 => "Q", 2 => "R", 3 => "S", 4 => "T"]); });
// line 170
echo " ";
if ((isset($context["filteredCategories"]) || array_key_exists("filteredCategories", $context) ? $context["filteredCategories"] : (function () { throw new RuntimeError('Variable "filteredCategories" does not exist.', 170, $this->source); })())) {
// line 171
echo " <div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">P-T</span></h2>
</div><!--/.home_title__inner-->
<div class=\"category_detail_list\">
";
// line 175
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, (isset($context["filteredCategories"]) || array_key_exists("filteredCategories", $context) ? $context["filteredCategories"] : (function () { throw new RuntimeError('Variable "filteredCategories" does not exist.', 175, $this->source); })()), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 175, $this->source); })()), "slug", [], "any", false, false, false, 175) <=> twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 175, $this->source); })()), "slug", [], "any", false, false, false, 175)); }));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 176
echo " <a id=\"target";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 176), "html", null, true);
echo "\" class=\"category_detail_block\" href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 176), "html", null, true);
echo "\">
<div class=\"category_detail_block__inner\">
<div class=\"category_detail_block__img\">
<img src=\"";
// line 179
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "file_name", [], "any", false, false, false, 179)), "save_image"), "html", null, true);
echo "\">
</div>
<div class=\"category_detail_block__txt\">
<div class=\"logo_ja_block\">
<img src=\"";
// line 183
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "logo_file_name", [], "any", false, false, false, 183)), "save_image"), "html", null, true);
echo "\">
<p class=\"cat_ttl\">";
// line 184
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "japaneseText", [], "any", false, false, false, 184), "html", null, true);
echo "</p>
</div><!--/.logo_ja_block-->
<p>";
// line 186
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["category"], "content", [], "any", true, true, false, 186)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["category"], "content", [], "any", false, false, false, 186), "説明文がありません")) : ("説明文がありません")), "html", null, true);
echo "</p>
<div class=\"text-right\">
<span class=\"base_link_brn\">
<span>詳細を見る</span>
<span>詳細を見る</span>
</span>
</div><!--/.text-right-->
</div><!--./category_detail_block__txt-->
</div><!--/.category_detail_block__inner-->
</a><!--/.category_detail_block-->
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 197
echo " </div><!--/.category_detail_list-->
";
}
// line 199
echo "
";
// line 202
echo " ";
$context["filteredCategories"] = twig_array_filter($this->env, (isset($context["childCategories"]) || array_key_exists("childCategories", $context) ? $context["childCategories"] : (function () { throw new RuntimeError('Variable "childCategories" does not exist.', 202, $this->source); })()), function ($__category__) use ($context, $macros) { $context["category"] = $__category__; return twig_in_filter(twig_upper_filter($this->env, twig_slice($this->env, twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 202, $this->source); })()), "slug", [], "any", false, false, false, 202), 0, 1)), [0 => "U", 1 => "V", 2 => "W", 3 => "X", 4 => "Y", 5 => "Z"]); });
// line 203
echo " ";
if ((isset($context["filteredCategories"]) || array_key_exists("filteredCategories", $context) ? $context["filteredCategories"] : (function () { throw new RuntimeError('Variable "filteredCategories" does not exist.', 203, $this->source); })())) {
// line 204
echo " <div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">U-Z</span></h2>
</div><!--/.home_title__inner-->
<div class=\"category_detail_list\">
";
// line 208
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, (isset($context["filteredCategories"]) || array_key_exists("filteredCategories", $context) ? $context["filteredCategories"] : (function () { throw new RuntimeError('Variable "filteredCategories" does not exist.', 208, $this->source); })()), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 208, $this->source); })()), "slug", [], "any", false, false, false, 208) <=> twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 208, $this->source); })()), "slug", [], "any", false, false, false, 208)); }));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 209
echo " <a id=\"target";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 209), "html", null, true);
echo "\" class=\"category_detail_block\" href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 209), "html", null, true);
echo "\">
<div class=\"category_detail_block__inner\">
<div class=\"category_detail_block__img\">
<img src=\"";
// line 212
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "file_name", [], "any", false, false, false, 212)), "save_image"), "html", null, true);
echo "\">
</div>
<div class=\"category_detail_block__txt\">
<div class=\"logo_ja_block\">
<img src=\"";
// line 216
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . twig_get_attribute($this->env, $this->source, $context["category"], "logo_file_name", [], "any", false, false, false, 216)), "save_image"), "html", null, true);
echo "\">
<p class=\"cat_ttl\">";
// line 217
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "japaneseText", [], "any", false, false, false, 217), "html", null, true);
echo "</p>
</div><!--/.logo_ja_block-->
<p>";
// line 219
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["category"], "content", [], "any", true, true, false, 219)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["category"], "content", [], "any", false, false, false, 219), "説明文がありません")) : ("説明文がありません")), "html", null, true);
echo "</p>
<div class=\"text-right\">
<span class=\"base_link_brn\">
<span>詳細を見る</span>
<span>詳細を見る</span>
</span>
</div><!--/.text-right-->
</div><!--./category_detail_block__txt-->
</div><!--/.category_detail_block__inner-->
</a><!--/.category_detail_block-->
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 230
echo " </div><!--/.category_detail_list-->
";
}
// line 232
echo " </section><!--/.brand_display_section-->
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 237
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 238
echo "<script>
\$(window).on('load',function(){
\$('.grid').addClass('show');
//Muuriギャラリープラグイン設定
var grid = new Muuri('.grid', {
});
// 検索機能
\$('input.search-field').on('input', function () {
var searchText = \$(this).val().toLowerCase();
grid.filter(function (item) {
var element = item.getElement();
var textContent = element.textContent || element.innerText;
return textContent.toLowerCase().indexOf(searchText) > -1;
});
});
//並び替えボタン設定
\$('.sort-btn ul li').on('click',function(){//並び替えボタンをクリックしたら
var className = \$(this).attr(\"class\")//クリックしたボタンのクラス名を取得
className = className.split(' '); //「.sort-btn ul li」のクラス名を分割して配列にする
//ボタンにクラス名activeがついている場合
if(\$(this).hasClass(\"active\")){
if(className[0] != \"all\"){ //ボタンのクラス名がallでなければ
\$(this).removeClass(\"active\"); //activeクラスを消す
var selectElms = \$(\".sort-btn ul li.active\"); //ボタン内にactiveクラスがついている要素を全て取得
if(selectElms.length == 0){ //取得した配列内にactiveクラスがついている要素がなければ
\$(\".sort-btn ul li.all\").addClass(\"active\");//ボタンallにactiveを追加し
grid.show(''); //ギャラリーの全ての画像を表示
}else{
filterDo(); //取得した配列内にactiveクラスがついている要素があれば並び替えを行う
}
}
}
//ボタンにクラス名activeがついていない場合
else{
if(className[0] == \"all\"){ //ボタンのクラス名にallとついていたら
\$(\".sort-btn ul li\").removeClass(\"active\"); //ボタンのli要素の全てのactiveを削除し
\$(this).addClass(\"active\"); //allにactiveクラスを付与
grid.show(''); //ギャラリーの全ての画像を表示
}else{
if(\$(\".all\").hasClass(\"active\")){ //allクラス名にactiveクラスが付いていたら
\$(\".sort-btn ul li.all\").removeClass(\"active\");//ボタンallのactiveクラスを消し
}
\$(this).addClass(\"active\"); //クリックしたチェックボックスへactiveクラスを付与
filterDo(); //並び替えを行う
}
}
});
//画像の並び替え設定
function filterDo(){
var selectElms = \$(\".sort-btn ul li.active\"); //全てのボタンのactive要素を取得
var selectElemAry = []; //activeクラスがついているボタンのクラス名(sortXX)を保存する配列を定義
\$.each(selectElms, function(index, selectElm) {
var className = \$(this).attr(\"class\") //activeクラスがついている全てのボタンのクラス名(sortXX)を取得
className = className.split(' '); //ボタンのクラス名を分割して配列にし、
selectElemAry.push(\".\"+className[0]); //selectElemAry配列に、チェックのついたクラス名(sortXX)を追加
})
str = selectElemAry.join(','); //selectElemAry配列に追加されたクラス名をカンマ区切りでテキストにして
grid.filter(str); //grid.filter(str);のstrに代入し、ボタンのクラス名と<li>につけられたクラス名が一致したら出現
}
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "brand.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 533 => 238, 523 => 237, 512 => 232, 508 => 230, 491 => 219, 486 => 217, 482 => 216, 475 => 212, 464 => 209, 460 => 208, 454 => 204, 451 => 203, 448 => 202, 444 => 199, 440 => 197, 423 => 186, 418 => 184, 414 => 183, 407 => 179, 396 => 176, 392 => 175, 386 => 171, 383 => 170, 380 => 169, 377 => 167, 373 => 165, 356 => 154, 351 => 152, 347 => 151, 340 => 147, 329 => 144, 325 => 143, 319 => 139, 316 => 138, 313 => 137, 310 => 135, 306 => 133, 289 => 122, 284 => 120, 280 => 119, 273 => 115, 262 => 112, 258 => 111, 255 => 110, 253 => 109, 248 => 106, 245 => 105, 242 => 103, 238 => 101, 221 => 90, 215 => 87, 211 => 86, 203 => 81, 192 => 78, 188 => 77, 182 => 73, 179 => 72, 176 => 71, 169 => 65, 159 => 61, 155 => 60, 151 => 59, 146 => 57, 139 => 55, 134 => 54, 130 => 53, 92 => 18, 81 => 9, 78 => 8, 75 => 7, 72 => 6, 69 => 4, 59 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'fullwidth_frame.twig' %}
{% block main %}
{# ブランド[カテゴリID:34]の子カテゴリ一覧を表示 #}
{% set parentId = 34 %}
{% set ParentCategory = repository('Eccube\\\\Entity\\\\Category').find(parentId) %}
{% set childCategories = ParentCategory.children|sort((a, b) => a.sortNo <=> b.sortNo) %}
<div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">Brand</span><small>ブランドから探す</small></h2>
</div><!--/.home_title__inner-->
<div class=\"brand_sort_area\">
<ul class=\"sort-btn\">
<li class=\"sort_search_btn\">
<input class=\"search-field form-control\" type=\"text\" name=\"search\" placeholder=\"ブランド名検索\">
<img class=\"seach_icon\" src=\"{{ asset('assets/icon/search-dark.svg') }}\" alt=\"\">
</li>
<li class=\"alphabet_wrap\">
<ul class=\"alphabet\">
<li class=\"brand_A\"><span>A</span></li>
<li class=\"brand_B\"><span>B</span></li>
<li class=\"brand_C\"><span>C</span></li>
<li class=\"brand_D\"><span>D</span></li>
<li class=\"brand_E\"><span>E</span></li>
<li class=\"brand_F\"><span>F</span></li>
<li class=\"brand_G\"><span>G</span></li>
<li class=\"brand_H\"><span>H</span></li>
<li class=\"brand_I\"><span>I</span></li>
<li class=\"brand_J\"><span>J</span></li>
<li class=\"brand_K\"><span>K</span></li>
<li class=\"brand_L\"><span>L</span></li>
<li class=\"brand_M\"><span>M</span></li>
<li class=\"brand_N\"><span>N</span></li>
<li class=\"brand_O\"><span>O</span></li>
<li class=\"brand_P\"><span>P</span></li>
<li class=\"brand_Q\"><span>Q</span></li>
<li class=\"brand_R\"><span>R</span></li>
<li class=\"brand_S\"><span>S</span></li>
<li class=\"brand_T\"><span>T</span></li>
<li class=\"brand_U\"><span>U</span></li>
<li class=\"brand_V\"><span>V</span></li>
<li class=\"brand_W\"><span>W</span></li>
<li class=\"brand_X\"><span>X</span></li>
<li class=\"brand_Y\"><span>Y</span></li>
<li class=\"brand_Z\"><span>Z</span></li>
</ul>
</li>
</ul>
<ul class=\"grid\">
{% for category in childCategories|sort((a, b) => a.slug <=> b.slug) %}
<li class=\"item brand_{{ category.slug }}\">
<a class=\"item_content\" href=\"#target{{ category.id }}\" data-id=\"{{ category.id }}\">
<div class=\"thumb\">
<img src=\"{{ asset('rich_category/'~category.file_name,'save_image') }}\">
</div><!--/.thumb-->
<span class=\"ttl_en\">{{ category.englishText }}</span>
<span class=\"ttl\">{{ category.japaneseText }}</span>
<span class=\"search_keywords\">{{ category.searchKeywords }}</span>
</a>
</li>
{% endfor %}
</ul>
</div><!--/wrapper-->
<section class=\"brand_display_section\">
{# A〜E #}
{% set filteredCategories = childCategories|filter(category => category.slug|slice(0, 1)|upper in ['A', 'B', 'C', 'D', 'E']) %}
{% if filteredCategories %}
<div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">A-E</span></h2>
</div><!--/.home_title__inner-->
<div class=\"category_detail_list\">
{% for category in filteredCategories|sort((a, b) => a.slug <=> b.slug) %}
<a id=\"target{{ category.id }}\" class=\"category_detail_block\" href=\"{{ url('homepage') }}products/list?category_id={{ category.id }}\">
<div class=\"category_detail_block__inner\">
<div class=\"category_detail_block__img\">
<img src=\"{{ asset('rich_category/'~category.file_name,'save_image') }}\">
</div>
<div class=\"category_detail_block__txt\">
<div class=\"logo_ja_block\">
<img src=\"{{ asset('rich_category/'~category.logo_file_name,'save_image') }}\">
<p class=\"cat_ttl\">{{ category.japaneseText }}</p>
</div><!--/.logo_ja_block-->
<p>{{ category.content|default('説明文がありません') }}</p>
<div class=\"text-right\">
<span class=\"base_link_brn\">
<span>詳細を見る</span>
<span>詳細を見る</span>
</span>
</div><!--/.text-right-->
</div><!--./category_detail_block__txt-->
</div><!--/.category_detail_block__inner-->
</a><!--/.category_detail_block-->
{% endfor %}
</div><!--/.category_detail_list-->
{% endif %}
{# F〜J #}
{% set filteredCategories = childCategories|filter(category => category.slug|slice(0, 1)|upper in ['F', 'G', 'H', 'I', 'J']) %}
<div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">F-J</span></h2>
</div><!--/.home_title__inner-->
{% if filteredCategories %}
<div class=\"category_detail_list\">
{% for category in filteredCategories|sort((a, b) => a.slug <=> b.slug) %}
<a id=\"target{{ category.id }}\" class=\"category_detail_block\" href=\"{{ url('homepage') }}products/list?category_id={{ category.id }}\">
<div class=\"category_detail_block__inner\">
<div class=\"category_detail_block__img\">
<img src=\"{{ asset('rich_category/'~category.file_name,'save_image') }}\">
</div>
<div class=\"category_detail_block__txt\">
<div class=\"logo_ja_block\">
<img src=\"{{ asset('rich_category/'~category.logo_file_name,'save_image') }}\">
<p class=\"cat_ttl\">{{ category.japaneseText }}</p>
</div><!--/.logo_ja_block-->
<p>{{ category.content|default('説明文がありません') }}</p>
<div class=\"text-right\">
<span class=\"base_link_brn\">
<span>詳細を見る</span>
<span>詳細を見る</span>
</span>
</div><!--/.text-right-->
</div><!--./category_detail_block__txt-->
</div><!--/.category_detail_block__inner-->
</a><!--/.category_detail_block-->
{% endfor %}
</div><!--/.category_detail_list-->
{% endif %}
{# K〜O #}
{% set filteredCategories = childCategories|filter(category => category.slug|slice(0, 1)|upper in ['K', 'L', 'M', 'N', 'O']) %}
{% if filteredCategories %}
<div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">K-O</span></h2>
</div><!--/.home_title__inner-->
<div class=\"category_detail_list\">
{% for category in filteredCategories|sort((a, b) => a.slug <=> b.slug) %}
<a id=\"target{{ category.id }}\" class=\"category_detail_block\" href=\"{{ url('homepage') }}products/list?category_id={{ category.id }}\">
<div class=\"category_detail_block__inner\">
<div class=\"category_detail_block__img\">
<img src=\"{{ asset('rich_category/'~category.file_name,'save_image') }}\">
</div>
<div class=\"category_detail_block__txt\">
<div class=\"logo_ja_block\">
<img src=\"{{ asset('rich_category/'~category.logo_file_name,'save_image') }}\">
<p class=\"cat_ttl\">{{ category.japaneseText }}</p>
</div><!--/.logo_ja_block-->
<p>{{ category.content|default('説明文がありません') }}</p>
<div class=\"text-right\">
<span class=\"base_link_brn\">
<span>詳細を見る</span>
<span>詳細を見る</span>
</span>
</div><!--/.text-right-->
</div><!--./category_detail_block__txt-->
</div><!--/.category_detail_block__inner-->
</a><!--/.category_detail_block-->
{% endfor %}
</div><!--/.category_detail_list-->
{% endif %}
{# P〜T #}
{% set filteredCategories = childCategories|filter(category => category.slug|slice(0, 1)|upper in ['P', 'Q', 'R', 'S', 'T']) %}
{% if filteredCategories %}
<div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">P-T</span></h2>
</div><!--/.home_title__inner-->
<div class=\"category_detail_list\">
{% for category in filteredCategories|sort((a, b) => a.slug <=> b.slug) %}
<a id=\"target{{ category.id }}\" class=\"category_detail_block\" href=\"{{ url('homepage') }}products/list?category_id={{ category.id }}\">
<div class=\"category_detail_block__inner\">
<div class=\"category_detail_block__img\">
<img src=\"{{ asset('rich_category/'~category.file_name,'save_image') }}\">
</div>
<div class=\"category_detail_block__txt\">
<div class=\"logo_ja_block\">
<img src=\"{{ asset('rich_category/'~category.logo_file_name,'save_image') }}\">
<p class=\"cat_ttl\">{{ category.japaneseText }}</p>
</div><!--/.logo_ja_block-->
<p>{{ category.content|default('説明文がありません') }}</p>
<div class=\"text-right\">
<span class=\"base_link_brn\">
<span>詳細を見る</span>
<span>詳細を見る</span>
</span>
</div><!--/.text-right-->
</div><!--./category_detail_block__txt-->
</div><!--/.category_detail_block__inner-->
</a><!--/.category_detail_block-->
{% endfor %}
</div><!--/.category_detail_list-->
{% endif %}
{# U〜Z #}
{% set filteredCategories = childCategories|filter(category => category.slug|slice(0, 1)|upper in ['U', 'V', 'W', 'X', 'Y','Z']) %}
{% if filteredCategories %}
<div class=\"home_title__inner\">
<h2 class=\"home_en_title \"><span class=\"en\">U-Z</span></h2>
</div><!--/.home_title__inner-->
<div class=\"category_detail_list\">
{% for category in filteredCategories|sort((a, b) => a.slug <=> b.slug) %}
<a id=\"target{{ category.id }}\" class=\"category_detail_block\" href=\"{{ url('homepage') }}products/list?category_id={{ category.id }}\">
<div class=\"category_detail_block__inner\">
<div class=\"category_detail_block__img\">
<img src=\"{{ asset('rich_category/'~category.file_name,'save_image') }}\">
</div>
<div class=\"category_detail_block__txt\">
<div class=\"logo_ja_block\">
<img src=\"{{ asset('rich_category/'~category.logo_file_name,'save_image') }}\">
<p class=\"cat_ttl\">{{ category.japaneseText }}</p>
</div><!--/.logo_ja_block-->
<p>{{ category.content|default('説明文がありません') }}</p>
<div class=\"text-right\">
<span class=\"base_link_brn\">
<span>詳細を見る</span>
<span>詳細を見る</span>
</span>
</div><!--/.text-right-->
</div><!--./category_detail_block__txt-->
</div><!--/.category_detail_block__inner-->
</a><!--/.category_detail_block-->
{% endfor %}
</div><!--/.category_detail_list-->
{% endif %}
</section><!--/.brand_display_section-->
{% endblock %}
{% block javascript %}
<script>
\$(window).on('load',function(){
\$('.grid').addClass('show');
//Muuriギャラリープラグイン設定
var grid = new Muuri('.grid', {
});
// 検索機能
\$('input.search-field').on('input', function () {
var searchText = \$(this).val().toLowerCase();
grid.filter(function (item) {
var element = item.getElement();
var textContent = element.textContent || element.innerText;
return textContent.toLowerCase().indexOf(searchText) > -1;
});
});
//並び替えボタン設定
\$('.sort-btn ul li').on('click',function(){//並び替えボタンをクリックしたら
var className = \$(this).attr(\"class\")//クリックしたボタンのクラス名を取得
className = className.split(' '); //「.sort-btn ul li」のクラス名を分割して配列にする
//ボタンにクラス名activeがついている場合
if(\$(this).hasClass(\"active\")){
if(className[0] != \"all\"){ //ボタンのクラス名がallでなければ
\$(this).removeClass(\"active\"); //activeクラスを消す
var selectElms = \$(\".sort-btn ul li.active\"); //ボタン内にactiveクラスがついている要素を全て取得
if(selectElms.length == 0){ //取得した配列内にactiveクラスがついている要素がなければ
\$(\".sort-btn ul li.all\").addClass(\"active\");//ボタンallにactiveを追加し
grid.show(''); //ギャラリーの全ての画像を表示
}else{
filterDo(); //取得した配列内にactiveクラスがついている要素があれば並び替えを行う
}
}
}
//ボタンにクラス名activeがついていない場合
else{
if(className[0] == \"all\"){ //ボタンのクラス名にallとついていたら
\$(\".sort-btn ul li\").removeClass(\"active\"); //ボタンのli要素の全てのactiveを削除し
\$(this).addClass(\"active\"); //allにactiveクラスを付与
grid.show(''); //ギャラリーの全ての画像を表示
}else{
if(\$(\".all\").hasClass(\"active\")){ //allクラス名にactiveクラスが付いていたら
\$(\".sort-btn ul li.all\").removeClass(\"active\");//ボタンallのactiveクラスを消し
}
\$(this).addClass(\"active\"); //クリックしたチェックボックスへactiveクラスを付与
filterDo(); //並び替えを行う
}
}
});
//画像の並び替え設定
function filterDo(){
var selectElms = \$(\".sort-btn ul li.active\"); //全てのボタンのactive要素を取得
var selectElemAry = []; //activeクラスがついているボタンのクラス名(sortXX)を保存する配列を定義
\$.each(selectElms, function(index, selectElm) {
var className = \$(this).attr(\"class\") //activeクラスがついている全てのボタンのクラス名(sortXX)を取得
className = className.split(' '); //ボタンのクラス名を分割して配列にし、
selectElemAry.push(\".\"+className[0]); //selectElemAry配列に、チェックのついたクラス名(sortXX)を追加
})
str = selectElemAry.join(','); //selectElemAry配列に追加されたクラス名をカンマ区切りでテキストにして
grid.filter(str); //grid.filter(str);のstrに代入し、ボタンのクラス名と<li>につけられたクラス名が一致したら出現
}
});
</script>
{% endblock %}
", "brand.twig", "/home/xs626321/ikus.furniture/public_html/dev/app/template/default/brand.twig");
}
}