]> git.openstreetmap.org Git - rails.git/commitdiff
Rework welcome message to use bootstrap buttons
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 3 Feb 2021 13:34:59 +0000 (13:34 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 3 Feb 2021 13:44:52 +0000 (13:44 +0000)
I also reworked the layout to use flex utilities and avoid using a white button border as a spacing hack. In future this will be better done with start/end utilities, avoiding the need to be fancy with negative margins.

app/assets/stylesheets/common.scss
app/views/layouts/map.html.erb

index 3a8b97fbc9a8b01bd7d9d5158a2184d76de0826d..c010691c6520a2e7f22c15fbab0dfae3106f0d6a 100644 (file)
@@ -448,26 +448,11 @@ body.compact-nav {
 
   .welcome {
     display: none;
-    padding-bottom: 5px;
 
     p {
-      padding: $lineheight/2 $lineheight $lineheight;
       font-size: 110%;
       font-weight: 300;
     }
-
-    .button {
-      width: 50%;
-      float: left;
-      margin: 0;
-      border-radius: 0;
-      font-weight: normal;
-      padding: .6em;
-
-      &.learn-more {
-        border-right: 1px solid #fff;
-      }
-    }
   }
 
   #banner {
index 33737ae23843080c4d66d454a19fed3b752c5bac..0403bc889634ebf25a43467ee0cefd06e6f12010 100644 (file)
     <% unless current_user %>
       <div class="welcome">
         <%= render "sidebar_header", :title => t("layouts.intro_header") %>
-        <p><%= t "layouts.intro_text" %></p>
-        <p><%= t "layouts.hosting_partners_html",
-                 :ucl => link_to(t("layouts.partners_ucl"), "https://www.ucl.ac.uk"),
-                 :bytemark => link_to(t("layouts.partners_bytemark"), "https://www.bytemark.co.uk"),
-                 :partners => link_to(t("layouts.partners_partners"), "https://hardware.openstreetmap.org/thanks/") %>
-        </p>
-        <div class="standard-form">
-          <a class="button learn-more" href="<%= about_path %>"><%= t("layouts.learn_more") %></a>
-          <a class="button sign-up" href="<%= user_new_path %>"><%= t("layouts.start_mapping") %></a>
+        <div class="px-3 pb-3">
+          <p><%= t "layouts.intro_text" %></p>
+          <p><%= t "layouts.hosting_partners_html",
+                   :ucl => link_to(t("layouts.partners_ucl"), "https://www.ucl.ac.uk"),
+                   :bytemark => link_to(t("layouts.partners_bytemark"), "https://www.bytemark.co.uk"),
+                   :partners => link_to(t("layouts.partners_partners"), "https://hardware.openstreetmap.org/thanks/") %>
+          </p>
+          <div class="d-flex mx-n1">
+            <div class="w-50 px-1">
+              <a class="btn btn-primary w-100" href="<%= about_path %>"><%= t("layouts.learn_more") %></a>
+            </div>
+            <div class="w-50 px-1">
+              <a class="btn btn-primary w-100" href="<%= user_new_path %>"><%= t("layouts.start_mapping") %></a>
+            </div>
+          </div>
         </div>
       </div>
     <% end %>