templates/frontpage.html.twig line 1

Open in your IDE?
  1. {% extends "base.html.twig" %}
  2. {% block body %}
  3.         <!-- Start Frontpage Content -->
  4.         <p>&nbsp;</p>
  5.         {% if frontpage.header_article_enabled %}
  6.           <div class="jumbotron p-4 p-md-5 text-white rounded bg-dark">
  7.             <div class="row mb-2">
  8.             
  9.               <div class="col-md-{% if header_article.image %}8{% else %}12{% endif %} px-0">
  10.                 <h1 class="display-4 font-italic">{% if app.request.locale == 'nl' %}{{ header_article.title_nl }}{% else %}{{ header_article.title_en }}{% endif %}</h1>
  11.                 <p class="lead my-3">{% if app.request.locale == 'nl' %}{{ header_article.intro_nl|striptags|slice(0,250) ~ '...' }}{% else %}{{ header_article.intro_en|striptags|slice(0,250) ~ '...' }}{% endif %}</p>
  12.                 <p class="lead mb-0"><a href="{% if frontpage.header_article_type == 'article' %}{{ path('article',{ 'id' : header_article.id, 'url' : header_article.url }) }}
  13.                 {% elseif frontpage.header_article_type == 'glossary' %}{{ path('glossary',{ 'id' : header_article.id, 'url' : header_article.url }) }}
  14.                 {% endif %}" class="text-white font-weight-bold">{{ 'Verder lezen'|trans }}...</a></p>
  15.               </div>
  16.               {% if header_article.image %}<div class="col-md-4 px-0 text-right jumbotron-image"><img src="{{ header_article.image }}" class="img-fluid img-responsive rounded"></div>{% endif %}
  17.             </div>
  18.           </div>
  19.         {% endif %}
  20.         <div class="row mb-2 mt-2">
  21.           <div class="col-md-3 mt-2">
  22.             <div class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative h-100 front-item">
  23.               <div class="col p-4 d-flex flex-column position-static">
  24.                 <strong class="d-inline-block mb-2 text-locations"><span class="feather-18" data-feather="map-pin"></span> {{ 'Locaties'|trans }}</strong>
  25.                 <div class="front-item-title mb-0">{% if app.request.locale == 'nl' %}{{ highlight_location.name_nl }}{% else %}{{ highlight_location.name_en }}{% endif %}</div>
  26.                 <p class="card-text mb-auto">{% if app.request.locale == 'nl' %}{{ highlight_location.description_nl|striptags|slice(0,200) ~ '...' }}{% else %}{{ highlight_location.description_en|striptags|slice(0, 200) ~ '...' }}{% endif %}</p>
  27.                 <a href="{% if frontpage.highlight_location_type == 'fossil' %}{{ path('locations_fossil',{ 'id' : highlight_location.id }) }}
  28.                 {% elseif frontpage.highlight_location_type == 'geology' %}{{ path('locations_geology',{ 'id' : highlight_location.id }) }}
  29.                 {% elseif frontpage.highlight_location_type == 'museum' %}{{ path('locations_museum',{ 'id' : highlight_location.id }) }}
  30.                 {% elseif frontpage.highlight_location_type == 'society' %}{{ path('locations_society',{ 'id' : highlight_location.id }) }}
  31.                 {% endif %}" class="stretched-link">{{ 'Locatie bekijken'|trans }}</a>
  32.               </div>
  33.             </div>
  34.           </div>
  35.            <div class="col-md-3 mt-2">
  36.             <div class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative h-100 front-item">
  37.               <div class="col p-4 d-flex flex-column position-static ">
  38.                 <strong class="d-inline-block mb-2 text-information"><span class="feather-18" data-feather="book-open"></span> {{ 'Artikel'|trans }}</strong>
  39.                 <div class="front-item-title mb-0">{% if app.request.locale == 'nl' %}{{ highlight_article.title_nl }}{% else %}{{ highlight_article.title_en }}{% endif %}</div>
  40.                 <p class="mb-auto">{% if app.request.locale == 'nl' %}{{ highlight_article.description_nl|striptags|slice(0,200) ~ '...' }}{% else %}{{ highlight_article.description_en|striptags|slice(0, 250) }}{% endif %}</p>
  41.                 <a href="{% if frontpage.highlight_article_type == 'article' %}{{ path('article',{ 'id' : highlight_article.id, 'url' : highlight_article.url }) }}
  42.                 {% elseif frontpage.highlight_article_type == 'glossary' %}{{ path('glossary',{ 'id' : highlight_article.id, 'url' : highlight_article.url }) }}
  43.                 {% endif %}" class="stretched-link">{{ 'Artikel lezen'|trans }}</a>
  44.               </div>
  45.             </div>
  46.           </div>
  47.           <div class="col-md-3 mt-2">
  48.             <div class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative h-100 front-item">
  49.               <div class="col p-4 d-flex flex-column position-static">
  50.                 <strong class="d-inline-block mb-2 text-community"><span class="feather-18" data-feather="message-circle"></span> {{ 'Community'|trans }}</strong>
  51.                 <div class="mb-1 text-muted">{{ 'Door'|trans }}: <a href="{{ path('user_profile_public', {username: highlight_community.username}) }}">{{ highlight_community.username }}</a></div>
  52.                 <p class="card-text mb-auto"><b>{{ highlight_community.post_subject }}</b></br>
  53.                 {{ highlight_community.post_text|striptags|bbcode|striptags|slice(0,150) ~ '...' }}</p>
  54.                 <a href="{{ forum_uri }}/viewtopic.php?f={{ highlight_community.forum_id }}&p={{ highlight_community.post_id }}#p{{ highlight_community.post_id }}" class="stretched-link">{{ 'Forumpost lezen'|trans }}</a>
  55.               </div>
  56.             </div>
  57.           </div>
  58.           <div class="col-md-3 mt-2">
  59.             <div class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative h-100 front-item">
  60.               <div class="col p-4 d-flex flex-column position-static paleontica-mainitem">
  61.                 <strong class="d-inline-block mb-2 text-fossildb"><span class="feather-18" data-feather="eye"></span> {{ 'Fossielen database'|trans }}</strong>
  62.                 <div class="front-item-title mb-0">{{ highlight_fossildb.genus }} {{ highlight_fossildb.species }}</div>
  63.                 <div class="mb-1 text-muted">{% if app.request.locale == 'nl' %}{{ highlight_fossildb.taxanomy.namenl }}{% else %}{{ highlight_fossildb.taxanomy.nameen }}{% endif %}</div>
  64.                 <p class="card-text mb-auto">
  65.                 {% for photo in highlight_fossildb.FossildbPhotos %}{% if photo.isprimary == '1' %}
  66.                 {% set thumbnail = '/uploads/fossildb/' ~ photo.filename|slice(0, 2) ~ "/" ~ photo.filename %}
  67.                 <img src="{{ thumbnail|imagine_filter('fossildb_thumb_small') }}" class="img-fluid img-responsive">
  68.                 {% endif %}{% endfor %}</p>
  69.                 <a href="{{ path('fossildb_item',{ 'id' : highlight_fossildb.id }) }}" class="stretched-link">{{ 'Fossiel bekijken'|trans }}</a>
  70.               </div>
  71.             </div>
  72.           </div>
  73.         </div>
  74.         <p>&nbsp;</p>
  75.         <div class="row flex-md-row h-md-250 position-relative">
  76.           <div class="col-md-9 position-static">
  77.             <h3>Laatste nieuws</h3>
  78.             {% set newsfeed = newsfeed_part1 %}
  79.             {% include 'frontpage_newfeed_items.html.twig' with newsfeed %}
  80.             {% if frontpage.event_enabled %}
  81.             <p></p>
  82.             <div class="jumbotron jumbotron-fluid">
  83.               <div class="container">
  84.                 <h1 class="display-4">{{ frontpage.event_title }}</h1>
  85.                 <p class="lead">{{ frontpage.event_text }}</p>
  86.                 <p class="lead mb-0"><a href="{{ frontpage.event_url }}" class="text-dark font-weight-bold">{{ 'Ik wil meer weten'|trans }}...</a></p>
  87.               </div>
  88.             </div>
  89.             <p></p>
  90.             {% endif %}
  91.             {% set newsfeed = newsfeed_part2 %}
  92.             {% include 'frontpage_newfeed_items.html.twig' with newsfeed %}
  93.             <p></p>
  94.             <a href="#">Nieuwsarchief</a>
  95.           <!-- End Frontpage Content -->
  96.           </div>
  97.           {% include 'sidebar.html.twig' %}
  98.         </div>
  99. {% endblock %}
  100. {% block javascript %}
  101. {% endblock %}