mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Removed search page, moved search form to bottom of browse page
This commit is contained in:
parent
375de16acc
commit
b38472260c
5 changed files with 37 additions and 39 deletions
|
@ -1,4 +0,0 @@
|
|||
|
||||
get '/search' do
|
||||
erb :'search'
|
||||
end
|
|
@ -1734,8 +1734,20 @@ a.tag:hover {
|
|||
.browse-page h1 {
|
||||
margin-top: 0;
|
||||
}
|
||||
.browse-page .tags {
|
||||
padding: 25px 30px 45px;
|
||||
.browse-page .row.content.misc {
|
||||
form {
|
||||
padding: 0;
|
||||
}
|
||||
input {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
&:last-child {
|
||||
padding-bottom: 68px;
|
||||
}
|
||||
p {
|
||||
margin-top: 1em;
|
||||
}
|
||||
}
|
||||
.misc-page .pagination {
|
||||
width: 100%;
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
<a href="/browse">Websites</a>
|
||||
</li>
|
||||
<% unless is_education? %>
|
||||
<li>
|
||||
<a href="/search">Search</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/activity">Activity</a>
|
||||
</li>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<% unless is_education? || params[:sort_by] == 'followers' %>
|
||||
<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="Search">
|
||||
<input style="vertical-align: -4px;margin-left: 4px;" type="submit" class="btn-Action" value="Filter">
|
||||
<% end %>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<% end %>
|
||||
|
||||
<% unless is_education? %>
|
||||
<div class="row website-Gallery content int-Gall tags">
|
||||
<div class="row content misc">
|
||||
<h3>Popular Tags</h3>
|
||||
<p>
|
||||
<% Tag.popular_names(100).each do |tag| %>
|
||||
|
@ -158,5 +158,26 @@
|
|||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row content misc">
|
||||
<h3>Text Search</h3>
|
||||
<form id="searchForm" method="GET" action="https://duckduckgo.com" class="content" onsubmit="return addSiteToSearch()">
|
||||
<input name="csrf_token" type="hidden" value="<%= csrf_token %>">
|
||||
<fieldset>
|
||||
<input id="searchQuery" name="q" type="text" placeholder="keywords" class="input-Area" autocapitalize="off" autocorrect="off" value="<%= flash[:username] %>" style="width: 50%">
|
||||
<input class="btn btn-Action" type="submit" value="Search">
|
||||
</fieldset>
|
||||
</form>
|
||||
<p>Search powered by <a href="https://duckduckgo.com/">Duck Duck Go</a></p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function addSiteToSearch() {
|
||||
var searchQuery = $('#searchQuery')
|
||||
var finalSearchQuery = searchQuery.val() + ' site:neocities.org'
|
||||
|
||||
window.location = 'https://duckduckgo.com/?q='+encodeURI(finalSearchQuery)
|
||||
return false
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
<div class="header-Outro">
|
||||
<div class="row content single-Col txt-Center">
|
||||
<h1>Search Neocities Sites</h1>
|
||||
<h3 class="subtitle"></h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content txt-Center single-Col misc-page">
|
||||
<form id="searchForm" method="GET" action="https://duckduckgo.com" class="content" onsubmit="return addSiteToSearch()">
|
||||
<input name="csrf_token" type="hidden" value="<%= csrf_token %>">
|
||||
<fieldset>
|
||||
<input id="searchQuery" name="q" type="text" placeholder="keywords" class="input-Area" autocapitalize="off" autocorrect="off" value="<%= flash[:username] %>" style="width: 290px">
|
||||
</fieldset>
|
||||
<input class="btn-Action" type="submit" value="Search">
|
||||
</form>
|
||||
|
||||
<p>Search powered by <a href="https://duckduckgo.com">DuckDuckGo</a>, a search engine that cares about your privacy as much as we do.</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function addSiteToSearch() {
|
||||
var searchQuery = $('#searchQuery')
|
||||
var finalSearchQuery = searchQuery.val() + ' site:neocities.org'
|
||||
|
||||
window.location = 'https://duckduckgo.com/?q='+encodeURI(finalSearchQuery)
|
||||
return false
|
||||
}
|
||||
</script>
|
Loading…
Add table
Reference in a new issue