mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
71 lines
3.1 KiB
Text
71 lines
3.1 KiB
Text
<script type="text/javascript">
|
|
function getPage(currentPage) {
|
|
document.location.href = '/browse?current_page='+currentPage+'&'+$('#search_criteria').serialize();
|
|
}
|
|
</script>
|
|
|
|
|
|
<div class="row content">
|
|
<h2 class="col">Websites on NeoCities</h2>
|
|
<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" <%= 'selected' if params[:sort_by] == 'last_updated' %>>Last Updated</option>
|
|
<option value="hits" <%= 'selected' if params[:sort_by] == 'hits' %>>Most Hits</option>
|
|
<option value="newest" <%= 'selected' if params[:sort_by] == 'newest' %>>Newest</option>
|
|
<option value="oldest" <%= 'selected' if params[:sort_by] == 'oldest' %>>Oldest</option>
|
|
<option value="random" <%= 'selected' if params[:sort_by] == 'random' %>>Random</option>
|
|
</select>
|
|
</div>
|
|
<!--
|
|
<div>
|
|
<input name="is_nsfw" type="checkbox" value="true" <%= 'checked' if params[:is_nsfw].to_s == 'true' %>> 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 bookmark it!<br>Visitor counts are updated hourly.</p>
|
|
<a class="btn-Action" href="/new" title="create a NeoCities.org site today!">Create your NeoCities site now</a>
|
|
</div>
|
|
|
|
</div> <!-- end .row.content -->
|
|
<br />
|
|
<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(http://neocities.org/site_screenshots/<%= site.username %>.jpg) no-repeat;">
|
|
<img src="/img/placeholder.png" alt="<%= site.username %>" />
|
|
</span>
|
|
</a>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<% 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="<%= "text-decoration: none" if num == @current_page %>"><%= 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 %>
|