From 0c7ad105734b2ec12731bff4b912cc17b1a7cbfb Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 30 Jun 2021 15:21:49 +0100 Subject: [PATCH] Refactor About header to use bootstrap and flex This reduces the amount of custom CSS required for the layout, and makes it responsive on small screen sizes. --- app/assets/stylesheets/common.scss | 40 +----------------------------- app/views/site/about.html.erb | 20 +++++++++------ 2 files changed, 13 insertions(+), 47 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index c95dcc982..3bec5fe36 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1738,48 +1738,20 @@ div.secondary-actions { background-size: cover; background-attachment: fixed; - .content-inner { - position: relative; - color: #333; - min-width: 320px; - max-width: 640px; - } - - .text { - background: white; - padding: 40px; + max-width: 760px; } .attr { - position: relative; - padding: 170px 40px 20px; - background: #333; - background: rgba(0, 0, 0, .8); - margin-bottom: 0; margin-top: -20px; h1 { - display: block; - color: white; - font-weight: 300; - font-size: 28px; span { color: $vibrant-green; } } - @include media-breakpoint-up(sm) { - h1 { - font-size: 34px; - } - } - .user-image { - position: absolute; - top: 0px; - right: 240px; - left: 0px; height: 150px; background-position: 0 50%; background-repeat: no-repeat; @@ -1789,16 +1761,6 @@ div.secondary-actions { } .byosm { - position: absolute; - top: 0px; - right: 0px; - z-index: 1; - width: 240px; - height: 150px; - padding: 20px 20px 20px 40px; - font: 500 20px/24px Helvetica, Arial, sans-serif; - white-space: nowrap; - color: #fff; background: $vibrant-green; } diff --git a/app/views/site/about.html.erb b/app/views/site/about.html.erb index d1cb9905a..f495193a6 100644 --- a/app/views/site/about.html.erb +++ b/app/views/site/about.html.erb @@ -1,15 +1,19 @@ <%= tag.div :lang => @locale, :dir => t("html.dir", :locale => @locale) do %> -
-
- <%= t ".copyright_html", :locale => @locale %> +
+
+
+
+
<%= t ".copyright_html", :locale => @locale %>
+
+
+
+
+

<%= t ".used_by_html", :name => tag.span("OpenStreetMap", :class => "user-name"), :locale => @locale %>

+
- -
- -

<%= t ".used_by_html", :name => tag.span("OpenStreetMap", :class => "user-name"), :locale => @locale %>

-
+

<%= t ".lede_text", :locale => @locale %>

<%= t ".local_knowledge_title", :locale => @locale %>

-- 2.43.2