explore/posts/intro: remove page.
This was an alternate frontpage that contained a list of previews of the most popular tags. This page was never linked from anywhere and it was unknown by most users.
This commit is contained in:
@@ -26,11 +26,6 @@ module Explore
|
||||
@search_service = MissedSearchService.new
|
||||
end
|
||||
|
||||
def intro
|
||||
@presenter = IntroPresenter.new
|
||||
render :layout => "blank"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_date
|
||||
|
||||
@@ -16,10 +16,4 @@ div#c-explore-posts {
|
||||
padding: 1em;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
div#a-intro {
|
||||
width: 870px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
module PostSets
|
||||
class Intro < PostSets::Post
|
||||
def initialize(tags)
|
||||
super(tags)
|
||||
end
|
||||
|
||||
def posts
|
||||
@posts ||= begin
|
||||
temp = ::Post.tag_match("#{tag_string} favcount:>3").paginate(page, :search_count => nil, :limit => 5)
|
||||
temp.each # hack to force rails to eager load
|
||||
temp
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,7 +0,0 @@
|
||||
class IntroPresenter
|
||||
def each
|
||||
PopularSearchService.new(Date.today).each_search(20) do |query, count|
|
||||
yield(query, PostSets::Intro.new(query))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,30 +0,0 @@
|
||||
<div id="c-explore-posts">
|
||||
<div id="a-intro">
|
||||
<header>
|
||||
<h1><%= link_to Danbooru.config.app_name, posts_path %></h1>
|
||||
<p class="byline">Find good anime art fast</p>
|
||||
|
||||
<%= form_tag(posts_path, :method => :get) do %>
|
||||
<%= text_field_tag "tags", "", :size => 50, :data => { :autocomplete => "tag-query" } %>
|
||||
<%= submit_tag "Search" %>
|
||||
<% end %>
|
||||
</header>
|
||||
|
||||
<p style="text-align: center;">Type in your favorite anime, manga, or character (last name first). Here are some popular examples:</p>
|
||||
|
||||
<% cache("intro-page", :expires_in => 1.hour) do %>
|
||||
<% @presenter.each do |tag, post_set| %>
|
||||
<div class="posts">
|
||||
<h2><%= link_to tag, posts_path(:tags => tag) %></h2>
|
||||
<%= post_set.presenter.post_previews_html(self, show_cropped: true) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "static/footer" %>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
<%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user