Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
New errors page!
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayoshi-dev committed May 25, 2020
2 parents 1f43564 + ab4ef14 commit e6869ac
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/js/error.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../scss/error.scss';
5 changes: 5 additions & 0 deletions assets/scss/error.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
body{
.http-status{
font-size: 80px;
}
}
33 changes: 33 additions & 0 deletions templates/bundles/TwigBundle/Exception/error.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% extends 'base.html.twig' %}

{% block title %}Error {{ status_code }}{% endblock %}

{% block stylesheets %}
{{ encore_entry_link_tags('error') }}
{% endblock %}

{% block body %}
<div class="container-fluid">
<div class="row vh-100 d-flex align-items-center justify-content-center">
<div class="col-md-8">
<div class="row justify-content-center lm-logo">
<div class="text-center">
<img src="{{ asset('build/youngfood.svg') }}" alt="LOGO YoungFood" class="mx-auto">
</div>
</div>
<div class="row justify-content-center">
<h1 class="mb-4 http-status">{{ status_code }}</h1>
</div>
<div class="row justify-content-center">
<div class="text-center">
<h2 class="mb-4">Une erreur est survenue !</h2>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

{% block javascripts %}
{{ encore_entry_script_tags('error') }}
{% endblock %}
33 changes: 33 additions & 0 deletions templates/bundles/TwigBundle/Exception/error403.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% extends 'base.html.twig' %}

{% block title %}Error 403{% endblock %}

{% block stylesheets %}
{{ encore_entry_link_tags('error') }}
{% endblock %}

{% block body %}
<div class="container-fluid">
<div class="row vh-100 d-flex align-items-center justify-content-center">
<div class="col-md-8">
<div class="row justify-content-center lm-logo">
<div class="text-center">
<img src="{{ asset('build/youngfood.svg') }}" alt="LOGO YoungFood" class="mx-auto">
</div>
</div>
<div class="row justify-content-center">
<h1 class="mb-4 http-status"><span class="inner-green">4</span>0<span class="inner-green">3</span></h1>
</div>
<div class="row justify-content-center">
<div class="text-center">
<h2 class="mb-4">Vous n'avez pas les droits !</h2>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

{% block javascripts %}
{{ encore_entry_script_tags('error') }}
{% endblock %}
33 changes: 33 additions & 0 deletions templates/bundles/TwigBundle/Exception/error404.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% extends 'base.html.twig' %}

{% block title %}Error 404{% endblock %}

{% block stylesheets %}
{{ encore_entry_link_tags('error') }}
{% endblock %}

{% block body %}
<div class="container-fluid">
<div class="row vh-100 d-flex align-items-center justify-content-center">
<div class="col-md-8">
<div class="row justify-content-center lm-logo">
<div class="text-center">
<img src="{{ asset('build/youngfood.svg') }}" alt="LOGO YoungFood" class="mx-auto">
</div>
</div>
<div class="row justify-content-center">
<h1 class="mb-4 http-status"><span class="inner-green">4</span>0<span class="inner-green">4</span></h1>
</div>
<div class="row justify-content-center">
<div class="text-center">
<h2 class="mb-4">Une erreur est survenue !</h2>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

{% block javascripts %}
{{ encore_entry_script_tags('error') }}
{% endblock %}
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ Encore
// New Booking
.addEntry('newBooking', './assets/js/newBooking.js')

// Error Pages
.addEntry('error', './assets/js/error.js')

.enableVueLoader()

// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
Expand Down

0 comments on commit e6869ac

Please sign in to comment.