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

Commit

Permalink
added error page
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Feb 14, 2015
1 parent 7d37e47 commit f572957
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 48 deletions.
2 changes: 1 addition & 1 deletion assets/css/uno.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/uno.css.map

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions assets/js/src/__init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$(document).ready ->

window.Uno = Uno =
version: '1.1.24'
version: '1.2'

cover:
width: -> $(".panel-cover").width()
Expand All @@ -23,7 +23,6 @@ $(document).ready ->
if className is "" then 'error' else className

readTime: do ->

container = $('.content-wrapper')
readingTime = $(".post-reading-time")
isPostPage = container.length > 0 and readingTime.length > 0
Expand All @@ -50,7 +49,10 @@ $(document).ready ->
DateInDays '.post-meta > time', ->
container.readingTime readingTimeTarget: ".post-reading-time"

$("body").removeClass "no-js"
$('body').removeClass "no-js"
context = document.body.dataset['page'] ?= Uno.context()

Uno.cover.collapsed() if context is 'post'
$('#panic-button').click ->
s = document.createElement('script');
s.setAttribute('src','https://nthitz.github.io/turndownforwhatjs/tdfw.js');
document.body.appendChild(s);
6 changes: 3 additions & 3 deletions assets/js/uno.js

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions assets/scss/components/_media-queries.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@
max-width: 600px;
margin: 0 auto;
}
.panel-cover__divider--secondary {
display: none;
}
.panel-cover {
width: 100%;
height: 100%;
Expand Down Expand Up @@ -164,4 +161,16 @@
display: block;
margin-bottom: .4em;
}

.panel-cover__divider {
margin: 15px auto;
}

.mayday {
width: 100%;
> h1 {
font-size: 20px;
line-height: 25px;
}
}
}
41 changes: 23 additions & 18 deletions assets/scss/components/_page-error.scss
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
body[data-page="error"] {
background-image: url(/assets/img/cover.jpg);
background-size: cover;
width: 100%;
height: 100%;
body[data-page='error'] {
font-size: 16px;
line-height: 25px;
font-weight: normal;
line-height: 25px;
width: 100%;
height: 100%;
background-image: url(/assets/img/cover.jpg);
background-size: cover;
}

.mayday {
font-size: 34px;
color: white;
animation: flicker 2s ease infinite;
padding: 0 21rem;
margin: 9% auto 50px auto;
width: 500px;
margin: 150px auto 20px;
> h1 {
font-size: 24px;
color: $gray-lightest;
text-shadow: 0 1px 1px rgba(0,0,0,.4);
line-height: 35px;
}

&.options {
margin-top: 25px;
}
}

.astro-wrap {
position: relative;
width: 175px;
height: 283px;
margin: 0 auto;
position: relative;
margin: -7px auto;
}

.astronaut {
background: url(/assets/img/astronaut.png);
width: 175px;
height: 283px;
position: absolute;
top: 0;
left: 0;
width: 175px;
height: 283px;
transform: translate(0, 50px);
animation: move 10s infinite;
background: url(/assets/img/astronaut.png);
}
2 changes: 1 addition & 1 deletion assets/scss/components/_panels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
.panel-cover__description {
margin: 0 30px;
font-size: 14px;
font-size: 17px;
}
.panel-cover__divider {
width: 50%;
Expand Down
11 changes: 0 additions & 11 deletions assets/scss/modules/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,3 @@ hr {
margin: 2.2em 0 2.1em 0;
border-top: 1px solid $gray-light;
}
// ------------------------------
// MISC STYLES / HELPERS
// ------------------------------

.hidden {
display: none !important;
}
space-medium {
display: block;
height: 100px;
}
4 changes: 4 additions & 0 deletions assets/scss/modules/_helpers.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.text-center {
text-align: center;
}

.hidden {
display: none !important;
}
23 changes: 18 additions & 5 deletions error.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

{{! Meta }}
<title>Page not Found - {{@blog.title}}</title>
<title>Houston, we have a problem - {{@blog.title}}</title>

<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
Expand Down Expand Up @@ -52,14 +52,27 @@
</head>
<body data-page="error" class="text-center no-js">
<div class="panel-cover--overlay">

<div class="astro-wrap">
<a class="astronaut" href="#" title="return to base"></a>
</div>
<h1 class="mayday">
..shhh....houston...404. ..shhhh...lost...in...space. .shhhhh...
</h1>

<a id="panic-button" class="btn btn-small" href="#">Panic button</a>
<div class="mayday">
<hr class="panel-cover__divider">
<h1>
Houston, we have a problem. <br>
Houston, 404 error appeared.
</h1>
<hr class="panel-cover__divider panel-cover__divider--secondary">
<h1>
What happens now?
</h1>
</div>

<div class="mayday options">
<a id="panic-button" class="btn btn-small" href="#">Panic button</a>
<a id="safe-button" class="btn btn-small" href="/#open">Safe button</a>
</div>

</div>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "uno-zen",
"description": "Minimalist and Elegant theme for Ghost",
"version": "1.1.24",
"version": "1.2",
"author": {
"name": "Kiko Beats",
"url": "https://github.com/kikobeats"
Expand Down

0 comments on commit f572957

Please sign in to comment.