From b364e0ec38996ecc418a05528594ea3fd3bd614e Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 15 Nov 2018 11:05:50 +0100 Subject: [PATCH] Improves pages markup --- app/views/pages/accessibility.html.erb | 161 ++++++++++++++----------- app/views/pages/conditions.html.erb | 8 +- app/views/pages/privacy.html.erb | 12 +- config/locales/en/pages.yml | 3 +- 4 files changed, 97 insertions(+), 87 deletions(-) diff --git a/app/views/pages/accessibility.html.erb b/app/views/pages/accessibility.html.erb index cf956e3e8..fe28dbc74 100644 --- a/app/views/pages/accessibility.html.erb +++ b/app/views/pages/accessibility.html.erb @@ -1,99 +1,114 @@ -<% provide :title do %><%= t('pages.titles.accessibility') %><% end %> +<% provide :title do %><%= t("pages.titles.accessibility") %><% end %> <% content_for :canonical do %> <%= render "shared/canonical", href: page_url("accessibility") %> <% end %>
-
+
-

<%= t('.title') %>

- <%= simple_format(t('.description')) %> +

<%= t("pages.accessibility.title") %>

+ <%= simple_format(t("pages.accessibility.description")) %> -
    - <% t('.examples').each do |example| %> -
  • <%= example %>
  • - <% end %> -
+
    + <% t("pages.accessibility.examples").each do |example| %> +
  • <%= example %>
  • + <% end %> +
-

<%= t('.keyboard_shortcuts.title') %>

+

<%= t("pages.accessibility.keyboard_shortcuts.title") %>

-

<%= t('.keyboard_shortcuts.navigation_table.description') %>

+

<%= t("pages.accessibility.keyboard_shortcuts.navigation_table.description") %>

-
- - - - - - - - - - <% t('.keyboard_shortcuts.navigation_table.rows').each do |row| %> +
+
<%= t('.keyboard_shortcuts.navigation_table.caption') %>
<%= t('.keyboard_shortcuts.navigation_table.key_header') %><%= t('.keyboard_shortcuts.navigation_table.page_header') %>
+ + - - + + - <% end %> - -
+ <%= t("pages.accessibility.keyboard_shortcuts.navigation_table.caption") %> +
<%= row[:key_column] %><%= row[:page_column] %> + <%= t("pages.accessibility.keyboard_shortcuts.navigation_table.key_header") %> + + <%= t("pages.accessibility.keyboard_shortcuts.navigation_table.page_header") %> +
-
+ + + <% t("pages.accessibility.keyboard_shortcuts.navigation_table.rows").each do |row| %> + + <%= row[:key_column] %> + <%= row[:page_column] %> + + <% end %> + + +
-

<%= t('.keyboard_shortcuts.browser_table.description') %>

+

<%= t("pages.accessibility.keyboard_shortcuts.browser_table.description") %>

-
- - - - - - - - - - <% t('.keyboard_shortcuts.browser_table.rows').each do |row| %> +
+
<%= t('.keyboard_shortcuts.browser_table.caption') %>
<%= t('.keyboard_shortcuts.browser_table.browser_header') %><%= t('.keyboard_shortcuts.browser_table.key_header') %>
+ + - - + + - <% end %> - -
+ <%= t("pages.accessibility.keyboard_shortcuts.browser_table.caption") %> +
<%= row[:browser_column] %><%= row[:key_column] %> + <%= t("pages.accessibility.keyboard_shortcuts.browser_table.browser_header") %> + + <%= t("pages.accessibility.keyboard_shortcuts.browser_table.key_header") %> +
-
+ + + <% t("pages.accessibility.keyboard_shortcuts.browser_table.rows").each do |row| %> + + <%= row[:browser_column] %> + <%= row[:key_column] %> + + <% end %> + + +
-

<%= t('.textsize.title') %>

-

<%= t('.textsize.browser_settings_table.description') %>

+

<%= t("pages.accessibility.textsize.title") %>

+

<%= t("pages.accessibility.textsize.browser_settings_table.description") %>

-
- - - - - - - - - <% t('.textsize.browser_settings_table.rows').each do |row| %> +
+
<%= t('.textsize.browser_settings_table.browser_header') %><%= t('.textsize.browser_settings_table.action_header') %>
+ - - + + - <% end %> - -
<%= row[:browser_column] %><%= row[:action_column] %> + <%= t("pages.accessibility.textsize.browser_settings_table.browser_header") %> + + <%= t("pages.accessibility.textsize.browser_settings_table.action_header") %> +
-
+ + + <% t("pages.accessibility.textsize.browser_settings_table.rows").each do |row| %> + + <%= row[:browser_column] %> + <%= row[:action_column] %> + + <% end %> + + +
-

<%= t('.textsize.browser_shortcuts_table.description') %>

+

<%= t("pages.accessibility.textsize.browser_shortcuts_table.description") %>

- + -

<%= t('.compatibility.title') %>

- -

<%= t('.compatibility.description_html') %>

+

<%= t("pages.accessibility.compatibility.title") %>

+

<%= t("pages.accessibility.compatibility.description_html") %>

diff --git a/app/views/pages/conditions.html.erb b/app/views/pages/conditions.html.erb index f85c61542..340513d1e 100644 --- a/app/views/pages/conditions.html.erb +++ b/app/views/pages/conditions.html.erb @@ -1,4 +1,4 @@ -<% provide :title do %><%= t('pages.titles.conditions') %><% end %> +<% provide :title do %><%= t("pages.titles.conditions") %><% end %> <% content_for :canonical do %> <%= render "shared/canonical", href: page_url("conditions") %> <% end %> @@ -6,9 +6,9 @@
-

<%= t('.title') %>

-

<%= t('.subtitle') %>

-

<%= t('.description') %>

+

<%= t("pages.conditions.title") %>

+

<%= t("pages.conditions.subtitle") %>

+

<%= t("pages.conditions.description") %>

diff --git a/app/views/pages/privacy.html.erb b/app/views/pages/privacy.html.erb index f18e32bbc..3c76d3c18 100644 --- a/app/views/pages/privacy.html.erb +++ b/app/views/pages/privacy.html.erb @@ -1,4 +1,4 @@ -<% provide :title do %><%= t('pages.titles.privacy') %><% end %> +<% provide :title do %><%= t("pages.titles.privacy") %><% end %> <% content_for :canonical do %> <%= render "shared/canonical", href: page_url("privacy") %> <% end %> @@ -6,12 +6,11 @@
- -

<%= t(".title") %>

-

<%= t('.subtitle') %>

+

<%= t("pages.privacy.title") %>

+

<%= t("pages.privacy.subtitle") %>

    - <% t('.info_items').each do |item| %> + <% t("pages.privacy.info_items").each do |item| %> <% if item.key? :text %>
  1. <%= item[:text] %>
  2. <% else %> @@ -26,12 +25,9 @@ <% end %> <% end %>
-
<%= render '/shared/print' %>
-
- diff --git a/config/locales/en/pages.yml b/config/locales/en/pages.yml index be7cad3ef..07de222f8 100644 --- a/config/locales/en/pages.yml +++ b/config/locales/en/pages.yml @@ -155,8 +155,7 @@ en: description_column: Decreases text size compatibility: title: Compatibility with standards and visual design - description_html: 'All pages of this website comply with the Accessibility Guidelines or General Principles of Accessible Design established by the Working Group WAI belonging to W3C.' - + description_html: 'All pages of this website comply with the Accessibility Guidelines or General Principles of Accessible Design established by the Working Group WAI belonging to W3C.' titles: accessibility: Accessibility conditions: Terms of use