added new landing page
This commit is contained in:
1
app/views/landings/_image.html.erb
Normal file
1
app/views/landings/_image.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<div class="landing-post"><a href="<%= post_path(post) %>"><img src="<%= post.medium_file_url %>" width="<%= post.medium_image_width %>" height="<%= post.medium_image_height %>"><div class="data"><p><%= post.essential_tag_string %></p></div></a></div>
|
||||
8
app/views/landings/_tag.html.erb
Normal file
8
app/views/landings/_tag.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<!--
|
||||
- tag
|
||||
-->
|
||||
<div>
|
||||
<% @explorer.search(tag, 300).each do |post| %>
|
||||
<%= post.presenter.medium_image_html(self, :max_height => 300) %>
|
||||
<% end %>
|
||||
</div>
|
||||
22
app/views/landings/show.html.erb
Normal file
22
app/views/landings/show.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<div id="c-landings">
|
||||
<div id="a-show">
|
||||
<h1><%= link_to Danbooru.config.app_name, posts_path %></h1>
|
||||
<p class="slogan">Find good art fast</p>
|
||||
|
||||
<div class="column">
|
||||
<% @explorer.col1.each do |post| %>
|
||||
<%= render "image", :post => post %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="column">
|
||||
<% @explorer.col2.each do |post| %>
|
||||
<%= render "image", :post => post %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
<%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
17
app/views/layouts/blank.html.erb
Normal file
17
app/views/layouts/blank.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= yield :page_title %></title>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="top" title="<%= Danbooru.config.app_name %>" href="/">
|
||||
<%= csrf_meta_tag %>
|
||||
<%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %>
|
||||
<%= stylesheet_link_tag "application", :media => "screen" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= Danbooru.config.custom_html_header_content %>
|
||||
<%= yield :html_header %>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield :layout %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -27,7 +27,13 @@
|
||||
<% @posts.each do |post| %>
|
||||
<article id="post-<%= post.id %>">
|
||||
<aside>
|
||||
<%= link_to(image_tag(post.medium_file_url), post_path(post)) %>
|
||||
<% if post.is_image? %>
|
||||
<%= link_to(image_tag(post.medium_file_url), post_path(post)) %>
|
||||
<% elsif post.is_flash? %>
|
||||
<div class="text-post-medium">Flash</div>
|
||||
<% else %>
|
||||
<div class="text-post-medium">Download</div>
|
||||
<% end %>
|
||||
</aside>
|
||||
|
||||
<section>
|
||||
|
||||
Reference in New Issue
Block a user