deblan.io-murph/templates/page/mesh/default.html.twig

85 lines
3.3 KiB
Twig
Raw Normal View History

2021-07-09 23:42:38 +02:00
{% extends 'base.html.twig' %}
{%- block meta_title -%}
{{- _page.title.value -}}
{% endblock %}
{%- block page_title -%}
{{- _page.title.value -}}
{% endblock %}
{% block page_subtitle %}
<p class="h3">
{{- _page.subTitle.value -}}
</p>
{% endblock %}
{% block body %}
2021-07-10 11:22:11 +02:00
<div class="col-12">
<div class="body">
<div class="body-content">
{{- _page.content.value|murph_url|file_attributes|markdown('post') -}}
</div>
</div>
</div>
2021-07-09 23:42:38 +02:00
2021-07-10 11:22:11 +02:00
<div class="row">
<div class="col-12 meshes">
<div class="row">
{% for mesh in pager %}
<div class="col-4 mesh-wrapper">
<div class="mesh">
<div class="mesh-preview">
2021-10-20 14:17:13 +02:00
<img src="{{ asset(mesh.preview)|imagine_filter('mesh_preview_filter') }}" alt="{{ mesh.label }}">
2021-07-10 11:22:11 +02:00
</div>
<h2 class="mesh-title">{{ mesh.label }}</h2>
<div class="mesh-description">
{{ mesh.description|murph_url|file_attributes|markdown('post') }}
2021-10-20 14:17:13 +02:00
{% for key, item in mesh.files %}
<div class="mesh-file">
<ul class="list--inline">
2021-10-20 14:32:34 +02:00
<li>
<span class="button small alt">
{{ item.name }}
</span>
2021-10-20 14:17:13 +02:00
</li>
<li>
<a class="button small mesh-viewer" data-modal href="{{ path('mesh_viewer', {stlMesh: mesh.id, key: key + 1}) }}">
Voir en 3D
</a>
</li>
<li>
<a class="button small" target="_blank" href="{{ path('mesh_download', {stlMesh: mesh.id, key: key + 1}) }}">
Télécharger
</a>
</li>
</ul>
</div>
{% endfor %}
2021-07-10 11:22:11 +02:00
</div>
</div>
2021-07-09 23:42:38 +02:00
</div>
2021-07-10 11:22:11 +02:00
{% endfor %}
2021-07-09 23:42:38 +02:00
</div>
2021-07-10 11:22:11 +02:00
</div>
2021-07-09 23:42:38 +02:00
</div>
{% if pager.getPaginationData.pageCount > 1 %}
<div class="col-12">
<div class="body">
<div class="pager align-right">
{% block pager %}
2021-11-22 10:49:09 +01:00
{{ include('module/_pager.html.twig', {
2021-07-09 23:42:38 +02:00
route: _node.routeName,
routeParams: {},
pages: pager.paginationData.endPage,
currentPage: pager.paginationData.current
}) }}
{% endblock %}
</div>
</div>
</div>
{% endif %}
{% endblock %}