Skip to content

Commit

Permalink
Use turnout2024 gem for maintenance pages (#2476)
Browse files Browse the repository at this point in the history
  • Loading branch information
pglombardo authored Aug 31, 2024
1 parent b2c29bf commit 6b617f6
Show file tree
Hide file tree
Showing 6 changed files with 406 additions and 39 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@ gem "sentry-rails"
gem "version", git: "https://github.com/pglombardo/version.git", branch: "master"
gem "administrate", "~> 0.20.1"
gem "rqrcode", "~> 2.2"
gem "turnout2024", require: "turnout"
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ GEM
nio4r (~> 2.0)
racc (1.8.1)
rack (3.1.7)
rack-accept (0.4.5)
rack (>= 0.4)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
rack-cors (2.0.2)
Expand Down Expand Up @@ -565,6 +567,11 @@ GEM
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0)
turnout2024 (3.0.1)
i18n (>= 0.7, < 2)
rack (>= 3, < 4)
rack-accept (~> 0.4)
tilt (>= 2.3, < 3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
Expand Down Expand Up @@ -648,6 +655,7 @@ DEPENDENCIES
terser (~> 1.2)
translation
turbo-rails
turnout2024
tzinfo-data
version!
web-console
Expand Down
66 changes: 66 additions & 0 deletions public/406-unsupported-browser.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html>
<head>
<title>Your browser is not supported (406)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
.rails-default-error-page {
background-color: #EFEFEF;
color: #2E2F30;
text-align: center;
font-family: arial, sans-serif;
margin: 0;
}
.rails-default-error-page div.dialog {
width: 95%;
max-width: 33em;
margin: 4em auto 0;
}
.rails-default-error-page div.dialog > div {
border: 1px solid #CCC;
border-right-color: #999;
border-left-color: #999;
border-bottom-color: #BBB;
border-top: #B00100 solid 4px;
border-top-left-radius: 9px;
border-top-right-radius: 9px;
background-color: white;
padding: 7px 12% 0;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
}
.rails-default-error-page h1 {
font-size: 100%;
color: #730E15;
line-height: 1.5em;
}
.rails-default-error-page div.dialog > p {
margin: 0 0 1em;
padding: 1em;
background-color: #F7F7F7;
border: 1px solid #CCC;
border-right-color: #999;
border-left-color: #999;
border-bottom-color: #999;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top-color: #DADADA;
color: #666;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
}
</style>
</head>

<body class="rails-default-error-page">
<!-- This file lives in public/406-unsupported-browser.html -->
<div class="dialog">
<div>
<h1>Your browser is not supported.</h1>
<p>Please upgrade your browser to continue.</p>
</div>
</div>
</body>
</html>
75 changes: 56 additions & 19 deletions public/422.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,67 @@
<!DOCTYPE html>
<html>
<head>
<title>Unprocessable Entity (422)</title>
<style type="text/css">
<title>The change you wanted was rejected (422)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
.rails-default-error-page {
background-color: #EFEFEF;
color: #2E2F30;
text-align: center;
font-family: arial, sans-serif;
margin: 0;
}

html { height: 100%; }
.rails-default-error-page div.dialog {
width: 95%;
max-width: 33em;
margin: 4em auto 0;
}

body {
text-align: center;
background: #fff;
font-family: 'Open Sans', Tahoma, Georgia, Verdana, serif;
color: #6D6E70;
width: 95%;
font-size: 16px;
margin-left: auto;
margin-right: auto;
min-height: 100%;
}
.rails-default-error-page div.dialog > div {
border: 1px solid #CCC;
border-right-color: #999;
border-left-color: #999;
border-bottom-color: #BBB;
border-top: #B00100 solid 4px;
border-top-left-radius: 9px;
border-top-right-radius: 9px;
background-color: white;
padding: 7px 12% 0;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
}

h1 { font-size: 1.8em; color: #1F1D30;}
.rails-default-error-page h1 {
font-size: 100%;
color: #730E15;
line-height: 1.5em;
}

.rails-default-error-page div.dialog > p {
margin: 0 0 1em;
padding: 1em;
background-color: #F7F7F7;
border: 1px solid #CCC;
border-right-color: #999;
border-left-color: #999;
border-bottom-color: #999;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top-color: #DADADA;
color: #666;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
}
</style>
</head>

<body>
<h1>Error 422</h1>
<p> The request was well-formed but was unable to be followed due to semantic errors. </p>
</p>
<body class="rails-default-error-page">
<!-- This file lives in public/422.html -->
<div class="dialog">
<div>
<h1>The change you wanted was rejected.</h1>
<p>Maybe you tried to change something you didn't have access to.</p>
</div>
<p>If you are the application owner check the logs for more information.</p>
</div>
</body>
</html>
152 changes: 132 additions & 20 deletions public/500.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,142 @@
<!DOCTYPE html>
<html>
<head>
<title>Error (500)</title>
<style type="text/css">

html { height: 100%; }
<title>Error Page</title>
<style>
*,
*::after,
*::before {
box-sizing: border-box;
}
html,
body {
align-items: center;
background: linear-gradient(#003eff, #0028a9);
color: white;
display: flex;
font: 2rem "Poiret One";
height: 100vh;
justify-content: center;
margin: 0;
padding: 0;
}
.box {
height: 100px;
margin: 0 10px;
overflow: hidden;
position: relative;
transform: rotateZ(270deg) scale(1.05);
width: 100px;
}
.box:nth-of-type(2) {
left: -28px;
transform: rotateX(-180deg) rotateY(180deg) rotateZ(270deg) scale(1.05);
}
.box span {
animation: loader 4.8s infinite both;
display: block;
height: 100%;
position: absolute;
width: 100%;
}
.box span:nth-child(1) {
animation-delay: 0.2s;
}
.box span:nth-child(2) {
animation-delay: 0.4s;
}
.box span:nth-child(3) {
animation-delay: 0.6s;
}
.box span:nth-child(4) {
animation-delay: 0.8s;
}
.box span:nth-child(5) {
animation-delay: 1s;
}
.box span:nth-child(6) {
animation-delay: 1.2s;
}
.box span::after {
background: #fff;
border-radius: 50%;
content: "";
left: 50%;
padding: 6px;
position: absolute;
top: 0;
transform: translateX(-50%);
}
h1 {
text-shadow: 0 0 10px #fff;
animation: blink 4.8s infinite both;
}
h1:nth-of-type(2) {
animation: none;
letter-spacing: -14px;
margin: 0 auto;
opacity: 0.1;
padding-left: 41px;
position: absolute;
top: 50%;
transform: translatey(-50%);
}
@keyframes blink {
0%,
50%,
100% {
opacity: 0.2;
}
25%,
75% {
opacity: 1;
}
}
h5,
p {
position: absolute;
font-family: monospace;
text-align: center;
background: #fff;
font-family: 'Open Sans', Tahoma, Georgia, Verdana, serif;
color: #6D6E70;
width: 95%;
font-size: 16px;
margin-left: auto;
margin-right: auto;
min-height: 100%;
}
h1 { font-size: 1.8em; color: #1F1D30;}
</style>
</head>
}
h5 {
top: 15%;
font-size: 0.4em;
}
p {
font-size: 0.3em;
bottom: 10%;
width: 50%;
text-align: center;
}
p a {
color: cyan;
}
</style>
</head>
<body>
<p>
<h1>500 Error</h1>
<p> An error occurred while processing your request. </p>
<h5>Apologies, it looks like something went wrong.</h5>
<h1></h1>
<h1>5 0 0</h1>
<p>We've been notified. Please wait a moment and try again.
</body>
</html>
Loading

0 comments on commit 6b617f6

Please sign in to comment.