nineskeletor/templates/Home/page.html.twig
afornerot 09bd5e9e65
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
maj ninegate
2023-01-10 11:47:07 +01:00

51 lines
2.2 KiB
Twig

{% extends "base.html.twig" %}
{% block body %}
{% if app.user %}
{% set username = app.user.username %}
{% else %}
{% set username = "" %}
{% endif %}
{% for bookmark in bookmarks %}
{% endfor %}
{% for itemcategory in itemcategorys %}
{% if itemcategorys|length > 1 %} <h2 {% if not loop.first %} class="mt-3" {% endif %}>{{itemcategory.label}}</h2> {% endif %}
<div class="items-list">
{% for item in items %}
{% if item.itemcategory==itemcategory %}
<div class="item item-large" style="background-color: {{ item.color ? item.color : "var(--colorbgbodydark)" }};">
<div class="item-container">
<div class="item-content">
<a class="item-link" href="{{ item.url|replace({'#login#': username}) }}" target="{{ item.target }}">
{% if item.icon %}
<img height="35" src="{{ path('app_minio_image',{file:item.icon.label}) }}">
{% else %}
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_pin.png"}) }}">
{% endif %}
<div class="item-title">
<h3 >{{ item.title }}</h3>
<div class="item-subtitle">{{ item.subtitle|nl2br }}</div>
</div>
</a>
<div class="item-action">
{% if item.content %}
<a style="display:none"><i class="item-info fas fa-circle-info"></i></a>
{% endif %}
</div>
</div>
<div class="item-description hide">{{ item.content|raw }}</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
{% endblock %}