<div class="header-Outro with-columns">
  <div class="row content">
    <div class="col col-66">
      <h3>Your Feed</h3>
      <div class="feed-filter">
        <% if !@events.empty? || params[:activity] == 'mine' %>
        <a href="/" <% if params[:activity] != 'mine' %>class="selected"<% end %>>All Activity</a>
        &nbsp;&nbsp;
        <a href="/?activity=mine" <% if params[:activity] == 'mine' %>class="selected"<% end %>>
            Activity on your profile
        </a>
        <% end %>
      </div>
    </div>
    <div class="col col-32">
      <h3>Your Website</h3>
      <a href="/dashboard" class="btn-Action edit">Edit Site</a>
    </div>
  </div>
</div>

<div class="container">
  <div class="content misc-page columns right-col">
    <div class="col-left">
      <div class="col col-66">
        <% if !@events.empty? %>
          <%== erb :'_news', layout: false, locals: {site: current_site, events: @events} %>
        <% elsif params[:activity] == 'mine' %>
          <div class="welcome">
            <h4>No updates on your site yet!</h4>
            <p>
              You should <a href="/dashboard">start editing your site</a>!
          </div>
        <% else %>
          <div class="welcome">
            <h4>Welcome to your Neocities news feed!</h4>
            <p>
              You aren’t following any websites yet! Once you do, updates will show up here and you can like and comment on them.

              Here are some website suggestions for you. Want to find some sites to follow? <a href="/browse">Check out all the sites on Neocities!</a>
            </p>
          </div>

          <ul class="row website-Gallery content int-Gall suggestions">
          <% @suggestions.each do |suggested_site| %>
            <li>
              <a href="//<%= suggested_site.host %>" class="neo-Screen-Shot" target="_blank" title="<%= suggested_site.title %>">
                <span class="img-Holder" style="background:url(<%= suggested_site.screenshot_url('index.html', '540x405') %>) no-repeat;">
                  <img src="/img/placeholder.png" alt="<%= suggested_site.title %>" />
                </span>
              </a>
              <div class="title">
                <a href="//<%= suggested_site.host %>" title="<%= suggested_site.title %>"><%= suggested_site.title.shorten(30) %></a>
              </div>
              <div class="site-info">
                <div class="username">
                  <a href="/site/<%= suggested_site.username %>" title="Profile">
                    <i class="fa fa-user"></i><%= site.username %>
                  </a>
                </div>
                <div class="site-stats">
                  <a href="/site/<%= suggested_site.username %>">
                      <%= suggested_site.views %>&nbsp;view<%= suggested_site.views == 1 ? '' : 's' %>
                  </a>
                </div>
                <div class="site-tags">
                  <% if suggested_site.tags.count > 0 %>
                    <i class="fa fa-tag"></i> 
                    <% suggested_site.tags.each_with_index do |tag, index| %>
                      <a class="" href="/browse?tag=<%= Rack::Utils.escape tag.name %>"><%= tag.name %></a><% if index != suggested_site.tags.length - 1 %>,<% end %> 
                    <% end %>
                  <% end %>
                </div>
              </div>
            </li>
          <% end %>
        </ul>
        <p class="view-all-sites"><a href="/browse">View all sites <i class="fa fa-angle-double-right"></i></a></p>
        <% end %>
      </div>

      <div class="col col-33">
        <p class="site-url"><a href="//<%= current_site.host %>" target="_blank"><%= site.title %></a></p>
        <div class="stats">
          <div class="col col-50">
            <% if site.updated_at %>
              Last updated<br><strong><%= site.updated_at.ago %></strong>
            <% else %>
              Your new site!<br><strong><a href="/dashboard">Start Building</a></strong>
            <% end %>
          </div>
          <div class="col col-50">
            <div><strong><%= site.views_english %></strong> unique views</div>
            <div><strong><%= site.hits_english %></strong> hits</div>
            <div><strong><%= site.follows_dataset.count %></strong> followers</div>
          </div>
        </div>

        <a href="//<%= site.host %>" class="large-portrait" style="background-image:url(<%= site.screenshot_url('index.html', '540x405') %>);"></a>

        <div style="margin-top: 20px; margin-bottom: 2em" class="txt-Center">
          <a href="/site/<%= site.username %>" class="btn-Action">View Site Profile</a>
        </div>

        <%== erb :'_follows', layout: false, locals: {site: site, is_current_site: site == current_site} %>

        <%== erb :'_tags', layout: false, locals: {site: site, is_current_site: site == current_site} %>
      </div>
    </div>
  </div>
</div>
