Browse Source

update meshes page

develop
Simon Vieille 2 weeks ago
parent
commit
f69a2c978e
  1. 8
      assets/css/app.scss
  2. 2
      src/Entity/Page/MeshPage.php
  3. 2
      templates/page/links/default.html.twig
  4. 62
      templates/page/mesh/default.html.twig

8
assets/css/app.scss

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

2
src/Entity/Page/MeshPage.php

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

2
templates/page/links/default.html.twig

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

62
templates/page/mesh/default.html.twig

@ -15,35 +15,47 @@
{% endblock %}
{% block body %}
<div class="row">
{% for mesh in pager %}
<div class="col-3 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') }}
<div class="col-12">
<div class="body">
<div class="body-content">
{{- _page.content.value|murph_url|file_attributes|markdown('post') -}}
</div>
</div>
</div>
<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
<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>
</li>
</ul>
</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>
{% endfor %}
</div>
</div>
<div class="modal" id="mesh-viewer">

Loading…
Cancel
Save