neocities/views/site.erb
Kyle Drake ebc3ffe7e9 Add TRUMP PLAN to pay for upcoming Net Neutrality
Removes the free plan for the White House, FCC, US Senate and Trump
hotels. Introduces special Trump Plan, 2MB of disk space for only $100/mo.
2017-04-26 16:38:43 -07:00

146 lines
6.5 KiB
Text

<div class="header-Outro with-site-image">
<% if flash.keys.length > 0 %>
<div class="row content">
<div class="alert txt-Center">
<p style="padding:5px">
<% flash.keys.each do |key| %>
<%= flash[key] %>
<% end %>
</p>
</div>
</div>
<% end %>
<div class="row content">
<div class="col col-50 signup-Area large">
<div class="signup-Form">
<fieldset class="content">
<a href="<%= site.uri %>" class="screenshot" style="background-image:url(<%= site.screenshot_url('index.html', '540x405') %>);"></a>
</fieldset>
</div>
</div>
<div class="col col-50 profile-info">
<h2 class="eps title-with-badge"><span><%= site.title %></span> <% if site.supporter? %><a href="/supporter" class="supporter-badge" title="Neocities Supporter"></a> <% end %> <% if site.plan_type == 'trumpplan' %><img src="/img/fatcat.png" alt="FAT CAT"><BR>FAT CAT SUPPORTER<br><small>Tips <i>really</i> well at Sarge's Deli</i><% end %></h2>
<p class="site-url"><a href="<%= site.uri %>"><%= site.host %></a></p>
<!--
<% if site.latest_archive %>
<p><a href="<%= site.latest_archive.url %>" style="margin-right: 5px"><%= site.latest_archive.ipfs_hash %></a><small style="font-size: 7pt"><a href="/permanent-web">(what is this?)</a></small></p>
<% end %>
-->
<div class="stats">
<div class="stat"><strong><%= site.views.format_large_number %></strong> <span>view<%= site.views == 1 ? '' : 's' %></span></div>
<div class="stat"><strong><%= site.follow_count.format_large_number %></strong> <span>follower<%= site.follow_count == 1 ? '' : 's' %></span></div>
<div class="stat"><strong><%= site.changed_count.format_large_number %></strong> <span>update<%= site.changed_count == 1 ? '' : 's' %></span></div>
<div class="stat"><strong><%= site.tips_dataset.count %></strong> <span>tips</span></div>
</div>
<div class="actions">
<% if current_site == site %>
<a href="/dashboard" class="btn-Action edit"><i class="fa fa-edit" title="Edit"></i> Edit Site</a>
<% end %>
<% if current_site && current_site.id == site.id && site.latest_archive %>
<a href="/site/<%= site.username %>/archives" class="btn-Action edit"><i class="fa fa-history" title="Archives"></i> Archives</a>
<% end %>
<% if current_site && current_site != site %>
<% is_following = current_site.is_following?(site) %>
<a id="followLink" href="#" onclick="Site.toggleFollow(<%= site.id %>, '<%= csrf_token %>'); return false" class="btn-Action <%= is_following ? 'is-following' : '' %>">
<span class="unfollow"><i class="fa fa-times"></i>Unfollow</span>
<span class="following"><i class="fa fa-check"></i>Following</span>
<span class="follow"><i class="fa fa-plus"></i>Follow</span>
</a>
<!-- <a href="#" class="btn-Action tip"><span>Tip</span></a> -->
<% end %>
<a href="#" id="shareButton" class="btn-Action" data-container="body" data-toggle="popover" data-placement="bottom" data-content='<%== erb :'_share', layout: false, locals: {site: site} %>'><i class="fa fa-share-alt"></i> <span>Share</span></a>
<% if site.tipping_enabled? %>
<a href="#" id="tipButton" class="btn-Action" data-container="body" data-toggle="popover" data-placement="bottom" data-content='<%== erb :'site/_tip', layout: false, locals: {site: site} %>'><i class="fa fa-usd"></i> <span>Send a Tip</span></a>
<% end %>
</div>
</div>
</div>
</div>
<div class="container site-profile">
<div class="content misc-page columns right-col"><div class="col-left">
<div class="col col-66">
<%== erb :'site/_profile_comments', locals: {site: site} %>
<% if @latest_events.empty? %>
<div class="site-profile-padding">
<p>No recent activity.</p>
<% if current_site && site.owned_by?(parent_site) %>
<p>
You should <a href="/dashboard">update your site</a>!
</p>
<% end %>
</div>
<%== erb :'_news', layout: false, locals: {site: @site, events: @latest_events} %>
<% else %>
<div class="site-profile-padding"><%== erb :'_news', layout: false, locals: {site: @site, events: @latest_events} %></div>
<% end %>
</div>
<div class="col col-33">
<h3>Website Stats</h3>
<div class="stats">
<div class="stat">
<span>Last updated</span>
<strong>
<% if site.updated_at.nil? %>
<%= site.created_at.ago.downcase %>
<% else %>
<%= site.updated_at.ago.downcase %>
<% end %>
</strong>
</div>
<div class="stat"><span>Created</span><strong><%= site.created_at.strftime('%b %-d, %Y') %></strong></div>
<a href="/site/<%= site.username %>/stats">Site Traffic Stats</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} %>
<% if site != current_site %>
<div class="report">
<% if signed_in? %>
<% if current_site && current_site.is_blocking?(site) %>
<a href="#">Unblock</a>
<% else %>
<a href="#block" data-toggle="modal">Block Site</a>
<% end %>
<% end %>
</div>
<% end %>
</div>
</div></div>
</div>
<div class="modal hide fade" id="block" tabindex="-1" role="dialog" aria-labelledby="blockLabel" aria-hidden="true">
<form method="POST" action="/site/<%= site.username %>/block">
<input type="hidden" value="<%= csrf_token %>" name="csrf_token">
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button>
<h3 id="blockLabel">Block Site</h3>
</div>
<div class="modal-body">
<p>You are going to block this site. This will do the following:</p>
<ul>
<li>You will no longer see this site in searches.</li>
<li>Site will no longer see your site in searches.</li>
<li>Site will not be able to comment on your site profile.</li>
<li>Any comments this site has posted to your profile will not be displayed.</li>
</ul>
<p>Are you sure you want to do this?</p>
</div>
<div class="modal-footer">
<button class="btn cancel" data-dismiss="modal" aria-hidden="true">Cancel</button>
<button type="submit" class="btn-Action">Block Site</button>
</div>
</form>
</div>