107
app/browse.rb
|
|
@ -1,4 +1,5 @@
|
|||
get '/browse/?' do
|
||||
params[:tag] = nil if params[:tag].to_s.strip.empty?
|
||||
@page = params[:page]
|
||||
@page = 1 if @page.not_an_integer?
|
||||
@description = 'Browse Neocities websites by tags, popularity, and recent updates.'
|
||||
|
|
@ -60,60 +61,60 @@ def browse_sites_dataset
|
|||
return ds
|
||||
end
|
||||
|
||||
params[:sort_by] ||= 'special_sauce'
|
||||
|
||||
case params[:sort_by]
|
||||
when 'special_sauce'
|
||||
ds = ds.where{score > 1} unless params[:tag]
|
||||
params[:sort_by] = 'special_sauce'
|
||||
ds = ds.order :score.desc, :follow_count.desc, :views.desc, :site_updated_at.desc
|
||||
when 'random'
|
||||
ds = ds.where{score > 3} unless params[:tag]
|
||||
ds = ds.order(Sequel.lit('RANDOM()'))
|
||||
when 'most_followed'
|
||||
ds = ds.where{views > Site::BROWSE_MINIMUM_FOLLOWER_VIEWS}
|
||||
ds = ds.where{follow_count > Site::BROWSE_FOLLOWER_MINIMUM_FOLLOWS}
|
||||
ds = ds.where{updated_at > Site::BROWSE_FOLLOWER_UPDATED_AT_CUTOFF.ago} unless params[:tag]
|
||||
ds = ds.order :follow_count.desc, :score.desc, :updated_at.desc
|
||||
when 'last_updated'
|
||||
ds = ds.where{score > 3} unless params[:tag]
|
||||
ds = ds.exclude site_updated_at: nil
|
||||
ds = ds.order :site_updated_at.desc
|
||||
when 'newest'
|
||||
ds = ds.where{views > Site::BROWSE_MINIMUM_VIEWS} unless current_site && current_site.is_admin
|
||||
ds = ds.exclude site_updated_at: nil
|
||||
ds = ds.order :created_at.desc, :views.desc
|
||||
when 'moderation'
|
||||
not_found unless current_site && current_site.is_admin
|
||||
ds = Site.moderation_dataset
|
||||
ds = ds.order :created_at.desc
|
||||
when 'oldest'
|
||||
ds = ds.where{score > 0.4} unless params[:tag]
|
||||
ds = ds.exclude site_updated_at: nil
|
||||
ds = ds.order(:created_at, :views.desc)
|
||||
when 'hits'
|
||||
ds = ds.where{score > 5}
|
||||
ds = ds.order(:hits.desc, :site_updated_at.desc)
|
||||
when 'views'
|
||||
ds = ds.where{score > 5}
|
||||
ds = ds.order(:views.desc, :site_updated_at.desc)
|
||||
when 'featured'
|
||||
ds = ds.exclude featured_at: nil
|
||||
ds = ds.order :featured_at.desc
|
||||
when 'tipping_enabled'
|
||||
ds = ds.where tipping_enabled: true
|
||||
ds = ds.where("(tipping_paypal is not null and tipping_paypal != '') or (tipping_bitcoin is not null and tipping_bitcoin != '')")
|
||||
ds = ds.where{score > 1} unless params[:tag]
|
||||
ds = ds.group :sites__id
|
||||
ds = ds.order :follow_count.desc, :views.desc, :updated_at.desc
|
||||
when 'blocks'
|
||||
require_admin
|
||||
ds = ds.select{[sites.*, Sequel[count(site_id)].as(:total)]}
|
||||
ds = ds.inner_join :blocks, :site_id => :id
|
||||
ds = ds.group :sites__id
|
||||
ds = ds.order :total.desc
|
||||
else
|
||||
not_found
|
||||
end
|
||||
#case params[:sort_by]
|
||||
# when 'special_sauce'
|
||||
# ds = ds.where{score > 1} unless params[:tag]
|
||||
# ds = ds.order :score.desc, :follow_count.desc, :views.desc, :site_updated_at.desc
|
||||
# when 'random'
|
||||
# ds = ds.where{score > 3} unless params[:tag]
|
||||
# ds = ds.order(Sequel.lit('RANDOM()'))
|
||||
#when 'most_followed'
|
||||
# ds = ds.where{views > Site::BROWSE_MINIMUM_FOLLOWER_VIEWS}
|
||||
# ds = ds.where{follow_count > Site::BROWSE_FOLLOWER_MINIMUM_FOLLOWS}
|
||||
# ds = ds.where{updated_at > Site::BROWSE_FOLLOWER_UPDATED_AT_CUTOFF.ago} unless params[:tag]
|
||||
# ds = ds.order :follow_count.desc, :score.desc, :updated_at.desc
|
||||
#=#hen 'last_updated'
|
||||
# ds = ds.where{score > 3} unless params[:tag]
|
||||
#ds = ds.exclude site_updated_at: nil
|
||||
#ds = ds.order :site_updated_at.desc
|
||||
#when 'newest'
|
||||
# ds = ds.where{views > Site::BROWSE_MINIMUM_VIEWS} unless current_site && current_site.is_admin
|
||||
#ds = ds.exclude site_updated_at: nil
|
||||
#ds = ds.order :created_at.desc, :views.desc
|
||||
#when 'moderation'
|
||||
# not_found unless current_site && current_site.is_admin
|
||||
#ds = Site.moderation_dataset
|
||||
#ds = ds.order :created_at.desc
|
||||
#when 'oldest'
|
||||
# ds = ds.where{score > 0.4} unless params[:tag]
|
||||
#ds = ds.exclude site_updated_at: nil
|
||||
#ds = ds.order(:created_at, :views.desc)
|
||||
#when 'hits'
|
||||
# ds = ds.where{score > 5}
|
||||
#ds = ds.order(:hits.desc, :site_updated_at.desc)
|
||||
#when 'views'
|
||||
# ds = ds.where{score > 5}
|
||||
#ds = ds.order(:views.desc, :site_updated_at.desc)
|
||||
#when 'featured'
|
||||
# ds = ds.exclude featured_at: nil
|
||||
#ds = ds.order :featured_at.desc
|
||||
#when 'tipping_enabled'
|
||||
# ds = ds.where tipping_enabled: true
|
||||
#ds = ds.where("(tipping_paypal is not null and tipping_paypal != '') or (tipping_bitcoin is not null and tipping_bitcoin != '')")
|
||||
#ds = ds.where{score > 1} unless params[:tag]
|
||||
#ds = ds.group :sites__id
|
||||
#ds = ds.order :follow_count.desc, :views.desc, :updated_at.desc
|
||||
#when 'blocks'
|
||||
# require_admin
|
||||
#ds = ds.select{[sites.*, Sequel[count(site_id)].as(:total)]}
|
||||
#ds = ds.inner_join :blocks, :site_id => :id
|
||||
#ds = ds.group :sites__id
|
||||
#ds = ds.order :total.desc
|
||||
#else
|
||||
# not_found
|
||||
#end
|
||||
|
||||
unless params[:sort_by] == 'moderation'
|
||||
ds = ds.where ['sites.is_nsfw = ?', (params[:is_nsfw] == 'true' ? true : false)]
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ services:
|
|||
ports:
|
||||
- "9292:9292"
|
||||
volumes:
|
||||
- ./public/css/neo.css:/app/public/css/neo.css
|
||||
- .:/app
|
||||
- ./docker/config.yml.docker:/app/config.yml:ro
|
||||
- site_files:/app/public/sites
|
||||
|
|
|
|||
BIN
public/cat.png
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 8.2 KiB |
BIN
public/img/catlogo-big.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
public/img/eneen.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 8.2 KiB |
BIN
public/img/kidpix-1793826300264s.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 75 KiB |
BIN
public/u1f48c_u2712-ufe0f.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
code, kbd, pre, samp{
|
||||
@extend %margin-bottom;
|
||||
background:#16414c;
|
||||
background:lightpink;
|
||||
border-left:6px solid #acd473;
|
||||
color:#a9b9b9;
|
||||
display:block;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// Apply to <main> or top level <section> for styling
|
||||
.content-Base{
|
||||
background:$c-BG;
|
||||
background:lightpink;
|
||||
min-height:500px;
|
||||
padding-bottom:50px;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,25 +13,7 @@
|
|||
<div class="col col-50 filter">
|
||||
<fieldset class="grouping">
|
||||
<% unless is_education? %>
|
||||
<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="special_sauce" <%= params[:sort_by] == 'special_sauce' ? 'selected' : '' %>>Special Sauce</option>
|
||||
<option value="random" <%= params[:sort_by] == 'random' ? 'selected' : '' %>>Random</option>
|
||||
<option value="most_followed" <%= params[:sort_by] == 'most_followed' ? 'selected' : '' %>>Most Followed</option>
|
||||
<option value="last_updated" <%= params[:sort_by] == 'last_updated' ? 'selected' : '' %>>Last Updated</option>
|
||||
<option value="views" <%= params[:sort_by] == 'views' ? 'selected' : '' %>>Views</option>
|
||||
<option value="tipping_enabled" <%= params[:sort_by] == 'tipping_enabled' ? 'selected' : '' %>>Tipping Enabled</option>
|
||||
<% if signed_in? %>
|
||||
<option value="newest" <%= params[:sort_by] == 'newest' ? 'selected' : '' %>>Newest</option>
|
||||
<% end %>
|
||||
<option value="oldest" <%= params[:sort_by] == 'oldest' ? 'selected' : '' %>>Oldest</option>
|
||||
<% if current_site && current_site.is_admin %>
|
||||
<option value="moderation" <%= params[:sort_by] == 'moderation' ? 'selected' : '' %>>Moderation</option>
|
||||
<% end %>
|
||||
<!-- <option value="robots" <%= params[:sort_by] == 'robots' ? 'selected' : '' %>>Robots</option> -->
|
||||
</select>
|
||||
</div>
|
||||
<label>Sites</label></div>
|
||||
|
||||
<!--
|
||||
<div>
|
||||
|
|
@ -57,16 +39,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="browse-page">
|
||||
|
||||
<% if @sites.length == 0 %>
|
||||
<% if @sites.empty? %>
|
||||
<div class="row website-Gallery content int-Gall" style="padding-left: 30px;">
|
||||
<h3>No active sites found.</h3>
|
||||
<p>Try another search, or <a href="/browse">browse all sites</a>!</p>
|
||||
</div>
|
||||
<% else %>
|
||||
<% end %>
|
||||
<ul class="row website-Gallery content int-Gall">
|
||||
<% @sites.each_with_index do |site,i| %>
|
||||
<li id="username_<%= site.username %>">
|
||||
|
|
@ -143,7 +123,6 @@
|
|||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% if params[:sort_by] != 'random' %>
|
||||
<%== erb :'_pagination', layout: false %>
|
||||
|
|
|
|||
|
|
@ -36,22 +36,20 @@
|
|||
|
||||
<div class="int-Logo hp-Logo">
|
||||
<a href="/" title="back to home">
|
||||
<span class="hidden">FEMSLASHCITY</span>
|
||||
<img src="/cat.png" alt="FEMSLASHCITY!!" />
|
||||
</a>
|
||||
<span class="hidden">FEMSLASHCITY</span> <img src="cat.png" width="65px" alt="FEMSLASHCITY!!" /></a>
|
||||
</div>
|
||||
|
||||
<section class="header-Intro">
|
||||
<h1 class="logo header-Content content">
|
||||
<span class="hidden">FEMSLASHCITY</span> <img src="/cat.png"/></h1>
|
||||
<span class="hidden">FEMSLASHCITY</span> <img src="/img/catlogo-big.png"/></h1>
|
||||
</section>
|
||||
|
||||
<div class="header-Outro">
|
||||
<div class="header-Outro2"><div class="header-Outro">
|
||||
<div class="row header-Content content">
|
||||
<div class="col intro">
|
||||
<h2 class="section-header">A fork of the wonderful Neocities dedicated to femslash-related web hosting. Fans of femslash, shrines to femslash, etc. Invitation only; please email agnes@omg.lol to sign up. We also give you free supporter. No payments involved. Ya get 20GB of hosting and all of the neocities supporter features as well.</h2>
|
||||
<p class="intro-text">
|
||||
FEMSLASHCITY is a social network of <a href="/browse"><%= @sites_count.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse %> web sites</a> that are bringing back the lost individual creativity of the web. We offer free static web hosting and tools that allow you to create your own web site. Join us!
|
||||
FEMSLASHCITY is a social network of web sites that are bringing back the lost individual creativity of the web. We offer free static web hosting and tools that allow you to create your own web site. Join us!
|
||||
</p>
|
||||
<ul class="intro-List">
|
||||
<li class="intro-Tools">
|
||||
|
|
@ -70,7 +68,7 @@ What it does not feature is the Neocities CLI or the custom domain capabilities
|
|||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div></div>
|
||||
|
||||
<div class="col signup-Area">
|
||||
<% if signed_in? %>
|
||||
|
|
@ -175,43 +173,6 @@ What it does not feature is the Neocities CLI or the custom domain capabilities
|
|||
<a href="/browse" class="btn-Action float-Right">Browse more sites</a>
|
||||
</div>
|
||||
|
||||
<div class="section previews">
|
||||
<h2 class="delta">Our mission: To make the web fun again by giving you back control of how you express yourself online.</h2>
|
||||
|
||||
<div class="row content">
|
||||
<div class="col col-50"><div class="screenshot" style="background-image:url(/img/front-editor-screenshot.png)"></div></div>
|
||||
<div class="col col-50 text">
|
||||
<h3><i class="fa fa-edit"></i> HTML editor, right in your browser</h3>
|
||||
<p>No tools needed. With our easy-to-use HTML editor, you're ready to start building your awesome website right now.</p>
|
||||
<p>If you'd rather use your favorite desktop editor, no problem. Uploading files is as easy as drag-n-drop.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row content right">
|
||||
<div class="col col-50"><div class="screenshot" style="background-image:url(/img/front-browse-screenshot.jpg);"></div></div>
|
||||
<div class="col col-50 text">
|
||||
<h3><i class="fa fa-globe"></i> Welcome back, web surfing</h3>
|
||||
<p>All FC sites are viewable and easily surfable in our <a href="/browse">website gallery</a>.</p>
|
||||
<p>Using tags (our version of Web Rings) you can easily discover new sites related to your interests.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row content">
|
||||
<div class="col col-50"><div class="screenshot" style="background-image:url(/img/front-follow-screenshot.jpg);"></div></div>
|
||||
<div class="col col-50 text">
|
||||
<h3><i class="fa fa-user-plus"></i> Follow your favorite FC sites</h3>
|
||||
<p>Keep track of all your favorite sites by following them. Any changes to the sites automatically show up in your news feed. You'll also see what sites they follow.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row content right">
|
||||
<div class="col col-50"><div class="screenshot" style="background-image:url(/img/front-comment-screenshot.png);"></div></div>
|
||||
<div class="col col-50 text">
|
||||
<h3><i class="fa fa-comments-o"></i> Web creativity plus community</h3>
|
||||
<p>Interact with your favorite web builders by posting comments, and sharing their sites on your social network of choice.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="section features">
|
||||
<div class="row">
|
||||
|
|
|
|||