143 lines
3.7 KiB
Twig
143 lines
3.7 KiB
Twig
<!DOCTYPE html>
|
|
<!--
|
|
_==/ i i \==_
|
|
/XX/ |\___/| \XX\
|
|
/XXXX\ |XXXXX| /XXXX\
|
|
|XXXXXX\_ _XXXXXXX_ _/XXXXXX|
|
|
XXXXXXXXXXXxxxxxxxXXXXXXXXXXXxxxxxxxXXXXXXXXXXX
|
|
|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|
|
|
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|
|
|
XXXXXX/^^^^"\XXXXXXXXXXXXXXXXXXXXX/^^^^^\XXXXXX
|
|
|XXX| \XXX/^^\XXXXX/^^\XXX/ |XXX|
|
|
\XX\ \X/ \XXX/ \X/ /XX/
|
|
"\ " \X/ " /"
|
|
-->
|
|
{% apply spaceless %}
|
|
<html lang="fr">
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta charset="UTF-8" />
|
|
<style>
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
body {
|
|
background-size: cover;
|
|
background-color: #000;
|
|
color: #fff;
|
|
font-family: Verdana;
|
|
font-weight: bold;
|
|
text-shadow: 1px 1px 2px #333;
|
|
}
|
|
|
|
#code {
|
|
font-size: 60px;
|
|
}
|
|
|
|
#message {
|
|
font-size: 40px;
|
|
padding-top: 20px;
|
|
}
|
|
|
|
#background-1 {
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100vh;
|
|
-webkit-filter: blur(10px);
|
|
-o-filter: blur(10px);
|
|
-ms-filter: blur(10px);
|
|
filter: blur(10px);
|
|
background-size: cover;
|
|
background-position: center center;
|
|
}
|
|
|
|
#background-2 {
|
|
text-align: center;
|
|
width: 100%;
|
|
position: absolute;
|
|
}
|
|
|
|
#background-2 img {
|
|
height: 100vh;
|
|
}
|
|
|
|
|
|
#content {
|
|
position: absolute;
|
|
padding: 30px;
|
|
}
|
|
|
|
a {
|
|
margin-top: 40px;
|
|
padding: 20px;
|
|
font-size: 20px;
|
|
border: 1px solid #fff;
|
|
color: #fff;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
}
|
|
|
|
#giphy-logo {
|
|
width: 200px;
|
|
height: 42px;
|
|
background: url({{ asset('build/images/giphy-logo.png') }});
|
|
position: absolute;
|
|
bottom: 10px;
|
|
right: 10px;
|
|
}
|
|
</style>
|
|
<title>Erreur {% block code %}{% endblock %}</title>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="background-1"></div>
|
|
<!-- <div id="background-2"><img src="{{ asset('build/images/blank.png') }}"></div> -->
|
|
|
|
<div id="content">
|
|
<div id="code">
|
|
Erreur {{ block('code') }}
|
|
</div>
|
|
|
|
<div id="message">
|
|
{% block error %}{% endblock %}
|
|
|
|
<br><a href="/">Aller sur le blog</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="giphy-logo"></div>
|
|
|
|
<script>
|
|
const giphy = {
|
|
baseURL: 'https://api.giphy.com/v1/gifs/',
|
|
apiKey: '{{ setting('giphy_api_key') }}',
|
|
tag: '{% block tag %}error{% endblock %}',
|
|
type: 'random',
|
|
rating: 'pg-13'
|
|
};
|
|
|
|
const background1 = document.querySelector('#background-1');
|
|
// const background2 = document.querySelector('#background-2 img');
|
|
const giphyURL = encodeURI(giphy.baseURL + giphy.type + '?api_key=' + giphy.apiKey + '&tag=' + giphy.tag + '&rating=' + giphy.rating);
|
|
const httpRequest = new XMLHttpRequest();
|
|
|
|
httpRequest.onreadystatechange = function(data) {
|
|
if (httpRequest.readyState === 4 && httpRequest.status === 200) {
|
|
const json = JSON.parse(httpRequest.response);
|
|
const url = json.data.image_original_url;
|
|
background1.style.backgroundImage = 'url(' + url + ')';
|
|
// background2.src = url;
|
|
}
|
|
};
|
|
|
|
httpRequest.open('GET', giphyURL);
|
|
httpRequest.send();
|
|
</script>
|
|
</body>
|
|
</html>
|
|
{% endapply %}
|