Skip to content

Instantly share code, notes, and snippets.

@cdesch
Created January 11, 2014 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdesch/8375769 to your computer and use it in GitHub Desktop.
Save cdesch/8375769 to your computer and use it in GitHub Desktop.
<% entry = @featured_entries.first %>
<article class="entry style-grid style-hero hero-sm-largest type-post col-sm-12 col-md-6 colheight-sm-1 colheight-md-2 colheight-lg-2 colheight-xl-2">
<div class="ribbon ribbon-pulled ribbon-small ribbon-highlight">
<%= link_to entry.category.try(:name), entry.category %>
</div>
<header class="entry-header">
<h3 class="entry-title"><%= link_to entry.title, entry %></h3>
<div class="entry-meta">
<span class="entry-date">on <%= link_to entry.start_published, entry%></span>
<span class="entry-author"> by <%= link_to entry.user.try(:first_name), entry.user %></span>
</div>
</header>
<figure class="entry-thumbnail">
<%= link_to(:class => "studio_image grouped_elements", entry) %>
<!-- to disable lazy loading, remove data-src and data-src-retina -->
<% if entry.cover_photo_link.blank? %>
<%= image_tag "placeholder.gif" %>
<% else %>
<%= image_tag entry.cover_photo_link %>
<% end %>
<!--fallback for no javascript browsers-->
<noscript>
<% if entry.cover_photo_link.blank? %>
<%= image_tag "placeholder.gif" %>
<% else %>
<%= image_tag entry.cover_photo_link %>
<% end %>
</noscript>
</figure>
</article>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment