From fb9c4ed4242dd4581106ee0726a9ec56ebe5a629 Mon Sep 17 00:00:00 2001 From: Ben Morrall Date: Sat, 23 Dec 2023 17:50:10 +0800 Subject: [PATCH] Clean up views with htmlbeautifier --- Gemfile | 3 ++ Gemfile.lock | 2 ++ app/views/layouts/admin.html.erb | 57 ++++++++++++++++---------------- app/views/pages/home.html.erb | 6 ++-- 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/Gemfile b/Gemfile index f61d1fa..82eec93 100644 --- a/Gemfile +++ b/Gemfile @@ -46,6 +46,9 @@ end group :development do # Speed up commands on slow machines / big apps [https://github.com/rails/spring] # gem "spring" + + # Formats erb documents + gem "htmlbeautifier", require: false end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 9aab9bc..42e5179 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -140,6 +140,7 @@ GEM activesupport (>= 6.1) hashie (5.0.0) high_voltage (3.1.2) + htmlbeautifier (1.4.2) i18n (1.14.1) concurrent-ruby (~> 1.0) io-console (0.7.1) @@ -391,6 +392,7 @@ DEPENDENCIES factory_bot_rails faker high_voltage + htmlbeautifier jsbundling-rails omniauth omniauth-facebook diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index b637e50..c9e34fb 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb @@ -1,40 +1,41 @@ - - BenMorrall.com - - <%= favicon_link_tag %> - <%= csrf_meta_tags %> - <%= csp_meta_tag %> + + BenMorrall.com + + <%= favicon_link_tag %> + <%= csrf_meta_tags %> + <%= csp_meta_tag %> - <%= stylesheet_link_tag "application" %> - -<%= content_tag :body do %> + <%= stylesheet_link_tag "application" %> + + <%= content_tag :body do %> -
+
-
- -

Ben Morrall

-
+
+ +

Ben Morrall

+
-
+
- <%= yield -%> + <%= yield -%> -
+
- + -
+
+ -
- <%= image_tag 'spiderpig.gif', size: '91x55' %> -
-<% end %> +
+ <%= image_tag 'spiderpig.gif', size: '91x55' %> +
+ <% end %> diff --git a/app/views/pages/home.html.erb b/app/views/pages/home.html.erb index d2d719b..5e957a4 100644 --- a/app/views/pages/home.html.erb +++ b/app/views/pages/home.html.erb @@ -1,10 +1,10 @@ <%- content_for(:extra_body_classes, 'welcome') -%> - <%= image_tag "forkme_left_green_007200.png", alt: "Fork me on GitHub" %> + <%= image_tag "forkme_left_green_007200.png", alt: "Fork me on GitHub" %>
-
<%= image_tag 'spiderpig.gif', size: '91x55' %>
-
<%= Time.now.in_time_zone %>
+
<%= image_tag 'spiderpig.gif', size: '91x55' %>
+
<%= Time.now.in_time_zone %>