{% extends "@templates/"~template~"/view/base.html.twig" %}

{% block meta %}{{ getMeta(news)|raw }}{% endblock %}

{% block stylesheets %}
    {{ parent() }}
{% endblock %}

{% block javascript %}
    {{ parent() }}
    <script>
        var news_id = {{ news.id }};
    </script>
    <script src="{{ asset('media/Public/js/comment.js') }}"></script>
{% endblock %}

{% block breadcrumbs %}
    <section class="breadcrumbSection">
        <div class="grid-container">
            <div class="grid-x grid-padding-x">
                <div class="cell">
                    {{ wo_render_breadcrumbs() }}
                </div>
            </div>
        </div>
    </section>
{% endblock %}

{% block content %}
    <section class="article newsArticle blog-content">
        <div class="grid-container">
            <div class="grid-x grid-margin-x">
                <div class="cell">
                    <h1>{{ news.title }}</h1>
                </div>
                <div class="cell">
                    <div class="categories">
                        <span><small>Kategorie:</small></span>
                        {% for category in news.categories %}
                            <a href="{{ url('wi_front_blog_by_category_index', {'id': category.id, 'slug':slugify(category.name)}) }}">{{ category.name }}</a>,
                        {% endfor %}
                    </div>
                    <div class="categories">
                        <span><small>Tagi:</small></span>
                        {% for category in news.tags %}
                            <a href="{{ url('wi_front_blog_by_category_index', {'id': category.id, 'slug':slugify(category.name)}) }}">{{ category.name }}</a>,
                        {% endfor %}
                    </div>
                </div>
            </div>
            <div class="grid-x grid-margin-x">
                <div class="cell">
                    <div style="margin: 30px 0 20px 0; ">
                        <img src="{{ asset(news.image) }}">
                    </div>
                    <article class="fullContent">{{ news.content|raw }}</article>
                </div>
            </div>

        </div>
    </section>
{% endblock %}

{% block footer %}
    <div style="margin-bottom: 70px"></div>
    {{ parent() }}
{% endblock %}
