<?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;
/* @user_data/reading.twig */
class __TwigTemplate_baee3010536f6232edb0e0202c801e07 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'javascript' => [$this, 'block_javascript'],
'stylesheet' => [$this, 'block_stylesheet'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
return "default_frame.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", "@user_data/reading.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@user_data/reading.twig"));
// line 4
$context["post_list"] = $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->postList(["page_count" => 10, "type_data_key" => "news", "category_data_key" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 4, $this->source); })()), "request", [], "any", false, false, true, 4), "query", [], "any", false, false, true, 4), "get", [0 => "category_data_key"], "method", false, false, true, 4)]);
// line 5
$context["category_list"] = $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->categoryList(["type_data_key" => "news"]);
// line 33
$context["breadcrumbs"] = [0 => ["name" => "ニュース"]];
// line 1
$this->parent = $this->loadTemplate("default_frame.twig", "@user_data/reading.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 7
public function block_javascript($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", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 8
echo " ";
echo $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->asset("script.js", "script");
echo "
<script src=\"https://code.jquery.com/jquery-3.6.0.min.js\"></script>
<script>
\$(document).ready(function() {
\$('.category-button').on('click', function() {
var categoryKey = \$(this).data('category-key');
var url = new URL(window.location.href);
url.searchParams.set('category_data_key', categoryKey);
window.location.href = url.href;
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 22
public function block_stylesheet($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", "stylesheet"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 23
echo " ";
echo $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->asset("style.css", "style");
echo "
<style>
@media (min-width: 769px) {
.content-container.sp {
display: none;
}
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 35
public function block_main($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", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 36
echo " <div class=\"flex w-[990px] justify-between mx-auto lg:w-full lg:flex-col lg:items-center lg:px-4\">
<div class=\"w-[720px] text-[#000000] md:w-full mt-[40px] lg:mt-6\">
<p class=\"flex justify-center text-[34px] md:text-2xl font-extralight\">お知らせ</p>
<p class=\"text-[16px] font-[250] items-center mt-6 md:mt-4 mb-10 md:mb-8 md:text-[14px]\">
商品についての情報、お得な情報などをお届けします。
</p>
";
// line 42
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["post_list"]) || array_key_exists("post_list", $context) ? $context["post_list"] : (function () { throw new RuntimeError('Variable "post_list" does not exist.', 42, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
// line 43
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getURI", [], "any", false, false, true, 43), 43, $this->source), "html", null, true);
echo "\" class=\"hover flex gap-2.5 justify-between my-14 md:my-10 md:w-full h-[210px] md:mx-auto md:flex-col md:h-[auto]\">
<div class=\"w-[320px] md:w-full\">
<img src=\"";
// line 45
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "thumbnail", [], "any", false, false, true, 45), 45, $this->source)), "save_image"), "html", null, true);
echo "\" class=\"w-[320px] h-full md:w-full md:h-[225px] object-cover\">
</div>
<div class=\"w-[364px] font-[250px] flex flex-col gap-2 md:w-full\">
<h2 class=\"text-2xl text-[#000000] md:text-lg font-extralight\">";
// line 48
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getTitle", [], "any", false, false, true, 48), 48, $this->source), "html", null, true);
echo "</h2>
";
// line 49
if (twig_get_attribute($this->env, $this->source, $context["post"], "category", [], "any", false, false, true, 49)) {
// line 50
echo " <time datetime=";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getPublicDate", [], "any", false, false, true, 50), 50, $this->source), "Y-m-d"), "html", null, true);
echo " class=\"text-[13px] text-[#666666]\">
<span>";
// line 51
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getPublicDate", [], "any", false, false, true, 51), 51, $this->source), "Y.m.d"), "html", null, true);
echo "更新<span>
<span class=\"pl-2\">";
// line 52
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "category", [], "any", false, false, true, 52), "categoryName", [], "any", false, false, true, 52), 52, $this->source), "html", null, true);
echo "<span>
</time>
";
}
// line 55
echo " ";
$context["stripped_body"] = twig_striptags($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "body", [], "any", false, false, true, 55), 55, $this->source));
// line 56
echo " <p class=\"text-[14px] text-[#666666]\">
";
// line 57
(((twig_length_filter($this->env, (isset($context["stripped_body"]) || array_key_exists("stripped_body", $context) ? $context["stripped_body"] : (function () { throw new RuntimeError('Variable "stripped_body" does not exist.', 57, $this->source); })())) > 90)) ? (print (twig_escape_filter($this->env, (twig_slice($this->env, (isset($context["stripped_body"]) || array_key_exists("stripped_body", $context) ? $context["stripped_body"] : (function () { throw new RuntimeError('Variable "stripped_body" does not exist.', 57, $this->source); })()), 0, 90) . "..."), "html", null, true))) : (print ((isset($context["stripped_body"]) || array_key_exists("stripped_body", $context) ? $context["stripped_body"] : (function () { throw new RuntimeError('Variable "stripped_body" does not exist.', 57, $this->source); })()))));
echo "
</p>
</div>
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 62
echo " ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["post_list"]) || array_key_exists("post_list", $context) ? $context["post_list"] : (function () { throw new RuntimeError('Variable "post_list" does not exist.', 62, $this->source); })()), "totalItemCount", [], "any", false, false, true, 62) > 0)) {
// line 63
echo " ";
$this->loadTemplate("pager.twig", "@user_data/reading.twig", 63)->display(twig_array_merge($context, ["pages" => twig_get_attribute($this->env, $this->source, (isset($context["post_list"]) || array_key_exists("post_list", $context) ? $context["post_list"] : (function () { throw new RuntimeError('Variable "post_list" does not exist.', 63, $this->source); })()), "paginationData", [], "any", false, false, true, 63)]));
// line 64
echo " ";
}
// line 65
echo " </div>
<div class=\"w-[200px] md:w-full flex flex-col mt-1 md:mt-0\">
<div class=\"text-sm text-[250] text-[#000000] md:p-[30px] md:mt-6 md:bg-[#F6F6F6]\">
<p>Category :</p>
<div class=\"mt-[10px] text-[#000000] md:font-[400]\">
";
// line 70
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["category_list"]) || array_key_exists("category_list", $context) ? $context["category_list"] : (function () { throw new RuntimeError('Variable "category_list" does not exist.', 70, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 71
echo " <p>
<button class=\"category-button w-full text-left my-[2px] underline\" data-category-key=\"";
// line 72
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["category"], "dataKey", [], "any", false, false, true, 72), 72, $this->source), "html", null, true);
echo "\">
";
// line 73
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["category"], "categoryName", [], "any", false, false, true, 73), 73, $this->source), "html", null, true);
echo " (";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["category"], "postCount", [], "any", false, false, true, 73), 73, $this->source), "html", null, true);
echo ")
</button>
</p>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 77
echo " </div>
</div>
</div>
</div>
";
// line 81
$context["breadcrumbs"] = [0 => ["name" => "お知らせ・読み物"]];
// line 82
echo "\t ";
$this->loadTemplate("Block/breadcrumbs.twig", "@user_data/reading.twig", 82)->display($context);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@user_data/reading.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 252 => 82, 250 => 81, 244 => 77, 232 => 73, 228 => 72, 225 => 71, 221 => 70, 214 => 65, 211 => 64, 208 => 63, 205 => 62, 194 => 57, 191 => 56, 188 => 55, 182 => 52, 178 => 51, 173 => 50, 171 => 49, 167 => 48, 161 => 45, 155 => 43, 151 => 42, 143 => 36, 133 => 35, 113 => 23, 103 => 22, 79 => 8, 69 => 7, 58 => 1, 56 => 33, 54 => 5, 52 => 4, 39 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'default_frame.twig' %}
{# 投稿リストの取得 #}
{% set post_list = TabaCMSPostList({ page_count: 10, type_data_key: 'news', category_data_key: app.request.query.get('category_data_key') }) %}
{% set category_list = TabaCMSCategoryList({type_data_key:'news'}) %}
{% block javascript %}
{{ TabaCMSAsset('script.js','script')|raw }}
<script src=\"https://code.jquery.com/jquery-3.6.0.min.js\"></script>
<script>
\$(document).ready(function() {
\$('.category-button').on('click', function() {
var categoryKey = \$(this).data('category-key');
var url = new URL(window.location.href);
url.searchParams.set('category_data_key', categoryKey);
window.location.href = url.href;
});
});
</script>
{% endblock javascript %}
{% block stylesheet %}
{{ TabaCMSAsset('style.css','style')|raw }}
<style>
@media (min-width: 769px) {
.content-container.sp {
display: none;
}
}
</style>
{% endblock stylesheet %}
{% set breadcrumbs = [{'name': 'ニュース'}] %}
{% block main %}
<div class=\"flex w-[990px] justify-between mx-auto lg:w-full lg:flex-col lg:items-center lg:px-4\">
<div class=\"w-[720px] text-[#000000] md:w-full mt-[40px] lg:mt-6\">
<p class=\"flex justify-center text-[34px] md:text-2xl font-extralight\">お知らせ</p>
<p class=\"text-[16px] font-[250] items-center mt-6 md:mt-4 mb-10 md:mb-8 md:text-[14px]\">
商品についての情報、お得な情報などをお届けします。
</p>
{% for post in post_list %}
<a href=\"{{ post.getURI }}\" class=\"hover flex gap-2.5 justify-between my-14 md:my-10 md:w-full h-[210px] md:mx-auto md:flex-col md:h-[auto]\">
<div class=\"w-[320px] md:w-full\">
<img src=\"{{ asset(post.thumbnail|no_image_product, 'save_image') }}\" class=\"w-[320px] h-full md:w-full md:h-[225px] object-cover\">
</div>
<div class=\"w-[364px] font-[250px] flex flex-col gap-2 md:w-full\">
<h2 class=\"text-2xl text-[#000000] md:text-lg font-extralight\">{{ post.getTitle }}</h2>
{% if post.category %}
<time datetime={{ post.getPublicDate|date('Y-m-d') }} class=\"text-[13px] text-[#666666]\">
<span>{{ post.getPublicDate|date('Y.m.d') }}更新<span>
<span class=\"pl-2\">{{ post.category.categoryName }}<span>
</time>
{% endif %}
{% set stripped_body = post.body|striptags %}
<p class=\"text-[14px] text-[#666666]\">
{{ stripped_body|length > 90 ? stripped_body|slice(0, 90) ~ '...' : stripped_body|raw }}
</p>
</div>
</a>
{% endfor %}
{% if post_list.totalItemCount > 0 %}
{% include \"pager.twig\" with {'pages':post_list.paginationData} %}
{% endif %}
</div>
<div class=\"w-[200px] md:w-full flex flex-col mt-1 md:mt-0\">
<div class=\"text-sm text-[250] text-[#000000] md:p-[30px] md:mt-6 md:bg-[#F6F6F6]\">
<p>Category :</p>
<div class=\"mt-[10px] text-[#000000] md:font-[400]\">
{% for category in category_list %}
<p>
<button class=\"category-button w-full text-left my-[2px] underline\" data-category-key=\"{{ category.dataKey }}\">
{{ category.categoryName }} ({{ category.postCount }})
</button>
</p>
{% endfor %}
</div>
</div>
</div>
</div>
{% set breadcrumbs = [{'name': 'お知らせ・読み物'}] %}
\t {% include('Block/breadcrumbs.twig') %}
{% endblock %}
", "@user_data/reading.twig", "/home/xs082386/manaka-store.com/public_html/stg-renewal.manaka-store.com/app/template/user_data/reading.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 4, "for" => 42, "if" => 49, "include" => 63);
static $filters = array("raw" => 8, "escape" => 43, "no_image_product" => 45, "date" => 50, "striptags" => 55, "length" => 57, "slice" => 57);
static $functions = array("TabaCMSPostList" => 4, "TabaCMSCategoryList" => 5, "TabaCMSAsset" => 8, "asset" => 45);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if', 'include'],
['raw', 'escape', 'no_image_product', 'date', 'striptags', 'length', 'slice'],
['TabaCMSPostList', 'TabaCMSCategoryList', 'TabaCMSAsset', 'asset']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}