update and error handling

This commit is contained in:
root 2020-07-18 10:43:13 +00:00
parent fa6bc5f3f3
commit 1bb080f7f1
12 changed files with 203 additions and 30 deletions

View file

@ -1,3 +1,8 @@
<!--
Site développé par Matthieu Bessat - lefuturiste -
Portfolio: https://lefuturiste.fr
Github: https://github.com/lefuturiste
-->
<!DOCTYPE html>
<html>
<head>

26
views/error.twig Normal file
View file

@ -0,0 +1,26 @@
{% extends "./base.twig" %}
{% block title %}{{ title }}{% endblock %}
{% block head %}
<link rel="stylesheet" href="/assets/error.css" />
{% endblock %}
{% block content %}
<div class="error-container">
<div class="error">
<div class="error-icons">
{{ emoji }}
</div>
<hr>
<h1 class="error-title">{{ title }}</h1>
<h4 class="error-sub-title">{{ subTitle }}</h4>
<hr>
{% if details|length > 0 %}
<p>Pour les experts voici les détails :</p>
<div class="expert">
<pre>
{{ details }}
</pre>
</div>
{% endif %}
</div>
</div>
{% endblock %}

View file

@ -38,18 +38,25 @@
{% if data.gallery|length > 0 %}
<div class="media-mosaic mosaic-{{ data.gallery|length }}">
{% for media in data.gallery %}
<div class="media-container" onclick="openModal('{{ media.location }}')">
<div class="media" style="background-image: url({{ media.location }})"></div>
<div class="media-container" onclick="openModal('{{ media.location }}', {{ media.isVideo }})">
<div
class="media {% if media.isVideo %}media-video-bg{% endif %}"
{% if not media.isVideo %}style="background-image: url({{ media.location }})"{% endif %}></div>
{% if media.isVideo %}
<div class="media-overlay">
<svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="currentColor" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"></path>
</svg>
</div>
{% endif %}
</div>
{% endfor %}
{# <div class="media-container media-1-2">
<div class="media" style="background-image: url({{ data.gallery[2].location }})"></div>
<div class="media-overlay"><i class="fas fa-play-circle"></i></div>
</div> #}
</div>
<div class="media-modal-container" id="media-modal">
<div class="media-modal">
<img src="" id="media-modal-image" />
<div class="media-modal-content" id="media-modal-content">
</div>
<div class="media-close" onclick="closeModal()">
<svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="currentColor" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"></path>