From 56a60d48f6cc11fb512e249f4bf32bf69e902924 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 14 Mar 2024 18:05:40 +0100 Subject: Make the UI a bit more consistent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Titles have been unified by using the same HTML tag. - Centered views have been improved for big screens. - Added more views that are to be centered. Signed-off-by: Miquel Sabaté Solà --- app/assets/stylesheets/tags.css | 4 ++-- app/assets/stylesheets/utils.css | 2 +- app/views/exports/new.html.erb | 24 +++++++++++++++--------- app/views/sessions/new.html.erb | 2 +- app/views/shared_searches/index.html.erb | 24 +++++++++++++++--------- app/views/tags/index.html.erb | 16 ++++++++++------ app/views/tags/new.html.erb | 2 +- config/locales/ca.yml | 2 ++ config/locales/en.yml | 1 + 9 files changed, 48 insertions(+), 29 deletions(-) diff --git a/app/assets/stylesheets/tags.css b/app/assets/stylesheets/tags.css index 141cbca..75dd87d 100644 --- a/app/assets/stylesheets/tags.css +++ b/app/assets/stylesheets/tags.css @@ -1,9 +1,9 @@ -#tag-index h2 span { +#tag-index h3 span { font-size: 1rem; vertical-align: middle; } -#tag-new h2 span { +#tag-new h3 span { font-size: 1rem; vertical-align: middle; } diff --git a/app/assets/stylesheets/utils.css b/app/assets/stylesheets/utils.css index 3659b13..d4bdb4b 100644 --- a/app/assets/stylesheets/utils.css +++ b/app/assets/stylesheets/utils.css @@ -4,7 +4,7 @@ .center-contents { display: grid; - grid-template-columns: repeat(3, 1fr); + grid-template-columns: 1fr 2fr 1fr; } @media only screen and (max-width: 720px) { diff --git a/app/views/exports/new.html.erb b/app/views/exports/new.html.erb index 0f47bf8..631da20 100644 --- a/app/views/exports/new.html.erb +++ b/app/views/exports/new.html.erb @@ -1,14 +1,20 @@ -
<%= I18n.t('searches.export.note') %>: <%= I18n.t('searches.export.note-msg') %>.
+
+
+
+
<%= I18n.t('searches.export.note') %>: <%= I18n.t('searches.export.note-msg') %>.
-
-
+ +
+
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index c6d7f4f..dfd4ca9 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -1,7 +1,7 @@
-

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

+

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

<%= form_tag sessions_path do |form| %>
diff --git a/app/views/shared_searches/index.html.erb b/app/views/shared_searches/index.html.erb index 9a145f6..a17537c 100644 --- a/app/views/shared_searches/index.html.erb +++ b/app/views/shared_searches/index.html.erb @@ -1,13 +1,19 @@ -

<%= I18n.t('searches.shared.title') %>

+
+
+
+

<%= I18n.t('searches.shared.title') %>

-<% if @searches.empty? %> -
<%= I18n.t('searches.shared.none') %>.
-<% else %> -
- <% @searches.each do |s| %> -
- <%= link_to s.name, search_shared_path(s) %> + <% if @searches.empty? %> +
<%= I18n.t('searches.shared.none') %>.
+ <% else %> +
+ <% @searches.each do |s| %> +
+ <%= link_to s.name, search_shared_path(s) %> +
+ <% end %>
<% end %>
-<% end %> +
+
diff --git a/app/views/tags/index.html.erb b/app/views/tags/index.html.erb index 329e069..c91f374 100644 --- a/app/views/tags/index.html.erb +++ b/app/views/tags/index.html.erb @@ -1,13 +1,17 @@
-

<%= I18n.t('tags.title') %> — <%= link_to I18n.t('tags.new-action'), new_tag_path %>

+

<%= I18n.t('tags.title') %><% if @tags.any? %>— <%= link_to I18n.t('tags.new-action'), new_tag_path %><% end %>

-
- <% @tags.each do |tag| %> - <%= render tag %> - <% end %> -
+ <% if @tags.any? %> +
+ <% @tags.each do |tag| %> + <%= render tag %> + <% end %> +
+ <% else %> +
<%= I18n.t('tags.none') %> <%= link_to I18n.t('license.here'), new_tag_path %>.
+ <% end %>
diff --git a/app/views/tags/new.html.erb b/app/views/tags/new.html.erb index bd6c586..9d6e1a8 100644 --- a/app/views/tags/new.html.erb +++ b/app/views/tags/new.html.erb @@ -1,7 +1,7 @@
-

<%= I18n.t('tags.new') %> — <%= link_to I18n.t('general.back-to-list'), tags_path %>

+

<%= I18n.t('tags.new') %> — <%= link_to I18n.t('general.back-to-list'), tags_path %>

<%= render "form", tag: @tag %>
diff --git a/config/locales/ca.yml b/config/locales/ca.yml index de2c95a..eb8cb13 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -105,6 +105,8 @@ ca: title: Etiquetes new: Etiqueta nova new-action: nova + none: Encara no hi ha cap etiqueta. Pots crear-ne una fent click + create-success: Etiqueta creada correctament destroy-success: Etiqueta esborrada correctament diff --git a/config/locales/en.yml b/config/locales/en.yml index ce11b3b..764b6d4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -105,6 +105,7 @@ en: title: Tags new: New tag new-action: new + none: You have not created any tags. You can do so by clicking create-success: Tag was successfully created destroy-success: Tag was successfully deleted -- cgit v1.2.3