update meshes page

This commit is contained in:
Simon Vieille 2021-07-10 11:22:11 +02:00
parent fcedd2de7c
commit f69a2c978e
4 changed files with 46 additions and 34 deletions

View file

@ -769,6 +769,10 @@ $links: (
} }
} }
.meshes {
padding: 0 20px;
}
.mesh { .mesh {
border: 1px solid $color-hr-border; border: 1px solid $color-hr-border;
border-radius: 10px; border-radius: 10px;
@ -803,10 +807,6 @@ $links: (
.quick-image img { .quick-image img {
height: 200px; height: 200px;
} }
.mesh-wrapper {
width: 100%;
}
} }
@media screen and (max-width: 719px) { @media screen and (max-width: 719px) {

View file

@ -7,6 +7,6 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* @ORM\Entity * @ORM\Entity
*/ */
class MeshPage extends TitledPage class MeshPage extends SimplePage
{ {
} }

View file

@ -24,7 +24,7 @@
<div class="col-12"> <div class="col-12">
<div class="body"> <div class="body">
<div class="body-content"> <div class="body-content">
{{- _page.content.value|murph_url|markdown('post') -}} {{- _page.content.value|murph_url|file_attributes|markdown('post') -}}
<p> <p>
<a target="_blank" title="RSS" href="{{ safe_path(_node.routeName ~ '_rss') }}"> <a target="_blank" title="RSS" href="{{ safe_path(_node.routeName ~ '_rss') }}">

View file

@ -15,35 +15,47 @@
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<div class="row"> <div class="col-12">
{% for mesh in pager %} <div class="body">
<div class="col-3 mesh-wrapper"> <div class="body-content">
<div class="mesh"> {{- _page.content.value|murph_url|file_attributes|markdown('post') -}}
<div class="mesh-preview">
<a data-modal href="{{ path('mesh_viewer', {stlMesh: mesh.id}) }}">
<img src="{{ asset(mesh.preview)|imagine_filter('mesh_preview_filter') }}" alt="{{ mesh.label }}">
</a>
</div>
<h2 class="mesh-title">{{ mesh.label }}</h2>
<div class="mesh-description">
{{ mesh.description|murph_url|file_attributes|markdown('post') }}
<ul class="list--inline">
<li>
<a class="button small mesh-viewer" data-modal href="{{ path('mesh_viewer', {stlMesh: mesh.id}) }}">
Visualiser en 3D
</a>
</li>
<li>
<a class="button small" target="_blank" href="{{ path('mesh_download', {stlMesh: mesh.id}) }}">
Télécharger
</a>
</li>
</ul>
</div>
</div>
</div> </div>
{% endfor %} </div>
</div>
<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">
<a data-modal href="{{ path('mesh_viewer', {stlMesh: mesh.id}) }}">
<img src="{{ asset(mesh.preview)|imagine_filter('mesh_preview_filter') }}" alt="{{ mesh.label }}">
</a>
</div>
<h2 class="mesh-title">{{ mesh.label }}</h2>
<div class="mesh-description">
{{ mesh.description|murph_url|file_attributes|markdown('post') }}
<ul class="list--inline">
<li>
<a class="button small mesh-viewer" data-modal href="{{ path('mesh_viewer', {stlMesh: mesh.id}) }}">
Visualiser en 3D
</a>
</li>
<li>
<a class="button small" target="_blank" href="{{ path('mesh_download', {stlMesh: mesh.id}) }}">
Télécharger
</a>
</li>
</ul>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div> </div>
<div class="modal" id="mesh-viewer"> <div class="modal" id="mesh-viewer">