From 4f163a434f5b15c3ce4d602d87ed6119e3b3b221 Mon Sep 17 00:00:00 2001 From: Marwin Hochfelsner <50826859+hlfan@users.noreply.github.com> Date: Sun, 20 Jul 2025 06:28:57 +0200 Subject: [PATCH] Restore about section partial --- app/views/site/_about_section.html.erb | 7 +++++ app/views/site/about.html.erb | 40 +++++++------------------- config/locales/en.yml | 1 + 3 files changed, 18 insertions(+), 30 deletions(-) create mode 100644 app/views/site/_about_section.html.erb diff --git a/app/views/site/_about_section.html.erb b/app/views/site/_about_section.html.erb new file mode 100644 index 000000000..5ba299b36 --- /dev/null +++ b/app/views/site/_about_section.html.erb @@ -0,0 +1,7 @@ +<%= tag.section :id => local_assigns[:id] do %> +
+ <%= inline_svg_tag "about/#{icon}.svg", :class => "flex-shrink-0" %> +

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

+
+ <%= yield %> +<% end %> diff --git a/app/views/site/about.html.erb b/app/views/site/about.html.erb index 2d8e1575d..bb1ec3387 100644 --- a/app/views/site/about.html.erb +++ b/app/views/site/about.html.erb @@ -21,19 +21,11 @@

<%= t ".lede_text" %>

-
-
- <%= inline_svg_tag "about/local.svg", :class => "flex-shrink-0" %> -

<%= t ".local_knowledge_title" %>

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

<%= t ".local_knowledge_html" %>

-
+ <% end %> -
-
- <%= inline_svg_tag "about/community.svg", :class => "flex-shrink-0" %> -

<%= t ".community_driven_title" %>

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

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

-
+ <% end %> -
-
- <%= inline_svg_tag "about/open.svg", :class => "flex-shrink-0" %> -

<%= t ".open_data_title" %>

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

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

-
+ <% end %> - + <% end %> -
-
- <%= inline_svg_tag "about/partners.svg", :class => "flex-shrink-0" %> -

<%= t ".partners_title" %>

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

<%= 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 %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 7df116d07..ef6f50598 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2167,6 +2167,7 @@ en: lede_text: | OpenStreetMap is built by a community of mappers that contribute and maintain data about roads, trails, cafés, railway stations, and much more, all over the world. + about_section: local_knowledge_title: Local Knowledge local_knowledge_html: | OpenStreetMap emphasizes local knowledge. Contributors use -- 2.39.5