neocities/views/browse.erb
Scott O'Hara 08d1d6e68e Various CSS/layout fixes/updates
clean up of various html files

clean up of sass / css files

fix width/height issues with responsive website gallery

update responsive layout issues with website gallery

update max-sizing of input-Area class to 90%

updated broken positioning of footer icons
2013-07-23 22:42:05 -04:00

69 lines
2.9 KiB
Text

<script type="text/javascript">
function getPage(currentPage) {
document.location.href = '/browse?current_page='+currentPage+'&'+$('#search_criteria').serialize();
}
</script>
<h2 class="content">Websites on NeoCities</h2>
<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" 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 -->
<ul class="row website-Gallery">
<% @sites.each do |site| %>
<li>
<a href="http://<%= site.username %>.neocities.org" target="_blank">
<img src="http://neocities.org/site_screenshots/<%= site.username %>.jpg" class="neo-SS" />
</a>
</li>
<% end %>
</ul>
<% if params[:sort_by] != 'random' %>
<% if @page_count > 1 %>
<div style="font-size: 30pt">
<% if @current_page != 1 %>
<a href="#" onclick="getPage(<%= @current_page - 1 %>); return false"><i class="icon-arrow-left" style="text-decoration: none"></i></a>&nbsp;
<% end %>
<% 1.upto(@page_count) do |num| %>
<a href="#" onclick="getPage(<%= num %>); return false" style="<%= "text-decoration: none" if num == @current_page %>"><%= num %></a>&nbsp;
<% 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 %>