templates/pages/news/detail.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ entry.trans('title') }} | 最新情報 |【公式】「とこワク」は三重県のワーケーションポータルサイト{% endblock %}
  3. {% block meta_og_title %}{{ entry.trans('title') }} | 最新情報 |【公式】「とこワク」は三重県のワーケーションポータルサイト{% endblock %}
  4. {% block meta_twitter_title %}{{ entry.trans('title') }} | 最新情報 |【公式】「とこワク」は三重県のワーケーションポータルサイト{% endblock %}
  5. {% block meta_description %}{% if entry.description %}{{ entry.description }}{% else %}{{ parent() }}{% endif %}{% endblock %}
  6. {% block meta_og_description %}{% if entry.description %}{{ entry.description }}{% else %}{{ parent() }}{% endif %}{% endblock %}
  7. {% block meta_og_image %}
  8.   {% if entry.mainImg %}
  9.   <meta property="og:image" content="{{ absolute_url(path('news_image', {"filename": entry.mainImg})) }}">
  10.   <meta property="og:image:alt" content="{{ entry.title }}">
  11.   <meta property="og:image:width" content="{{ entry.mainImgWidth }}">
  12.   <meta property="og:image:height" content="{{ entry.mainImgHeight }}">
  13.   {% else %}
  14.   {{ parent() }}
  15.   {% endif %}
  16. {% endblock %}
  17. {% block body %}
  18. <main id="news">
  19.   <section class="guide">
  20.     <div class="guideContainer">
  21.       <div class="guideContainer__breadcrumbs">
  22.         <a href="/">{{'common.top' |trans|raw}}</a>
  23.         <span class="guideContainerBreadcrumbs__arrow"></span>
  24.         <a href="{{ path('news_index') }}">{{'news.newsPage.title' |trans|raw}}</a>
  25.         <span class="guideContainerBreadcrumbs__arrow"></span>
  26.         <div>{{ entry.trans('title') }}</div>
  27.       </div>
  28.     </div>
  29.   </section>
  30.   <section class="newDetail">
  31.     <div class="newDetailContainer">
  32.       <div class="newDetailContainer__dayTag">
  33.         <span>{{ entry.category.trans('name') }}</span>
  34.         <time>{{ entry.entryDate|date('Y.m.d') }}</time>
  35.       </div>
  36.       <h1>{{ entry.trans('title') }}</h1>
  37.       {% if entry.mainImg %}
  38.       <img src="{{ path('news_image', {"filename": entry.mainImg}) }}" alt="{{ entry.title }}">
  39.       {% endif %}
  40.       <div>{{ entry.trans('content') }}</div>
  41.       {# repeat feald loop #}
  42.       {% for child in entry.children %}
  43.       {% if child.headline %}
  44.       <h2>{{ child.trans('headline') }}</h2>
  45.       {% endif %}
  46.       {% if child.image %}
  47.       <img src="{{ path('news_image', {"filename": child.image}) }}" alt="{% if child.headline %}{{ child.headline }}{% else %}{{ entry.title }}{% endif %}">
  48.       {% endif %}
  49.       {% if child %}
  50.       <div>{{ child.trans('content') }}</div>
  51.       {% endif %}
  52.       {% if child.linkUrl %}
  53.         <p>
  54.           <a href="{{ child.linkUrl }}" target="_blank">
  55.             {% if child.trans('link_label') %}{{ child.trans('link_label') }}{% else %}{{ child.linkUrl }}{% endif %}
  56.           </a>
  57.         </p>
  58.       {% endif %}
  59.       {% if child.file %}
  60.         <p>
  61.           <a href="{{ path('news_file', {filename: child.file}) }}"{% if child.fileNewTab %} target="_blank"{% endif %}>
  62.             {% if child.trans('file_label') %}{{ child.trans('file_label') }}{% else %}{{ child.file }}{% endif %}
  63.           </a>
  64.         </p>
  65.       {% endif %}
  66.     {% endfor %}
  67.     </div>
  68.     <div class="buttonContainer">
  69.       <a href="{{ path('news_index') }}" class="buttonContainer__back">
  70.         <span></span>
  71.         {{'common.return' |trans|raw}}
  72.       </a>
  73.     </div>
  74.   </section>
  75. </main>
  76. {% endblock %}