-
Notifications
You must be signed in to change notification settings - Fork 0
/
404-error.html
202 lines (187 loc) · 5.36 KB
/
404-error.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE html>
<html lang="en">
<head>
<title>404</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<style>
.jumbotron {
font-size: 21px;
font-weight: 200;
line-height: 2.1428571435;
color: inherit;
padding: 10px 0px;
}
.masthead, .body-content, {
padding-left: 15px;
padding-right: 15px;
}
.jumbotron {
text-align: center;
background-color: transparent;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}
.green {color:#5cb85c;}
.orange {color:#f0ad4e;}
.red {color:#d9534f;}
header{
width:100%;
height:40px;
background:#212121;
padding:0 20px 0 20px;
}
#i18n-menu{
display: inherit;
text-decoration: none;
color:white;
padding:0;
margin:0;
font-size: 0;
}
#i18n-menu a{
color:#C9C9C9;
display: block;
padding:0 5px 0 5px;
min-width: 50px;
}
#i18n-menu li{
font-size: 16px;
text-align: center;
list-style: none;
display: inline-block;
height:100%;
line-height: 40px;
cursor:pointer;
}
#i18n-menu li:hover{
background:#555555;
}
</style>
<script type="text/javascript">
function loadDomain() {
var display = document.getElementById("display-domain");
display.innerHTML = document.domain;
}
</script>
</head>
<body onload="javascript:loadDomain();">
<header>
<ul id="i18n-menu">
<li><a href="#" id="fi-FI">FI</a></li>
<li><a href="#" id="en-GB">EN</a></li>
</ul>
</header>
<div class="container">
<div class="jumbotron">
<h1><i class='fa fa-frown-o red'></i> <span id="p1"></span></h1>
<p class="lead"><span id="p2"></span> <em><span id='display-domain'></span></em>.</p>
<p><a onclick=javascript:checkSite(); class="btn btn-default btn-lg"><span class="green" id="p3"></span></a>
<script type="text/javascript">
function checkSite(){
var currentSite = window.location.hostname;
window.location = "http://" + currentSite;
}
</script>
</p>
</div>
</div>
<div class="container">
<div class="body-content">
<div class="row">
<div class="col-md-6">
<h2 id="p4"></h2>
<p id="p5" class="lead"></p>
</div>
<div class="col-md-6">
<h2 id="p6"></h2>
<p id="p7" class="lead"></p>
<p id="p8"></p>
<p id="p9" class="lead"></p>
<p id="p10"></p>
</div>
</div>
</div>
</div>
<script>
var lang = {
fi: {
p1: "404 Sivua ei löytynyt",
p2: "Emme löytäneet etsimääsi osoitteesta",
p3: "Palaa takaisin etusivulle",
p4: "Mitä tapahtui?",
p5: "404 virhekoodi tarkoittaa, että etsimääsi tiedostoa tai sivua ei löytynyt.",
p6: "Mitä voin tehdä?",
p7: "Jos olet sivuston käyttäjä",
p8: "Palaa takaisin selaimesi takaisin -napilla ja varmista, että olet oikeassa paikassa. Jos tarvitset välitöntä tukea, ole meihin yhteydessä sähköpostitse.",
p9: "Jos olet sivuston omistaja",
p10: "Varmista, että olet oikeassa paikassa ja ole yhteydessä palveluntarjoajaasi, mikäli uskot tämän olevan virhe.",
},
en: {
p1: "404 Not Found",
p2: "We couldn't find what you're looking for on",
p3: "Take Me To The Homepage",
p4: "What happened?",
p5: "A 404 error status implies that the file or page that you're looking for could not be found.",
p6: "What can I do?",
p7: "If you're a site vistor",
p8: "Please use your browsers back button and check that you're in the right place. If you need immediate assistance, please send us an email instead.",
p9: "If you're the site owner",
p10: "Please check that you're in the right place and get in touch with your website provider if you believe this to be an error.",
}
}
window.i18n = ( function( window, document, $, lang ) {
var app = {};
app.locales = lang;
app.cache = function() {
app.$menu = $("#i18n-menu");
};
app.init = function() {
app.cache();
var locale = app.getLocale();
if (locale)
app.localize(locale);
else
app.localize("fi-FI"); // fallback to fi-FI
app.$menu.on("click", "a", app.toggleLocale);
};
app.toggleLocale = function(e) {
e.preventDefault();
app.localize(e.target.id);
};
app.localize = function(locale) {
switch(locale) {
case "fi-FI":
$.each( app.locales.fi, function( key, value ) {
if(key == "p1") document.title = value;
var elem = $("#" + key);
elem.html(value);
});
break;
case "en":
case "en-GB":
case "en-US":
// etc
$.each( app.locales.en, function( key, value ) {
if(key == "p1") document.title = value;
var elem = $("#" + key);
elem.html(value);
});
break;
};
};
app.getLocale = function() {
return window.navigator.userLanguage || window.navigator.language;
};
$(document).ready( app.init );
return app;
})( window, document, jQuery, lang);
</script>
</body>
</html>