From: Anton Khorev Date: Sat, 1 Jun 2024 08:02:16 +0000 (+0300) Subject: Inline svg sprites on about page X-Git-Tag: live~439^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/459995ab51e9ceb19f12e5baf70d72b2560c9887?ds=inline;hp=-c Inline svg sprites on about page --- 459995ab51e9ceb19f12e5baf70d72b2560c9887 diff --git a/app/assets/images/about/sprite.png b/app/assets/images/about/sprite.png deleted file mode 100644 index fa0ce2986..000000000 Binary files a/app/assets/images/about/sprite.png and /dev/null differ diff --git a/app/assets/images/about/sprite.svg b/app/assets/images/about/sprite.svg deleted file mode 100644 index 01a80ae16..000000000 --- a/app/assets/images/about/sprite.svg +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/assets/images/about/sprite@2x.png b/app/assets/images/about/sprite@2x.png deleted file mode 100644 index 7560c8773..000000000 Binary files a/app/assets/images/about/sprite@2x.png and /dev/null differ diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 4b7380ffc..757da56fe 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -887,37 +887,6 @@ div.secondary-actions { margin-left: -1em; } } - - .icon { - width: 30px; - height: 30px; - background: 40px 40px image-url('about/sprite.png') no-repeat; - - &.local { - /*rtl:ignore*/ - background-position: 0px 0px; - } - &.community { - /*rtl:ignore*/ - background-position: 0px -40px; - } - &.open { - /*rtl:ignore*/ - background-position: 0px -80px; - } - &.partners { - /*rtl:ignore*/ - background-position: 0px -120px; - } - &.infringement { - /*rtl:ignore*/ - background-position: 0px -160px; - } - &.legal { - /*rtl:ignore*/ - background-position: -45px -160px; - } - } } .auth-container { diff --git a/app/views/site/_about_section.html.erb b/app/views/site/_about_section.html.erb deleted file mode 100644 index 4baec7238..000000000 --- a/app/views/site/_about_section.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<%= tag.section :id => local_assigns[:id] do %> -
-
-

<%= t "site.about.#{title}_title" %>

-
- <%= yield %> -<% end %> diff --git a/app/views/site/about.html.erb b/app/views/site/about.html.erb index 7dbed1514..6cc32edd0 100644 --- a/app/views/site/about.html.erb +++ b/app/views/site/about.html.erb @@ -21,11 +21,25 @@

<%= t ".lede_text" %>

- <%= render :layout => "about_section", :locals => { :icon => "local", :title => "local_knowledge" } do %> +
+
+ + + + +

<%= t "site.about.local_knowledge_title" %>

+

<%= t "site.about.local_knowledge_html" %>

- <% end %> +
- <%= render :layout => "about_section", :locals => { :icon => "community", :title => "community_driven" } do %> +
+
+ + + + +

<%= t "site.about.community_driven_title" %>

+

<%= t "site.about.community_driven_1_html", :osm_blog_link => link_to(t("site.about.community_driven_osm_blog"), t("site.about.community_driven_osm_blog_url")), @@ -36,16 +50,35 @@ :osm_foundation_link => link_to(t("site.about.community_driven_osm_foundation"), t("site.about.community_driven_osm_foundation_url")) %>

- <% end %> +
- <%= render :layout => "about_section", :locals => { :id => "open-data", :icon => "open", :title => "open_data" } do %> +
+
+ + + + +

<%= t "site.about.open_data_title" %>

+

<%= t "site.about.open_data_1_html", :open_data => tag.i(t("site.about.open_data_open_data")), :copyright_license_link => link_to(t("site.about.open_data_copyright_license"), copyright_path) %>

- <% end %> +
- <%= render :layout => "about_section", :locals => { :id => "legal", :icon => "legal", :title => "legal" } do %> + - <%= render :layout => "about_section", :locals => { :id => "partners", :icon => "partners", :title => "partners" } do %> +
+
+ + + + + + + +

<%= t "site.about.partners_title" %>

+

<%= t "layouts.hosting_partners_2024_html", :fastly => link_to(t("layouts.partners_fastly"), "https://www.fastly.com/"), :corpmembers => link_to(t("layouts.partners_corpmembers"), "https://osmfoundation.org/wiki/Corporate_Members"), :partners => link_to(t("layouts.partners_partners"), "https://hardware.openstreetmap.org/thanks/") %>

- <% end %> +
<% end %> <% end %>