Skip to content

Commit

Permalink
display line breaks where there are newlines in the text
Browse files Browse the repository at this point in the history
  • Loading branch information
bhoggard committed Dec 23, 2024
1 parent 869a08e commit fc0998e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/application.tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
@apply text-slate-600 hover:underline hover:text-slate-500 no-underline
}

p {
@apply my-2 text-sm
}

.tw-btn-primary {
@apply px-2 py-1 border text-slate-700 bg-slate-200 hover:text-black hover:border-black
border-slate-700 rounded-md text-nowrap no-underline w-min hover:no-underline;
Expand Down
2 changes: 1 addition & 1 deletion app/views/artworks/_info.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<% end %>
<% if @artwork.description.present? %>
<div class="mt-2 text-slate-500">
<%= @artwork.description %>
<%= simple_format(@artwork.description) %>
</div>
<% end%>
<div class=" text-slate-700 flex gap-4 mt-4">
Expand Down
2 changes: 1 addition & 1 deletion app/views/main/_artwork.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class=""><%= artwork.artist_name %></div>
<div class="text-gray-500 italic"><%= artwork.title %></div>
<div class="text-black text-lg mb-1">Price: <%= artwork.price.present? ? artwork.price : "N/A" %></div>
<div class=" text-sm text-gray-700"><%= artwork.description %></div>
<div class=" text-sm text-gray-700"><%= simple_format artwork.description %></div>
</section>
</a>
</div>
2 changes: 1 addition & 1 deletion app/views/profiles/_profile.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<% if profile.bio %>
<div class="my-3 ">
<h5 class="text-sm font-semibold">Bio:</h5>
<%= profile.bio.nil? ? '' : profile.bio %>
<%= profile.bio.nil? ? '' : simple_format(profile.bio) %>
</div>
<% end %>
<div class="flex gap-6">
Expand Down

0 comments on commit fc0998e

Please sign in to comment.