Skip to content

Commit

Permalink
Clean up views with htmlbeautifier
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorrall committed Dec 23, 2023
1 parent 497fdad commit fb9c4ed
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 31 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -391,6 +392,7 @@ DEPENDENCIES
factory_bot_rails
faker
high_voltage
htmlbeautifier
jsbundling-rails
omniauth
omniauth-facebook
Expand Down
57 changes: 29 additions & 28 deletions app/views/layouts/admin.html.erb
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<title>BenMorrall.com</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= favicon_link_tag %>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<head>
<title>BenMorrall.com</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= favicon_link_tag %>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>

<%= stylesheet_link_tag "application" %>
</head>
<%= content_tag :body do %>
<%= stylesheet_link_tag "application" %>
</head>
<%= content_tag :body do %>

<div class="container-narrow">
<div class="container-narrow">

<div class="masthead">
<ul class="nav nav-pills pull-right">
<li><%= link_to 'Home', root_url %></li>
</ul>
<h3 class="muted">Ben Morrall</h3>
</div>
<div class="masthead">
<ul class="nav nav-pills pull-right">
<li><%= link_to 'Home', root_url %></li>
</ul>
<h3 class="muted">Ben Morrall</h3>
</div>

<hr>
<hr>

<%= yield -%>
<%= yield -%>

<hr>
<hr>

<div class="footer">
<p style="float:right"><%= link_to "Sign out", destroy_user_session_path, data: {:method => :delete,:confirm => 'Are you Sure?'} %></a>
<p><%= Time.now %></p>
</div>
<div class="footer">
<p style="float:right"><%= link_to "Sign out", destroy_user_session_path, data: {:method => :delete,:confirm => 'Are you Sure?'} %></a>
<p><%= Time.now %></p>
</div>

</div> <!-- /container -->
</div>
<!-- /container -->

<div style="text-align: center">
<%= image_tag 'spiderpig.gif', size: '91x55' %>
</div>
<% end %>
<div style="text-align: center">
<%= image_tag 'spiderpig.gif', size: '91x55' %>
</div>
<% end %>
</html>
6 changes: 3 additions & 3 deletions app/views/pages/home.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<%- content_for(:extra_body_classes, 'welcome') -%>

<a href="https://github.com/bmorrall/homepage" class="github-banner">
<%= image_tag "forkme_left_green_007200.png", alt: "Fork me on GitHub" %>
<%= image_tag "forkme_left_green_007200.png", alt: "Fork me on GitHub" %>
</a>

<div id="spiderpig-container">
<div id="spiderpig"><%= image_tag 'spiderpig.gif', size: '91x55' %></div>
<div id="spiderpig-label"><%= Time.now.in_time_zone %></div>
<div id="spiderpig"><%= image_tag 'spiderpig.gif', size: '91x55' %></div>
<div id="spiderpig-label"><%= Time.now.in_time_zone %></div>
</div>

0 comments on commit fb9c4ed

Please sign in to comment.