add new demo symfony files
This commit is contained in:
30
app/templates/bundles/TwigBundle/Exception/error.html.twig
Normal file
30
app/templates/bundles/TwigBundle/Exception/error.html.twig
Normal file
@@ -0,0 +1,30 @@
|
||||
{#
|
||||
This template is used to render any error different from 403, 404 and 500.
|
||||
|
||||
This is the simplest way to customize error pages in Symfony applications.
|
||||
In case you need it, you can also hook into the internal exception handling
|
||||
made by Symfony. This allows you to perform advanced tasks and even recover
|
||||
your application from some errors.
|
||||
See https://symfony.com/doc/current/controller/error_pages.html
|
||||
#}
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body_id 'error' %}
|
||||
|
||||
{% block main %}
|
||||
<h1 class="text-danger">{{ 'http_error.name'|trans({ '%status_code%': status_code }) }}</h1>
|
||||
|
||||
<p class="lead">
|
||||
{{ 'http_error.description'|trans({ '%status_code%': status_code }) }}
|
||||
</p>
|
||||
<p>
|
||||
{{ 'http_error.suggestion'|trans({ '%url%': path('blog_index') })|raw }}
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{{ parent() }}
|
||||
|
||||
{{ show_source_code(_self) }}
|
||||
{% endblock %}
|
@@ -0,0 +1,30 @@
|
||||
{#
|
||||
This template is used to render errors of type HTTP 403 (Forbidden)
|
||||
|
||||
This is the simplest way to customize error pages in Symfony applications.
|
||||
In case you need it, you can also hook into the internal exception handling
|
||||
made by Symfony. This allows you to perform advanced tasks and even recover
|
||||
your application from some errors.
|
||||
See https://symfony.com/doc/current/controller/error_pages.html
|
||||
#}
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body_id 'error' %}
|
||||
|
||||
{% block main %}
|
||||
<h1 class="text-danger"><i class="fa fa-unlock-alt" aria-hidden="true"></i> {{ 'http_error.name'|trans({ '%status_code%': 403 }) }}</h1>
|
||||
|
||||
<p class="lead">
|
||||
{{ 'http_error_403.description'|trans }}
|
||||
</p>
|
||||
<p>
|
||||
{{ 'http_error_403.suggestion'|trans }}
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{{ parent() }}
|
||||
|
||||
{{ show_source_code(_self) }}
|
||||
{% endblock %}
|
@@ -0,0 +1,30 @@
|
||||
{#
|
||||
This template is used to render errors of type HTTP 404 (Not Found)
|
||||
|
||||
This is the simplest way to customize error pages in Symfony applications.
|
||||
In case you need it, you can also hook into the internal exception handling
|
||||
made by Symfony. This allows you to perform advanced tasks and even recover
|
||||
your application from some errors.
|
||||
See https://symfony.com/doc/current/controller/error_pages.html
|
||||
#}
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body_id 'error' %}
|
||||
|
||||
{% block main %}
|
||||
<h1 class="text-danger">{{ 'http_error.name'|trans({ '%status_code%': 404 }) }}</h1>
|
||||
|
||||
<p class="lead">
|
||||
{{ 'http_error_404.description'|trans }}
|
||||
</p>
|
||||
<p>
|
||||
{{ 'http_error_404.suggestion'|trans({ '%url%': path('blog_index') })|raw }}
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{{ parent() }}
|
||||
|
||||
{{ show_source_code(_self) }}
|
||||
{% endblock %}
|
@@ -0,0 +1,35 @@
|
||||
{#
|
||||
This template is used to render errors of type HTTP 500 (Internal Server Error)
|
||||
|
||||
This is the simplest way to customize error pages in Symfony applications.
|
||||
In case you need it, you can also hook into the internal exception handling
|
||||
made by Symfony. This allows you to perform advanced tasks and even recover
|
||||
your application from some errors.
|
||||
See https://symfony.com/doc/current/controller/error_pages.html
|
||||
#}
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
<link rel="stylesheet" href="/build/css/app.4aa95248.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block body_id 'error' %}
|
||||
|
||||
{% block main %}
|
||||
<h1 class="text-danger">{{ 'http_error.name'|trans({ '%status_code%': 500 }) }}</h1>
|
||||
|
||||
<p class="lead">
|
||||
{{ 'http_error_500.description'|trans }}
|
||||
</p>
|
||||
<p>
|
||||
{{ 'http_error_500.suggestion'|trans({ '%url%': path('blog_index') })|raw }}
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{{ parent() }}
|
||||
|
||||
{{ show_source_code(_self) }}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user