disable surf mode until we can figure out what to do about the clickjacking restrictions

This commit is contained in:
Kyle Drake 2014-12-23 09:23:26 -08:00
parent 8dab34bc39
commit f6ba160db6
5 changed files with 12 additions and 7 deletions

View file

@ -938,6 +938,11 @@ class Site < Sequel::Model
!domain.empty? ? domain : "#{username}.neocities.org" !domain.empty? ? domain : "#{username}.neocities.org"
end end
def uri
# Switch-over for when SSL defaulting is ready
"http://#{host}"
end
def title def title
if values[:title].nil? || values[:title].empty? if values[:title].nil? || values[:title].empty?
!domain.nil? && !domain.empty? ? domain : "#{username}.neocities.org" !domain.nil? && !domain.empty? ? domain : "#{username}.neocities.org"

View file

@ -63,13 +63,13 @@
<ul class="row website-Gallery content int-Gall"> <ul class="row website-Gallery content int-Gall">
<% @sites.each_with_index do |site,i| %> <% @sites.each_with_index do |site,i| %>
<li> <li>
<a href="" class="neo-Screen-Shot" title="<%= site.title %>" onclick="surf(<%= ((@current_page-1)*Site::BROWSE_PAGINATION_LENGTH)+i+1 %>); return false"> <a href="<%= site.uri %>" class="neo-Screen-Shot" title="<%= site.title %>" onclick="return true; surf(<%= ((@current_page-1)*Site::BROWSE_PAGINATION_LENGTH)+i+1 %>); return false">
<span class="img-Holder" style="background:url(<%= site.screenshot_url('index.html', '540x405') %>) no-repeat;"> <span class="img-Holder" style="background:url(<%= site.screenshot_url('index.html', '540x405') %>) no-repeat;">
<img src="/img/placeholder.png" alt="<%= site.title %>" /> <img src="/img/placeholder.png" alt="<%= site.title %>" />
</span> </span>
</a> </a>
<div class="title"> <div class="title">
<a href="" title="<%= site.title %>" onclick="surf(<%= i+1 %>); return false"><%= site.title.shorten(30) %></a> <a href="<%= site.uri %>" title="<%= site.title %>" onclick="return true; surf(<%= i+1 %>); return false"><%= site.title.shorten(30) %></a>
</div> </div>
<div class="site-info"> <div class="site-info">
<div class="username"> <div class="username">

View file

@ -22,7 +22,7 @@
<div class="col col-50 signup-Area"> <div class="col col-50 signup-Area">
<div class="signup-Form"> <div class="signup-Form">
<fieldset class="content"> <fieldset class="content">
<a href="/surf/<%= current_site.username %>" class="screenshot dashboard" style="background-image:url(<%= current_site.screenshot_url('index.html', '540x405') %>);"></a> <a href="<%= current_site.uri %>" class="screenshot dashboard" style="background-image:url(<%= current_site.screenshot_url('index.html', '540x405') %>);"></a>
</fieldset> </fieldset>
</div> </div>
</div> </div>

View file

@ -51,13 +51,13 @@
<ul class="row website-Gallery content int-Gall suggestions"> <ul class="row website-Gallery content int-Gall suggestions">
<% @suggestions.each do |suggested_site| %> <% @suggestions.each do |suggested_site| %>
<li> <li>
<a href="/surf/<%= suggested_site.username %>" class="neo-Screen-Shot" title="<%= suggested_site.title %>"> <a href="<%= suggested_site.uri %>" class="neo-Screen-Shot" title="<%= suggested_site.title %>">
<span class="img-Holder" style="background:url(<%= suggested_site.screenshot_url('index.html', '540x405') %>) no-repeat;"> <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 %>" /> <img src="/img/placeholder.png" alt="<%= suggested_site.title %>" />
</span> </span>
</a> </a>
<div class="title"> <div class="title">
<a href="/surf/<%= suggested_site.username %>" title="<%= suggested_site.title %>"><%= suggested_site.title.shorten(30) %></a> <a href="<%= suggested_site.uri %>" title="<%= suggested_site.title %>"><%= suggested_site.title.shorten(30) %></a>
</div> </div>
<div class="site-info"> <div class="site-info">
<div class="username"> <div class="username">

View file

@ -14,13 +14,13 @@
<div class="col col-50 signup-Area large"> <div class="col col-50 signup-Area large">
<div class="signup-Form"> <div class="signup-Form">
<fieldset class="content"> <fieldset class="content">
<a href="/surf/<%= site.username %>" class="screenshot" style="background-image:url(<%= site.screenshot_url('index.html', '540x405') %>);"></a> <a href="<%= site.uri %>" class="screenshot" style="background-image:url(<%= site.screenshot_url('index.html', '540x405') %>);"></a>
</fieldset> </fieldset>
</div> </div>
</div> </div>
<div class="col col-50 profile-info"> <div class="col col-50 profile-info">
<h2 class="eps title-with-badge"><span><%= site.title %></span> <% if site.supporter? %><a href="/plan" class="supporter-badge" title="Neocities Supporter"></a> <% end %></h2> <h2 class="eps title-with-badge"><span><%= site.title %></span> <% if site.supporter? %><a href="/plan" class="supporter-badge" title="Neocities Supporter"></a> <% end %></h2>
<p class="site-url"><a href="/surf/<%= site.username %>"><%= site.host %></a></p> <p class="site-url"><a href="<%= site.uri %>"><%= site.host %></a></p>
<div class="stats"> <div class="stats">
<div class="stat"><strong><%= site.views.format_large_number %></strong> <span>views</span></div> <div class="stat"><strong><%= site.views.format_large_number %></strong> <span>views</span></div>
<% follows_count = site.follows_dataset.count %> <% follows_count = site.follows_dataset.count %>