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

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}
  3. お知らせ|相模原市、厚木市の注文住宅・分譲住宅のアオイ建設株式会社
  4. {% endblock %}
  5. {% block meta_og_title %}
  6. お知らせ|相模原市、厚木市の注文住宅・分譲住宅のアオイ建設株式会社
  7. {% endblock %}
  8. {% block meta_twitter_title %}
  9. お知らせ|相模原市、厚木市の注文住宅・分譲住宅のアオイ建設株式会社
  10. {% endblock %}
  11. {% block meta_description %}
  12. {{ parent() }}
  13. アオイ建設のお知らせです。相模原市・厚木市・大和市・町田市を中心にデザイン性の高い分譲住宅、注文住宅をご検討中の方や、不動産、土地からお探しの方、建て替え・新築一戸建てなどを検討中の方に役立つ情報をお届けします。
  14. {% endblock %}
  15. {% block meta_og_description %}
  16. {{ parent() }}
  17. アオイ建設のお知らせです。相模原市・厚木市・大和市・町田市を中心にデザイン性の高い分譲住宅、注文住宅をご検討中の方や、不動産、土地からお探しの方、建て替え・新築一戸建てなどを検討中の方に役立つ情報をお届けします。
  18. {% endblock %}
  19. {% block extraHeader %}
  20. <link rel="canonical" content="{{ absolute_url(path('news_index')) }}">
  21. {% endblock %}
  22. {% block body %}
  23. <main id="news">
  24.   <div class="breadcrumbs">
  25.     <div class="breadcrumbsContainer">
  26.       <a href="/">TOP</a>
  27.       <span></span>
  28.       <div>お知らせ</div>
  29.     </div>
  30.   </div>
  31.   <div class="pageTitle">
  32.     <h1>NEWS</h1>
  33.     <span>お知らせ</span>
  34.   </div>
  35. <section class="categoryWrapper">
  36.   <div class="category">
  37.     <a href="{{ path('news_index') }}" class="{% if not current_category %}active{% endif %}">
  38.       ALL
  39.     </a>
  40.     {% for category in categories %}
  41.     <a href="{{ path('news_index') }}?category={{ category[0].id }}" class="{% if current_category == category[0].id %}active{% endif %}">
  42.       {{ category[0].name }} ({{ category.entry_count }})
  43.     </a>
  44.     {% endfor %}
  45.   </div>
  46. </section>
  47.     <section class="newsList">
  48.         {% for news in data %}
  49.           {% if news.linkUrl %}
  50.         <a href="{{ news.linkUrl }}"{% if news.linkNewtab %} target="_blank"{% endif %}>
  51.           {% else %}
  52.         <a href="{{ path('news_detail', {"id": news.id}) }}">
  53.           {% endif %}
  54.           {# thumbnail #}
  55.           {# {% if news.hasThumbnailImage %} #}
  56.             {# <img src="{{ path("news_image", {"filename": news.getThumbnailRemote}) }}" alt="{{ news.title }}"> #}
  57.           {# {% else %} #}
  58.             {# <img src="{{ asset('images/no-image.jpg') }}" alt="{{ news.title }}"> #}
  59.           {# {% endif %} #}
  60.           <div class="news__timeCategory">
  61.             <div class="news__timeCategoryWrapper">
  62.                <time>
  63.               {{ news.entryDate|date('Y.m.d') }}
  64.             </time>
  65.             <span>
  66.               {{ news.category.name }}
  67.             </span>
  68.             </div>  
  69.           
  70.             {% if news.isNew %}
  71.               <span class="new_tag">NEW</span>
  72.             {% endif %}
  73.             {# <p>
  74.               {{ news.content|striptags }}
  75.             </p> #}
  76.           </div>
  77.           <h3>
  78.             {{ news.title }}
  79.           </h3>
  80.         </a>
  81.         {% endfor %}
  82.     </section>
  83.     {% include "components/_pagination.html.twig" with [paginate] %}
  84.   </main>
  85. {% endblock %}