<?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;
/* Block/news.twig */
class __TwigTemplate_ac49dd6a4e673483df059242f339ec87 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
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", "Block/news.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/news.twig"));
// line 11
$context["NewsList"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\News"), "getList", [], "method", false, false, false, 11);
// line 12
echo "
<div class=\"b-news\">
<div class=\"b-news__body\">
<h2 class=\"b-news__title c-animation-fade js-animation-fade\">
<span class=\"b-news__title--main\">";
// line 16
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("News"), "html", null, true);
echo "</span>
<span class=\"b-news__title--sub\">";
// line 17
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Information & Updates"), "html", null, true);
echo "</span>
</h2>
<div class=\"b-news__contents c-animation-fade js-animation-fade\" id=\"js-news__contents\">
";
// line 20
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["NewsList"]) || array_key_exists("NewsList", $context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.', 20, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
// line 21
echo " <section class=\"b-news__post js-news__post\">
<header class=\"b-news__post-heading";
// line 22
if ((twig_get_attribute($this->env, $this->source, $context["News"], "description", [], "any", false, false, false, 22) || twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 22))) {
echo " js-news__post-heading";
}
if ((twig_get_attribute($this->env, $this->source, $context["News"], "description", [], "any", false, false, false, 22) || twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 22))) {
echo " has-link";
}
echo "\">
<div class=\"b-news__post-heading-contents\">
<p class=\"b-news__post-date\">";
// line 24
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IntlExtension']->date_day($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "publish_date", [], "any", false, false, false, 24)), "html", null, true);
echo "</p>
<h3 class=\"b-news__post-title\">";
// line 25
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "title", [], "any", false, false, false, 25), "html", null, true);
echo "</h3>
</div>
";
// line 27
if ((twig_get_attribute($this->env, $this->source, $context["News"], "description", [], "any", false, false, false, 27) || twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 27))) {
// line 28
echo " <div class=\"b-news__post-actions\">
<i class=\"b-news__post-actions-icon c-animation--rotate-forward material-icons\">expand_more</i>
</div>
";
}
// line 32
echo " </header>
<div class=\"b-news__post-contents js-news__post-contents\">
";
// line 34
echo twig_nl2br(twig_get_attribute($this->env, $this->source, $context["News"], "description", [], "any", false, false, false, 34));
if (twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 34)) {
echo "<a href=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 34), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["News"], "link_method", [], "any", false, false, false, 34) == "1")) {
echo "target=\"_blank\"";
}
echo ">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("詳しくはこちら"), "html", null, true);
echo "</a>";
}
// line 35
echo " </div>
</section>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 38
echo " ";
if ((twig_length_filter($this->env, (isset($context["NewsList"]) || array_key_exists("NewsList", $context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.', 38, $this->source); })())) > 5)) {
// line 39
echo " <div class=\"b-news__actions\" id=\"js-news__actions\">
<div class=\"b-news__actions-item\">
<button class=\"c-button mdc-button\" id=\"js-news-button\" data-mdc-auto-init=\"MDCRipple\">
<span class=\"c-button__label mdc-button__label\">もっと見る</span>
</button>
</div>
</div>
";
}
// line 47
echo " </div>
</div>
</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "Block/news.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 133 => 47, 123 => 39, 120 => 38, 112 => 35, 99 => 34, 95 => 32, 89 => 28, 87 => 27, 82 => 25, 78 => 24, 68 => 22, 65 => 21, 61 => 20, 55 => 17, 51 => 16, 45 => 12, 43 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
http://www.lockon.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% set NewsList = repository('Eccube\\\\Entity\\\\News').getList() %}
<div class=\"b-news\">
<div class=\"b-news__body\">
<h2 class=\"b-news__title c-animation-fade js-animation-fade\">
<span class=\"b-news__title--main\">{{ 'News'|trans }}</span>
<span class=\"b-news__title--sub\">{{ 'Information & Updates'|trans }}</span>
</h2>
<div class=\"b-news__contents c-animation-fade js-animation-fade\" id=\"js-news__contents\">
{% for News in NewsList %}
<section class=\"b-news__post js-news__post\">
<header class=\"b-news__post-heading{% if News.description or News.url %} js-news__post-heading{% endif %}{% if News.description or News.url %} has-link{% endif %}\">
<div class=\"b-news__post-heading-contents\">
<p class=\"b-news__post-date\">{{ News.publish_date|date_day }}</p>
<h3 class=\"b-news__post-title\">{{ News.title }}</h3>
</div>
{% if News.description or News.url %}
<div class=\"b-news__post-actions\">
<i class=\"b-news__post-actions-icon c-animation--rotate-forward material-icons\">expand_more</i>
</div>
{% endif %}
</header>
<div class=\"b-news__post-contents js-news__post-contents\">
{{ News.description|raw|nl2br }}{% if News.url %}<a href=\"{{ News.url }}\" {% if News.link_method == '1' %}target=\"_blank\"{% endif %}>{{ '詳しくはこちら'|trans }}</a>{% endif %}
</div>
</section>
{% endfor %}
{% if NewsList|length > 5 %}
<div class=\"b-news__actions\" id=\"js-news__actions\">
<div class=\"b-news__actions-item\">
<button class=\"c-button mdc-button\" id=\"js-news-button\" data-mdc-auto-init=\"MDCRipple\">
<span class=\"c-button__label mdc-button__label\">もっと見る</span>
</button>
</div>
</div>
{% endif %}
</div>
</div>
</div>
{# scriptはindex.twigに記載 #}
", "Block/news.twig", "/home/rocroc/tsmt-store.com/public_html/app/template/ss4002/Block/news.twig");
}
}