-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.html.erb
81 lines (81 loc) · 1.91 KB
/
template.html.erb
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
<%
case type
when 'error'
title = 'Server error'
heading = "We're having some server issues"
text = <<~HTML
<p>
Sorry about that. Please try again in a moment,
or <a href='mailto:support@loyaltylion.com'>contact us</a>
if the problem persists
</p>
HTML
when 'not_found'
title = 'Page not found'
heading = 'Page not found'
text = <<~HTML
<p>
We couldn't find the page you requested.
</p>
<p>
If you were expecting to find something here, please let us know at
<a href='mailto:support@loyaltylion.com'>support@loyaltylion.com</a>
</p>
HTML
when 'maintenance'
title = 'Maintenance'
heading = "We're performing some scheduled maintenance"
text = <<~HTML
<p>
We're currently down for some scheduled maintenance. Please check back soon
</p>
HTML
end
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><%= title %> · LoyaltyLion</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Muli:300" rel="stylesheet">
<style>
body {
color: #fff;
background: #532681;
font-family: 'Muli', sans-serif;
font-weight: 300;
text-align: center;
height: 100%;
}
.text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.error-code {
padding-top: 20px;
opacity: 0.4;
}
h2 {
font-weight: 300;
font-size: 32px;
}
a {
color: #FFF;
}
</style>
</head>
<body>
<div class="text">
<h2><%= heading %></h2>
<%= text %>
<% if defined?(code) %>
<p class='error-code'>
status code: <%= code %>
</p>
<% end %>
</div>
</body>
</html>