<% if (site.posts.length){ %>
  <div class="widget_athemes_tabs">
    <ul id="widget-tab" class="clearfix widget-tab-nav" style="border: none;margin-bottom: 10px;">
      <li class="active" style="padding-left: 20px; border: none;border-left: 6px solid red;"><a style="color: black;background-color: transparent!important;font-family: Impact;"><%= __('recent_posts') %></a></li>
    </ul>
    <div class="widget">
      <ul class="recent-posts-page">
        <% site.posts.sort('date', -1).limit(5).each(function(post){ %>
          <li class="clearfix recent">

            <% if (post.photos != ""){ %>
              <div class="widget-entry-thumbnail">
                <a href="<%- url_for(post.path) %>" title="<% post.title %>"><img width="50" height="50" src="<%= post.photos[0] %>" class="attachment-thumb-small size-thumb-small wp-post-image" alt="preview-16" title="<% post.title %>"></a>
              </div>
              <div class="widget-entry-summary">
            <% } else { %>
              <div class="widget-entry-summary" style="margin: 0;">
            <% } %>

              <h6 style="margin: 0;"><a href="<%- url_for(post.path) %>"><%= post.title || '(no title)' %></a></h6>
              <span><%= date(post.date, 'MMMM D, YYYY') %></span>
            </div>

          </li>
        <% }) %>
      </ul>
    </div>
  </div>
<% } %>