<?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;
/* @TabaCMS2/default/list.twig */
class __TwigTemplate_df5275e49cccd7a6901d12299b260f3f 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 7
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", "@TabaCMS2/default/list.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@TabaCMS2/default/list.twig"));
// line 10
$context["post_list"] = $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->postList(["page_count" => 10]);
// line 20
$context["breadcrumbs"] = [0 => ["name" => "ニュース"]];
// line 7
$this->parent = $this->loadTemplate("default_frame.twig", "@TabaCMS2/default/list.twig", 7);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 12
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 13
echo " ";
echo $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->asset("script.js", "script");
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 16
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 17
echo " ";
echo $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->asset("style.css", "style");
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 22
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 23
echo " <section class=\"px-6 pb-10 pt-[7.5rem] md:pt-20 md:pb-1 text-black\">
<div class=\"mx-auto w-full max-w-[63rem]\">
<h1 class=\"flex items-start gap-4 md:gap-2\">
<span class=\"block h-[7.5rem] w-0.5 bg-gradient-to-b from-[#ADAAA6] md:h-16 md:w-px\"></span>
<p class=\"text-[2rem] font-light leading-normal tracking-widest md:text-xl\">
ニュース</p>
</h1>
</div>
</section>
";
// line 32
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/breadcrumb.twig");
echo "
<section class=\"px-6 pb-[7.5rem] md:pb-20 text-black tracking-wider\">
<div class=\"mx-auto w-full max-w-[50rem]\">
<div class=\"grid border-t border-sub-gray\">
";
// line 36
$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.', 36, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
// line 37
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, 37), 37, $this->source), "html", null, true);
echo "\" class=\"grid gap-6 py-10 md:gap-4 border-b border-sub-gray hover\">
<h2 class=\"line-clamp-2 text-xl md:text-base font-medium leading-[1.8] text-black \">
<span class=\"sr-only\">タイトル:</span>
";
// line 40
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getTitle", [], "any", false, false, true, 40), 40, $this->source), "html", null, true);
echo "</h2>
<time datetime=";
// line 41
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, 41), 41, $this->source), "Y-m-d"), "html", null, true);
echo " class=\"text-right text-sm text-black\">
<span class=\"sr-only\">投稿日:</span>
";
// line 43
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, 43), 43, $this->source), "Y.m.d"), "html", null, true);
echo "</time>
</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 46
echo " </div>
";
// line 47
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.', 47, $this->source); })()), "totalItemCount", [], "any", false, false, true, 47) > 0)) {
// line 48
echo " ";
$this->loadTemplate("pager.twig", "@TabaCMS2/default/list.twig", 48)->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.', 48, $this->source); })()), "paginationData", [], "any", false, false, true, 48)]));
// line 49
echo " ";
}
// line 50
echo " </div>
</section>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@TabaCMS2/default/list.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 181 => 50, 178 => 49, 175 => 48, 173 => 47, 170 => 46, 161 => 43, 156 => 41, 152 => 40, 145 => 37, 141 => 36, 134 => 32, 123 => 23, 113 => 22, 100 => 17, 90 => 16, 77 => 13, 67 => 12, 56 => 7, 54 => 20, 52 => 10, 39 => 7,);
}
public function getSourceContext()
{
return new Source("{#
Copyright (C) SPREAD WORKS Inc. All Rights Reserved.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{# 投稿リストの取得 #}
{% set post_list = TabaCMSPostList({page_count:10}) %}
{% block javascript %}
{{ TabaCMSAsset('script.js','script')|raw }}
{% endblock javascript %}
{% block stylesheet %}
{{ TabaCMSAsset('style.css','style')|raw }}
{% endblock stylesheet %}
{% set breadcrumbs = [{'name': 'ニュース'}] %}
{% block main %}
<section class=\"px-6 pb-10 pt-[7.5rem] md:pt-20 md:pb-1 text-black\">
<div class=\"mx-auto w-full max-w-[63rem]\">
<h1 class=\"flex items-start gap-4 md:gap-2\">
<span class=\"block h-[7.5rem] w-0.5 bg-gradient-to-b from-[#ADAAA6] md:h-16 md:w-px\"></span>
<p class=\"text-[2rem] font-light leading-normal tracking-widest md:text-xl\">
ニュース</p>
</h1>
</div>
</section>
{{ include('Block/breadcrumb.twig') }}
<section class=\"px-6 pb-[7.5rem] md:pb-20 text-black tracking-wider\">
<div class=\"mx-auto w-full max-w-[50rem]\">
<div class=\"grid border-t border-sub-gray\">
{% for post in post_list %}
<a href=\"{{ post.getURI }}\" class=\"grid gap-6 py-10 md:gap-4 border-b border-sub-gray hover\">
<h2 class=\"line-clamp-2 text-xl md:text-base font-medium leading-[1.8] text-black \">
<span class=\"sr-only\">タイトル:</span>
{{ post.getTitle }}</h2>
<time datetime={{ post.getPublicDate|date('Y-m-d') }} class=\"text-right text-sm text-black\">
<span class=\"sr-only\">投稿日:</span>
{{ post.getPublicDate|date('Y.m.d') }}</time>
</a>
{% endfor %}
</div>
{% if post_list.totalItemCount > 0 %}
{% include \"pager.twig\" with {'pages':post_list.paginationData} %}
{% endif %}
</div>
</section>
{% endblock %}
", "@TabaCMS2/default/list.twig", "/home/xs545372/itsukushi-store.com/public_html/stg.itsukushi-store.com/app/Plugin/TabaCMS2/Resource/template/default/list.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 10, "for" => 36, "if" => 47, "include" => 48);
static $filters = array("raw" => 13, "escape" => 37, "date" => 41);
static $functions = array("TabaCMSPostList" => 10, "TabaCMSAsset" => 13, "include" => 32);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if', 'include'],
['raw', 'escape', 'date'],
['TabaCMSPostList', 'TabaCMSAsset', 'include']
);
} 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;
}
}
}