]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/5131'
authorTom Hughes <tom@compton.nu>
Sat, 15 Feb 2025 16:31:12 +0000 (16:31 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 15 Feb 2025 16:31:12 +0000 (16:31 +0000)
app/assets/stylesheets/errors.scss
app/views/layouts/_head.html.erb
app/views/layouts/_meta.html.erb
app/views/layouts/error.html.erb

index fd140023218ec93014ca6ce1534e76f7f630ce2e..77b440a889261beb4be326d47782c102669312e1 100644 (file)
@@ -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;
+    }
+  }
 }
index e6d709b27f7de74192a36af8760c9c96dc88febe..37d830ef67f3cc2e4ef0174afad8fb77ddeb60ad 100644 (file)
@@ -1,6 +1,5 @@
 <%= 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 "turbo", :type => "module" %>
   <%= javascript_include_tag "application" %>
   <%= javascript_include_tag "i18n/#{I18n.locale}" %>
@@ -11,7 +10,6 @@
   <% end %>
   <%= 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 %>
index 4c88887f920d4462c1650759a3801c4d0ccb4ec5..48be6e0aa1ee86b31f724c896084febfa4aabb30 100644 (file)
@@ -1,3 +1,5 @@
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<meta name="viewport" content="width=device-width, initial-scale=1">
 <% [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" %>
 <% end -%>
index dfcb3cb91c27a7924ded612df5a5596b71c9cb7a..eab764aa3a2a7e0a3a0ed3e7727b774687ab5b35 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html lang="<%= I18n.locale %>" dir="<%= dir %>">
   <head>
     <meta charset="utf-8">
     <title>OpenStreetMap</title>
@@ -7,11 +7,13 @@
     <%= 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>