mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
some fixes to browse
This commit is contained in:
parent
91640d87b6
commit
aca48d3b0d
2 changed files with 9 additions and 4 deletions
|
@ -28,9 +28,12 @@ def education_sites_dataset
|
|||
end
|
||||
|
||||
def browse_sites_dataset
|
||||
site_dataset = Site.filter(is_deleted: false, is_banned: false, is_crashing: false).filter(site_changed: true)
|
||||
|
||||
site_dataset = Site.where(is_deleted: false, is_banned: false, is_crashing: false, site_changed: true)
|
||||
|
||||
if current_site
|
||||
site_dataset.or! sites__id: current_site.id
|
||||
|
||||
if !current_site.blocking_site_ids.empty?
|
||||
site_dataset.where!(Sequel.~(Sequel.qualify(:sites, :id) => current_site.blocking_site_ids))
|
||||
end
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<input name="tag" type="hidden" value="<%= params[:tag] %>">
|
||||
|
||||
<!--
|
||||
<div>
|
||||
<input name="is_nsfw" type="checkbox" value="true" <%= params[:is_nsfw].to_s == 'true' ? 'checked' : '' %>> Show 18+ content
|
||||
|
@ -51,10 +49,14 @@
|
|||
<div class="col col-50 filter">
|
||||
<form method="GET" action="browse">
|
||||
<fieldset class="grouping">
|
||||
<% unless is_education? || params[:sort_by] == 'followers' %>
|
||||
<% unless is_education? %>
|
||||
<label class="text-Label" for="tag"><span class="hide-on-mobile">Filter by </span>Tag:</label>
|
||||
<input class="input-Area typeahead" id="tag" name="tag" type="text" placeholder="pokemon" value="<%= params[:tag] %>" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" dir="auto">
|
||||
<input style="vertical-align: -4px;margin-left: 4px;" type="submit" class="btn-Action" value="Filter">
|
||||
<% else %>
|
||||
<% if params[:tag] %>
|
||||
<input name="tag" type="hidden" value="<%= params[:tag] %>">
|
||||
<% end %>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue