{% extends "base.html.twig" %}
{% block body %}
<!-- Start Frontpage Content -->
<p> </p>
{% if frontpage.header_article_enabled %}
<div class="jumbotron p-4 p-md-5 text-white rounded bg-dark">
<div class="row mb-2">
<div class="col-md-{% if header_article.image %}8{% else %}12{% endif %} px-0">
<h1 class="display-4 font-italic">{% if app.request.locale == 'nl' %}{{ header_article.title_nl }}{% else %}{{ header_article.title_en }}{% endif %}</h1>
<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>
<p class="lead mb-0"><a href="{% if frontpage.header_article_type == 'article' %}{{ path('article',{ 'id' : header_article.id, 'url' : header_article.url }) }}
{% elseif frontpage.header_article_type == 'glossary' %}{{ path('glossary',{ 'id' : header_article.id, 'url' : header_article.url }) }}
{% endif %}" class="text-white font-weight-bold">{{ 'Verder lezen'|trans }}...</a></p>
</div>
{% 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 %}
</div>
</div>
{% endif %}
<div class="row mb-2 mt-2">
<div class="col-md-3 mt-2">
<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">
<div class="col p-4 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-locations"><span class="feather-18" data-feather="map-pin"></span> {{ 'Locaties'|trans }}</strong>
<div class="front-item-title mb-0">{% if app.request.locale == 'nl' %}{{ highlight_location.name_nl }}{% else %}{{ highlight_location.name_en }}{% endif %}</div>
<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>
<a href="{% if frontpage.highlight_location_type == 'fossil' %}{{ path('locations_fossil',{ 'id' : highlight_location.id }) }}
{% elseif frontpage.highlight_location_type == 'geology' %}{{ path('locations_geology',{ 'id' : highlight_location.id }) }}
{% elseif frontpage.highlight_location_type == 'museum' %}{{ path('locations_museum',{ 'id' : highlight_location.id }) }}
{% elseif frontpage.highlight_location_type == 'society' %}{{ path('locations_society',{ 'id' : highlight_location.id }) }}
{% endif %}" class="stretched-link">{{ 'Locatie bekijken'|trans }}</a>
</div>
</div>
</div>
<div class="col-md-3 mt-2">
<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">
<div class="col p-4 d-flex flex-column position-static ">
<strong class="d-inline-block mb-2 text-information"><span class="feather-18" data-feather="book-open"></span> {{ 'Artikel'|trans }}</strong>
<div class="front-item-title mb-0">{% if app.request.locale == 'nl' %}{{ highlight_article.title_nl }}{% else %}{{ highlight_article.title_en }}{% endif %}</div>
<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>
<a href="{% if frontpage.highlight_article_type == 'article' %}{{ path('article',{ 'id' : highlight_article.id, 'url' : highlight_article.url }) }}
{% elseif frontpage.highlight_article_type == 'glossary' %}{{ path('glossary',{ 'id' : highlight_article.id, 'url' : highlight_article.url }) }}
{% endif %}" class="stretched-link">{{ 'Artikel lezen'|trans }}</a>
</div>
</div>
</div>
<div class="col-md-3 mt-2">
<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">
<div class="col p-4 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-community"><span class="feather-18" data-feather="message-circle"></span> {{ 'Community'|trans }}</strong>
<div class="mb-1 text-muted">{{ 'Door'|trans }}: <a href="{{ path('user_profile_public', {username: highlight_community.username}) }}">{{ highlight_community.username }}</a></div>
<p class="card-text mb-auto"><b>{{ highlight_community.post_subject }}</b></br>
{{ highlight_community.post_text|striptags|bbcode|striptags|slice(0,150) ~ '...' }}</p>
<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>
</div>
</div>
</div>
<div class="col-md-3 mt-2">
<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">
<div class="col p-4 d-flex flex-column position-static paleontica-mainitem">
<strong class="d-inline-block mb-2 text-fossildb"><span class="feather-18" data-feather="eye"></span> {{ 'Fossielen database'|trans }}</strong>
<div class="front-item-title mb-0">{{ highlight_fossildb.genus }} {{ highlight_fossildb.species }}</div>
<div class="mb-1 text-muted">{% if app.request.locale == 'nl' %}{{ highlight_fossildb.taxanomy.namenl }}{% else %}{{ highlight_fossildb.taxanomy.nameen }}{% endif %}</div>
<p class="card-text mb-auto">
{% for photo in highlight_fossildb.FossildbPhotos %}{% if photo.isprimary == '1' %}
{% set thumbnail = '/uploads/fossildb/' ~ photo.filename|slice(0, 2) ~ "/" ~ photo.filename %}
<img src="{{ thumbnail|imagine_filter('fossildb_thumb_small') }}" class="img-fluid img-responsive">
{% endif %}{% endfor %}</p>
<a href="{{ path('fossildb_item',{ 'id' : highlight_fossildb.id }) }}" class="stretched-link">{{ 'Fossiel bekijken'|trans }}</a>
</div>
</div>
</div>
</div>
<p> </p>
<div class="row flex-md-row h-md-250 position-relative">
<div class="col-md-9 position-static">
<h3>Laatste nieuws</h3>
{% set newsfeed = newsfeed_part1 %}
{% include 'frontpage_newfeed_items.html.twig' with newsfeed %}
{% if frontpage.event_enabled %}
<p></p>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">{{ frontpage.event_title }}</h1>
<p class="lead">{{ frontpage.event_text }}</p>
<p class="lead mb-0"><a href="{{ frontpage.event_url }}" class="text-dark font-weight-bold">{{ 'Ik wil meer weten'|trans }}...</a></p>
</div>
</div>
<p></p>
{% endif %}
{% set newsfeed = newsfeed_part2 %}
{% include 'frontpage_newfeed_items.html.twig' with newsfeed %}
<p></p>
<a href="#">Nieuwsarchief</a>
<!-- End Frontpage Content -->
</div>
{% include 'sidebar.html.twig' %}
</div>
{% endblock %}
{% block javascript %}
{% endblock %}