Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styled error pages #91

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions application/app/Resources/TwigBundle/views/Exception/error.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<title></title>


<link rel="icon" href="images/favicon.png" />
</head>
<style>
body {
background-color: #005988;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: white;
}
.contentWrapper {
padding: 0 5%;
position: relative;
margin: 0;
border: 0;
outline: 0;
vertical-align: baseline;
background: transparent;
max-width: 450px;
top: 220px;

}
.errorCode {
font-size: 45px;
color: rgb(234, 234, 14);
}

.button {
color: white;
background-color: transparent;


transition: color .2s linear, border-color .2s linear;
font-size: 14px;
text-transform: uppercase;
text-decoration: none;
border: 2px solid white;
border-radius: 99px;
padding: 8px 30px 9px;
}

.buttonContainer {
margin-top: 45px;
#overflow: hidden;
}

.errorText {
font-size: 36px;
line-height: 46px;
}
.header {
font-size: 45px;
padding: 0 5%;
border-bottom-width: 3px;
border-bottom-style: solid;
}
a {
margin-right: 5px;
}
</style>
<body>
{% block header %}
<header><span class="header">{{ fom.server_name }} {{ fom.server_version }}</span>

</header>
{% endblock %}

<div class="contentWrapper">
{% block error %}
<span class="errorCode">{{ status_code }}</span>
<div class="errorText">
{% block error_text %} {{ status_text }} {% endblock %}

</div>
<hr>
{% endblock %}

{% block information %}
<span class="errorSubText">
You may want to head back to the Welcome page.
{% if fom.server_admin is defined %}
If you think something is broken, contact an Admin.
{% endif %}
</span>
{% endblock %}

{% block buttons %}
<div class="buttonContainer">
<a href=" {{ path('mapbender_core_welcome_list') }}" class="button">Go back </a>
{% if fom.server_admin is defined %}
<a href='mailto:{{ fom.server_admin }}?subject=I think something is broken in your application&body=Hi, %0D%0A I think this page should work/exist {{ app.request.uri }} but I got an {{ status_code }} error' class="button">Contact an Admin</a>
{% endif %}
</div>
{% endblock %}

</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% extends '@Twig/Exception/error.html.twig' %}
{% block error_text %} Oops, the page you're looking for does not exist. {% endblock %}