-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMPROVE] UI of page not found (#13757)
- Loading branch information
1 parent
727170e
commit 6403849
Showing
6 changed files
with
403 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
<template name="pageNotFound"> | ||
<h1>{{_ "Error_404"}}</h1> | ||
<h3>{{_ "Oops_page_not_found"}}</h3> | ||
<p>{{_ "Sorry_page_you_requested_does_not_exists_or_was_deleted"}}</p> | ||
<section class = "page-not-found-container content-background-color"> | ||
<span class = "error-404">404</span> | ||
<span class = "page-not-found-message">{{_ "Oops_page_not_found"}}</span> | ||
<span class = "page-not-found-description">{{_ "Sorry_page_you_requested_does_not_exists_or_was_deleted"}}</span> | ||
<button class = "page-not-found-button page-not-found-button-previous rc-button rc-button--primary">{{_ "Return_to_previous_page"}}</button> | ||
<button class = "page-not-found-button page-not-found-button-home rc-button rc-button--primary">{{_ "Return_to_home"}}</button> | ||
</section> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Template } from 'meteor/templating'; | ||
import { FlowRouter } from 'meteor/kadira:flow-router'; | ||
|
||
import './pageNotFound.html'; | ||
|
||
Template.pageNotFound.onRendered(function() { | ||
const parent = document.querySelector('.page-loading'); | ||
const child = document.querySelector('.loading-animation'); | ||
parent.removeChild(child); | ||
}); | ||
|
||
Template.pageNotFound.events({ | ||
'click .page-not-found-button-home'(e) { | ||
e.preventDefault(); | ||
FlowRouter.go('home'); | ||
}, | ||
|
||
'click .page-not-found-button-previous'(e) { | ||
e.preventDefault(); | ||
window.history.back(); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.page-not-found-container { | ||
width: 100%; | ||
height: 100%; | ||
padding: 10%; | ||
|
||
text-align: center; | ||
|
||
color: white; | ||
background-image: url("/images/404.svg"); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
background-size: cover; | ||
|
||
.error-404 { | ||
display: block; | ||
|
||
padding: 10px; | ||
|
||
font-size: 4em; | ||
font-weight: bold; | ||
} | ||
|
||
.page-not-found-message { | ||
display: block; | ||
|
||
padding: 10px; | ||
|
||
font-size: 2em; | ||
font-weight: bold; | ||
} | ||
|
||
.page-not-found-description { | ||
display: block; | ||
|
||
padding: 10px; | ||
|
||
font-size: 1em; | ||
} | ||
|
||
.page-not-found-button { | ||
display: inline-block; | ||
|
||
margin: 20px 10px 0; | ||
padding: 8px 16px; | ||
|
||
font-size: 1em; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.