-
Notifications
You must be signed in to change notification settings - Fork 0
/
maintenance.html.erb
147 lines (133 loc) · 5.42 KB
/
maintenance.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
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--
This is the maintenance page installed by the permatime plugin
see: http://github.com/red56/permatime_plugin/tree/master#readme
This template is rendered and uploaded during capistrano deployment tasks,
speciically cap deploy:web:disable
Because it is rendered by capistrano it has no access to normal rails
methods and helpers - i.e. it's mostly vanilla html and some ruby.
-->
<%
#------------------------------------------------------------------------
# replace the following with the correct stuff, or it will look kinda funny
#------------------------------------------------------------------------
app_name = "Our wonderful application"
#replace with your real application name
default_reason = "an update"
#replace with the reason your site will be down for
#or you can pass in as an environment variable
twitter_id = "my_twitter_id"
#replace with nil if you don't have a twitter id for this app
#alternatively:
website_url = nil
#replace with "http://our_site.com" if you have an alternative site where more downtime info can be found
email_address = nil
#replace with "our@emailaddress" if want to be contacted by email
%>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<style type="text/css" charset="utf-8" rel="stylesheet">
body {
font-family: sans-serif;
background-color: #EEE;
color: #000;
text-align:center;
}
h1 {
font-size: 1.8em;
color: #6A0;
margin-bottom: 1em;
}
a {
color: #369;
}
p {
line-height: 1.4em;
}
#wrap {
width: 640px;
margin: 3em auto 0 auto;
padding: 10px;
background-color: #DDD;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
text-align:left;
}
#notice {
padding: 1.5em 2.5em 1em 2.5em;
background-color: #FFF;
border: 1px solid #999;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
}
#notice p {
font-size: 1.2em;
}
#notice #times p {
margin: 0;
}
#times {
margin: 1.5em 0 3em 0;
}
a.permatime {
font-size: 0.8em;
font-weight: bold;
background: transparent url("http://images.permatime.com/images/icon2_16x16.gif") no-repeat left 0.2em;
padding:0.2em 0 0.2em 18px;
margin-left:0.5em;
}
#notice p.note {
color:#999;
font-size:1em;
}
p.credit {
font-size:0.9em;
color:#999;
width: 630px;
margin: 0.5em auto;
text-align:right;
}
p.credit a {
color:#999;
}
</style>
<title>Maintenance notice for <%=app_name%></title>
</head>
<body>
<div id="wrap">
<div id="notice">
<h1>Maintenance Notice</h1>
<p>
<%=app_name%> is currently offline for <%= reason ? reason : default_reason %>.
We are really sorry for any inconvenience this may cause you.
</p>
<div id="times">
<p>
Offline since: <strong><%= Time.now.strftime("%I:%M %p %Z") %></strong>
<a href="<%= permatime %>" class="permatime" title="Open permatime.com">See it in your time zone</a></p>
</p>
<p>
We should be back up <% if deadline %>
by <strong><%=deadline %></strong>.<% else %>
shortly.<% end %>
</p>
</div>
<p class="note">
<% if twitter_id %>
Check our <a href="http://twitter.com/<%=twitter_id%>">Twitter feed</a> for more details.
<%else %>
<% if website_url %>
Visit <a href="<%=website_url%>"><%= website_url %></a> for more details.
<% end %>
<% end %>
<% if email_address %>
You can <a href="mailto:our-email-address">email us</a>
if you need to get in touch.
<% end %>
</p>
</div>
</div>
<p class="credit">powered by <a href="http://permatime.com/">permatime.com</a></p>
</body>
</html>