mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
88 lines
3.7 KiB
Text
88 lines
3.7 KiB
Text
<script type="text/javascript">
|
|
function getPage(currentPage) {
|
|
document.location.href = '/browse?current_page='+currentPage+'&'+$('#search_criteria').serialize();
|
|
}
|
|
</script>
|
|
|
|
<div class="header-Outro">
|
|
<div class="row content">
|
|
<% if params[:tag] %>
|
|
<h1>Sites tagged <%= params[:tag] %>
|
|
<% else %>
|
|
<h1>Sites on Neocities</h1>
|
|
<% end %>
|
|
<h3 class="subtitle"></h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row content">
|
|
<div class="col col-50">
|
|
<form id="search_criteria" action="/browse" method="GET">
|
|
<fieldset class="grouping">
|
|
<label class="text-Label" for="sort_by">Sort By:</label>
|
|
<div class="select-Container">
|
|
<select name="sort_by" id="sort_by" class="input-Select">
|
|
<option value="last_updated" <%= params[:sort_by] == 'last_updated' ? 'selected' : '' %>>Last Updated</option>
|
|
<option value="hits" <%= params[:sort_by] == 'hits' ? 'selected' : '' %>>Most Hits</option>
|
|
<option value="newest" <%= params[:sort_by] == 'newest' ? 'selected' : '' %>>Newest</option>
|
|
<option value="oldest" <%= params[:sort_by] == 'oldest' ? 'selected' : '' %>>Oldest</option>
|
|
<option value="random" <%= params[:sort_by] == 'random' ? 'selected' : '' %>>Random</option>
|
|
</select>
|
|
</div>
|
|
<!--
|
|
<div>
|
|
<input name="is_nsfw" type="checkbox" value="true" <%= params[:is_nsfw].to_s == 'true' ? 'checked' : '' %>> Show 18+ content
|
|
</div>
|
|
-->
|
|
<div style="margin-top: 10px">
|
|
<input class="btn-Action" type="submit" value="Update">
|
|
</div>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="col col-50">
|
|
<p>If you like a site, don't forget to follow it!<br>Visitor counts are updated hourly.</p>
|
|
<% unless signed_in? %>
|
|
<a class="btn-Action" href="/new" title="create a Neocities.org site today!">Create your Neocities site now</a>
|
|
<% end %>
|
|
</div>
|
|
|
|
</div> <!-- end .row.content -->
|
|
<br />
|
|
<% if @sites.length == 0 %>
|
|
<div class="row content single-Col">
|
|
<h2>No active sites found.<br>Try another search!</h2>
|
|
</div>
|
|
<% else %>
|
|
<ul class="row website-Gallery content int-Gall">
|
|
<% @sites.each do |site| %>
|
|
<li>
|
|
<a href="http://<%= site.username %>.neocities.org" class="neo-Screen-Shot" target="_blank" title="Website of <%= site.username %>">
|
|
<span class="img-Holder" style="background:url(<%= site.screenshot_url('index.html', '270x162') %>) no-repeat;">
|
|
<img src="/img/placeholder.png" alt="<%= site.username %>" />
|
|
</span>
|
|
</a>
|
|
<span style="float: left"><a href="/site/<%= site.username %>"><%= site.title %></a></span><span style="float: right"><a href="/site/<%= site.username %>"><%= site.hits %> hit<%= site.hits == 1 ? '' : 's' %></a></span>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<% end %>
|
|
|
|
<% if params[:sort_by] != 'random' %>
|
|
<% if @page_count > 1 %>
|
|
<div class="txt-Center content eps">
|
|
<% if @current_page != 1 %>
|
|
<a href="#" onclick="getPage(<%= @current_page - 1 %>); return false"><i class="icon-arrow-left" style="text-decoration: none"></i></a>
|
|
<% end %>
|
|
|
|
<% 1.upto(@page_count) do |num| %>
|
|
<a href="#" onclick="getPage(<%= num %>); return false" style="<%= num == @current_page ? 'text-decoration: none' : '' %>"><%= num %></a>
|
|
<% end %>
|
|
|
|
<% if @current_page != @page_count %>
|
|
<a href="#" onclick="getPage(<%= @current_page + 1 %>); return false"><i class="icon-arrow-right" style="text-decoration: none"></i></a>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|