templates/olympiads/iofs/view.html.twig line 1
{% extends 'layout/base.html.twig' %}
{% block body_class %}
{{ parent() }}
olympiad-page
{% endblock %}
{% block title %}
{{ title(item.caption) }}
{% endblock %}
{% block body %}
{% import "parts/pretty_date.html.twig" as pd %}
{% include "olympiads/iofs/presentation.html.twig" %}
<div class="olympiad iofs">
<div class="container iofs__inner">
<div class="iofs__content">
{% if is_granted("ROLE_ADMIN") %}
<a href="{{ path('admin_olympiad_olymp_view.ru',{id:item.id}) }}" class="btn btn-outline-primary">Карточка
олимпиады</a>
<hr>
{% endif %}
{% if news is defined and news %}
<section class="iofs__news">
<h2 class="section-title section-title_size_s olympiad__section-title">
<a
href="{{ path("olympiad_60_news") }}">{{ 'site.news'|trans }}</a></h2>
{{ include('news/featured_news_list.html.twig', {news:news, news_item_class:"iofs__new"}) }}
</section>
{% endif %}
{% if smi is defined and smi %}
<section class="iofs-smi">
<h2 class="section-title section-title_size_s olympiad__section-title"><a
href="{{ path("olymp_smi") }}">{{ 'site.smi'|trans }}</a></h2>
<div class="items">
{% for s in smi %}
<div class="item dark-background dark-shadow">
{% if s.link %}
<a target="_blank" href="{{ s.link }}">{{ s.caption }}</a>
{% else %}
<a href="{{ path('olymp_smi_item',{smi_id: s.id}) }}">{{ s.caption }}</a>
{% endif %}
</div>
{% endfor %}
</div>
</section>
{% endif %}
{% if media is defined and media %}
<section class="iofs-media">
<h2 class="section-title section-title_size_s olympiad__section-title"><a
href="{{ path("olympiad_gallery_60_list") }}">{{ 'site.media'|trans }}</a></h2>
<div class="f-carousel autoplay" id="myCarousel">
{% for f in media %}
{% if f.type.value == 'photo' %}
<div class="f-carousel__slide">
<a href="{{ vich_uploader_asset(f.file)|imagine_filter('full') }}"
data-fancybox="r-media">
<img class="img-thumbnail "
src="{{ vich_uploader_asset(f.file)|imagine_filter('carousel') }}">
</a>
</div>
{% elseif f.type.value == 'video' %}
<div class="f-carousel__slide">
<a href="{{ f.data.url|default }}"
data-fancybox="r-media"
{% if f.data.forceHTML5 is defined and f.data.forceHTML5 %}
data-type="html5video"
{% endif %}
>
<img class="img-thumbnail "
src="{{ vich_uploader_asset(f.file)|imagine_filter('carousel') }}">
</a>
</div>
{% elseif f.type.value == 'iframe' %}
<div class="f-carousel__slide">
<a href="{{ f.data.iframe|default }}"
data-type="iframe"
data-fancybox="r-media">
<img class="img-thumbnail "
src="{{ vich_uploader_asset(f.file)|imagine_filter('carousel') }}">
</a>
</div>
{% endif %}
{% endfor %}
</div>
</section>
{% endif %}
{# <section class="iofs__text text-block">
{{ item.description|raw }}
</section> #}
{# {% if materials is defined and materials %}
{% include "olympiads/iofs/material.html.twig" with {caption: 'olympiad.material.site.docs'|trans } %}
{% endif %} #}
{# {% if events is defined and events %}
<section class="iofs__events">
<h2 class="section-title section-title_size_s olympiad__section-title">{{ 'site.events'|trans }}</h2>
{{ include('events/object_events_list.html.twig' ,{items:events, event_item_class: "iofs__event"}) }}
</section>
{% endif %} #}
{# <a class="mobile-fixed-button iofs__mobile-register">{{ 'site.participate_button'|trans }}</a> #}
</div>
{% set important = config_value('important',app.request.locale) %}
{% if important %}
<div class="iofs__important">
{{- important|raw -}}
</div>
{% endif %}
{{ include('olympiads/iofs/stages.html.twig') }}
</div>
</div>
{% endblock %}