2020-10-09 12:17:33 +02:00
|
|
|
<!DOCTYPE html>
|
2022-04-07 10:33:11 +02:00
|
|
|
<html lang={"#{@locale}"}>
|
2020-10-09 12:17:33 +02:00
|
|
|
<head>
|
2022-04-07 10:33:11 +02:00
|
|
|
<meta charset="utf-8" />
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title><%= gettext("This page is not correct") %></title>
|
2020-10-09 12:17:33 +02:00
|
|
|
<style>
|
|
|
|
body.error {
|
|
|
|
font-family: BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, Segoe UI, Fira Sans, Droid Sans, Helvetica Neue, Helvetica, Arial, sans-serif;
|
|
|
|
background: #efeef4;
|
|
|
|
position: absolute;
|
|
|
|
color: #3c376e;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
padding: 0;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
2021-03-09 19:39:54 +01:00
|
|
|
flex-direction: column;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
body.error .dialog {
|
|
|
|
text-align: center;
|
2020-10-09 12:17:33 +02:00
|
|
|
}
|
2022-04-07 10:33:11 +02:00
|
|
|
|
2020-10-09 12:17:33 +02:00
|
|
|
body.error .dialog h1 {
|
|
|
|
font-size: 20px;
|
|
|
|
line-height: 28px;
|
|
|
|
font-weight: 400;
|
|
|
|
}
|
2022-04-07 10:33:11 +02:00
|
|
|
|
2020-10-09 12:17:33 +02:00
|
|
|
body.error .dialog img {
|
|
|
|
display: block;
|
|
|
|
max-width: 470px;
|
|
|
|
width: 100%;
|
|
|
|
height: auto;
|
|
|
|
margin: -120px auto auto;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body class="error">
|
|
|
|
<main role="main" class="dialog">
|
|
|
|
<div class="error_illustration">
|
2020-10-09 17:07:10 +02:00
|
|
|
<img src="/img/mobilizon_logo.png" />
|
|
|
|
<!-- <img src="/img/error.png" alt="" width="500" /> -->
|
2020-10-09 12:17:33 +02:00
|
|
|
</div>
|
|
|
|
<div class="error__message">
|
2022-04-07 10:33:11 +02:00
|
|
|
<h1><%= gettext("We're sorry, but something went wrong on our end.") %></h1>
|
2021-03-09 19:39:54 +01:00
|
|
|
<p>
|
2022-04-07 10:33:11 +02:00
|
|
|
<%= gettext("The Mobilizon server %{instance} seems to be temporarily down.",
|
|
|
|
instance: "<b>#{@instance}</b>"
|
|
|
|
)
|
|
|
|
|> raw %>
|
|
|
|
<br />
|
|
|
|
|
2021-03-09 19:39:54 +01:00
|
|
|
<%= if is_nil(@contact) do %>
|
|
|
|
<%= gettext("If the issue persists, you may try to contact the server administrator.") %>
|
|
|
|
<% else %>
|
2022-04-07 10:33:11 +02:00
|
|
|
<%= gettext(
|
|
|
|
"If the issue persists, you may contact the server administrator at %{contact}.",
|
|
|
|
contact:
|
|
|
|
cond do
|
|
|
|
String.contains?(@contact, "@") ->
|
|
|
|
"<a href=\"mailto:#{@contact}\">#{@contact}</a>"
|
|
|
|
|
|
|
|
String.match?(@contact, ~r/^https?:\/\/.*/) ->
|
|
|
|
"<a href=\"#{@contact}\">#{@contact}</a>"
|
|
|
|
|
|
|
|
true ->
|
|
|
|
@contact
|
|
|
|
end
|
|
|
|
)
|
|
|
|
|> raw %>
|
2021-03-09 19:39:54 +01:00
|
|
|
<% end %>
|
|
|
|
</p>
|
2020-10-09 12:17:33 +02:00
|
|
|
</div>
|
|
|
|
</main>
|
2021-03-09 19:39:54 +01:00
|
|
|
<%= if length(@details) > 0 do %>
|
|
|
|
<details>
|
|
|
|
<summary style="font-size: 1.25rem;"><%= gettext("Technical details") %></summary>
|
|
|
|
<pre>
|
|
|
|
<%= for detail <- @details do %>
|
2022-04-07 10:33:11 +02:00
|
|
|
<%= detail %><br />
|
2021-03-09 19:39:54 +01:00
|
|
|
<% end %>
|
|
|
|
</pre>
|
|
|
|
</details>
|
|
|
|
<% end %>
|
2020-10-09 12:17:33 +02:00
|
|
|
</body>
|
|
|
|
</html>
|