docbrown/app/views/articles/_sidebar_listings.html.erb
Suzanne Aitchison 18877f6f1b
Avoid layout funkiness when non-breaking characters are used (#16782)
* Apply overflow-wrap fallback everywhere we use anywhere value

* fix some more non breaking spaces layout issues

* user with org sidebar

* comment index header
2022-03-08 10:37:52 +00:00

21 lines
1.1 KiB
Text

<% @listings = Listing.where(published: true).select(:title, :classified_listing_category_id, :slug, :bumped_at) %>
<% if params[:timeframe].blank? && @listings.any? %>
<section class="crayons-card crayons-card--secondary crayons-layout__content">
<header class="crayons-card__header">
<h3 class="crayons-subtitle-2"><%= t("views.main.side.listings.heading") %></h3>
<div class="crayons-card__actions">
<a href="/listings" class="crayons-link--branded fw-medium fs-s"><%= t("views.main.side.listings.all") %></a>
</div>
</header>
<div>
<% @listings.order(bumped_at: :desc).limit(5).each do |listing| %>
<a class="crayons-link crayons-link--contentful" href="<%= listing.path %>">
<div><%= listing.title %></div>
<div class="crayons-link__secondary"><%= listing.category %></div>
</a>
<% end %>
<a class="crayons-link crayons-link--branded block align-center p-3 fw-medium fs-s w-100" href="/listings/new"><%= t("views.main.side.listings.new") %></a>
</div>
</section>
<% end %>