Skip to content

[NAE-1950] Create Error Pages 404, 500, 502, etc #239

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

Open
wants to merge 2 commits into
base: release/6.4.0
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
90 changes: 90 additions & 0 deletions projects/netgrif-components/src/assets/error-pages/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page not found</title>
<style>
body, html {
height: 100%;
width: 100%;
margin: 0;
}
.image-left {
height: 100%;
width: 100%;
background-image: url(background_left.svg);
background-repeat: no-repeat;
background-position-x: left;
background-position-y: top;
}
.image-right {
height: 100%;
width: 100%;
background-image: url(background_right.svg);
background-repeat: no-repeat;
background-position-x: right;
background-position-y: bottom;
}
.page-card {
padding: 24px;
border-radius: 12px;
opacity: 80%;
background-color: rgba(0,0,0,.12);
text-align: center;
box-shadow: 0 4px 2px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 2px 4px 0 rgba(0,0,0,.12);
}
.parent {
display: flex;
flex: 120%;
align-items: center;
justify-content: center;
height: 100%;
}
.show-normal {
display: flex;
flex-direction: row;
height: 100%;
width: 100%
}
.link-button {
display: inline-block;
text-decoration: none;
padding: 0.5rem;
border: 2px solid #157eff;
border-radius: 6px;
}
.show-mobile {
display: none;
}

@media screen and (max-width: 600px) {
.show-normal {
display: none;
}
.show-mobile {
display: flex;
}
}
</style>
</head>
<body>
<div class="show-normal">
<div class="image-left"></div>
<div class="parent">
<div class="page-card">
<h1>404</h1>
<h2>Sorry, that link is missing!</h2>
<a class="link-button" href="/home">Go to the homepage</a>
</div>
</div>
<div class="image-right"></div>
</div>
<div class="parent show-mobile">
<div class="page-card">
<h1>404</h1>
<h2>Sorry, that link is missing!</h2>
<a class="link-button" href="/home">Go to the homepage</a>
</div>
</div>
</body>
</html>
90 changes: 90 additions & 0 deletions projects/netgrif-components/src/assets/error-pages/500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Something went wrong</title>
<style>
body, html {
height: 100%;
width: 100%;
margin: 0;
}
.image-left {
height: 100%;
width: 100%;
background-image: url(background_left.svg);
background-repeat: no-repeat;
background-position-x: left;
background-position-y: top;
}
.image-right {
height: 100%;
width: 100%;
background-image: url(background_right.svg);
background-repeat: no-repeat;
background-position-x: right;
background-position-y: bottom;
}
.page-card {
padding: 24px;
border-radius: 12px;
opacity: 80%;
background-color: rgba(0,0,0,.12);
text-align: center;
box-shadow: 0 4px 2px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 2px 4px 0 rgba(0,0,0,.12);
}
.parent {
display: flex;
flex: 120%;
align-items: center;
justify-content: center;
height: 100%;
}
.show-normal {
display: flex;
flex-direction: row;
height: 100%;
width: 100%
}
.link-button {
display: inline-block;
text-decoration: none;
padding: 0.5rem;
border: 2px solid #157eff;
border-radius: 6px;
}
.show-mobile {
display: none;
}

@media screen and (max-width: 600px) {
.show-normal {
display: none;
}
.show-mobile {
display: flex;
}
}
</style>
</head>
<body>
<div class="show-normal">
<div class="image-left"></div>
<div class="parent">
<div class="page-card">
<h1>500</h1>
<h2>Something went wrong!</h2>
<a class="link-button" href="/home">Go to the homepage</a>
</div>
</div>
<div class="image-right"></div>
</div>
<div class="parent show-mobile">
<div class="page-card">
<h1>500</h1>
<h2>Something went wrong!</h2>
<a class="link-button" href="/home">Go to the homepage</a>
</div>
</div>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.