From 18b6a77b1566d83968eb46fafa78580290566c4c Mon Sep 17 00:00:00 2001 From: Alex Turchyn Date: Sun, 11 Jun 2023 16:18:00 +0300 Subject: [PATCH] move all svg icons to 'icons' folder --- app/views/dashboard/index.html.erb | 16 ++-------------- app/views/devise/shared/_error_messages.html.erb | 2 +- app/views/icons/_calendar.html.erb | 9 +++++++++ app/views/icons/_clipboard.html.erb | 5 +++++ app/views/icons/_info_circle.html.erb | 1 + app/views/icons/_paperclip.html.erb | 3 +++ app/views/icons/_plus.html.erb | 5 +++++ app/views/icons/_x_circle.html.erb | 1 + app/views/layouts/application.html.erb | 2 +- app/views/storage_settings/_disk_form.html.erb | 2 +- app/views/submissions/index.html.erb | 12 ++---------- app/views/submissions/show.html.erb | 4 +--- app/views/users/index.html.erb | 6 +----- 13 files changed, 33 insertions(+), 35 deletions(-) create mode 100644 app/views/icons/_calendar.html.erb create mode 100644 app/views/icons/_clipboard.html.erb create mode 100644 app/views/icons/_info_circle.html.erb create mode 100644 app/views/icons/_paperclip.html.erb create mode 100644 app/views/icons/_plus.html.erb create mode 100644 app/views/icons/_x_circle.html.erb diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 71105e58..64a49cbf 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -1,11 +1,7 @@

Dashboard

<%= link_to new_template_path, class: 'btn btn-primary btn-md gap-2', data: { turbo_frame: :modal } do %> - - - - - + <%= svg_icon('plus', class: 'w-6 h-6') %> <% end %>
@@ -20,15 +16,7 @@

Created by <%= template.author.full_name %>

- - - - - - - - - + <%= svg_icon('calendar', class: 'w-4 h-4') %> <%= l(template.created_at, format: :long) %>

diff --git a/app/views/devise/shared/_error_messages.html.erb b/app/views/devise/shared/_error_messages.html.erb index aa9ea769..ddc4b7fa 100644 --- a/app/views/devise/shared/_error_messages.html.erb +++ b/app/views/devise/shared/_error_messages.html.erb @@ -1,7 +1,7 @@ <% if resource.errors.any? %>
- + <%= svg_icon('x_circle', class: 'stroke-current shrink-0 h-6 w-6') %>

<%= I18n.t('errors.messages.not_saved', diff --git a/app/views/icons/_calendar.html.erb b/app/views/icons/_calendar.html.erb new file mode 100644 index 00000000..a396d7f6 --- /dev/null +++ b/app/views/icons/_calendar.html.erb @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/app/views/icons/_clipboard.html.erb b/app/views/icons/_clipboard.html.erb new file mode 100644 index 00000000..078c71b7 --- /dev/null +++ b/app/views/icons/_clipboard.html.erb @@ -0,0 +1,5 @@ + + + + + diff --git a/app/views/icons/_info_circle.html.erb b/app/views/icons/_info_circle.html.erb new file mode 100644 index 00000000..9ee66ae1 --- /dev/null +++ b/app/views/icons/_info_circle.html.erb @@ -0,0 +1 @@ + diff --git a/app/views/icons/_paperclip.html.erb b/app/views/icons/_paperclip.html.erb new file mode 100644 index 00000000..f9a8abd2 --- /dev/null +++ b/app/views/icons/_paperclip.html.erb @@ -0,0 +1,3 @@ + diff --git a/app/views/icons/_plus.html.erb b/app/views/icons/_plus.html.erb new file mode 100644 index 00000000..ef6c49ba --- /dev/null +++ b/app/views/icons/_plus.html.erb @@ -0,0 +1,5 @@ + + + + + diff --git a/app/views/icons/_x_circle.html.erb b/app/views/icons/_x_circle.html.erb new file mode 100644 index 00000000..a7a5104c --- /dev/null +++ b/app/views/icons/_x_circle.html.erb @@ -0,0 +1 @@ + diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 805efd5e..f3e4261e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -18,7 +18,7 @@