Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error pages #5131

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 40 additions & 5 deletions app/assets/stylesheets/errors.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,43 @@
.logo {
float: left;
margin: 10px;
body {
margin: 1rem;
margin-top: 2rem;
font-family: system-ui;
}

.details {
float: left;
main {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem 2rem;
max-width: 960px;

.logo {
flex-shrink: 0;

img {
display: block;
max-width: 100%;
height: auto;
}
}

.details {
h1 {
margin-top: 0;
}
}
}

@media (min-width: 640px) {
body {
margin: 2rem;
}

main {
flex-direction: row;

.logo {
align-self: start;
}
}
}
4 changes: 1 addition & 3 deletions app/views/layouts/_head.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<%= tag.head :data => application_data do %>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= render :partial => "layouts/meta" %>
<%= javascript_include_tag "es6" unless browser.es6? %>
<%= javascript_include_tag "turbo", :type => "module" %>
<%= javascript_include_tag "application" %>
<%= javascript_include_tag "i18n/#{I18n.locale}" %>
<%= stylesheet_link_tag "screen-#{dir}", :media => "screen" %>
<%= stylesheet_link_tag "print-#{dir}", :media => "print" %>
<%= stylesheet_link_tag "leaflet-all", :media => "screen, print" %>
<%= render :partial => "layouts/meta" %>
<%= yield :head %>
<%= yield :auto_discovery_link_tag %>
<%= csrf_meta_tag %>
Expand Down
2 changes: 2 additions & 0 deletions app/views/layouts/_meta.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= favicon_link_tag "favicon.ico" if browser.ie? %>
<% [57, 60, 72, 76, 114, 120, 144, 152, 180].each do |size| -%>
<%= favicon_link_tag "apple-touch-icon-#{size}x#{size}.png", :rel => "apple-touch-icon", :sizes => "#{size}x#{size}", :type => "image/png" %>
Expand Down
16 changes: 9 additions & 7 deletions app/views/layouts/error.html.erb
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html lang="<%= I18n.locale %>" dir="<%= dir %>">
<head>
<meta charset="utf-8">
<title>OpenStreetMap</title>
<%= stylesheet_link_tag "errors", :media => "screen" %>
<%= render :partial => "layouts/meta" %>
</head>
<body>
<a href="<%= root_path %>">
<%= image_tag "osm_logo.svg", :alt => t("layouts.logo.alt_text"), :class => "logo" %>
</a>
<div class="details">
<%= yield %>
</div>
<main>
<a href="<%= root_path %>" class="logo">
<%= image_tag "osm_logo.svg", :alt => t("layouts.logo.alt_text") %>
</a>
<div class="details">
<%= yield %>
</div>
</main>
</body>
</html>