prototype mobile interface
This commit is contained in:
19
app/views/m/posts/_header.html.erb
Normal file
19
app/views/m/posts/_header.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<header>
|
||||
<menu>
|
||||
<li id="search-item">
|
||||
<%= form_tag(m_posts_path, :method => :get) do %>
|
||||
<%= search_field_tag :tags, params[:tags] %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li id="site-item">
|
||||
<h1>
|
||||
<%= Danbooru.config.app_name %>
|
||||
</h1>
|
||||
</li>
|
||||
<li id="sign-in-item">
|
||||
<% if true || CurrentUser.is_anonymous? %>
|
||||
<%= link_to "Sign in", new_m_session_path %>
|
||||
<% end %>
|
||||
</li>
|
||||
</menu>
|
||||
</header>
|
||||
3
app/views/m/posts/_tags.html.erb
Normal file
3
app/views/m/posts/_tags.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<div id="tag-list">
|
||||
<%= post.presenter.tag_list_html(self, :name_only => true, :path_prefix => "/m/posts") %>
|
||||
</div>
|
||||
19
app/views/m/posts/index.html.erb
Normal file
19
app/views/m/posts/index.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<div id="c-m-posts">
|
||||
<%= render "header" %>
|
||||
|
||||
<% @post_set.posts.each do |post| %>
|
||||
<%= PostPresenter.preview(post, :path_prefix => "/m/posts") %>
|
||||
<% end %>
|
||||
|
||||
<footer>
|
||||
<%= sequential_paginator(@post_set.posts) %>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
<% if params[:tags].present? %>
|
||||
<%= params[:tags] %> - <%= Danbooru.config.app_name %>
|
||||
<% else %>
|
||||
<%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
11
app/views/m/posts/show.html.erb
Normal file
11
app/views/m/posts/show.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<div id="c-m-posts">
|
||||
<%= render "header" %>
|
||||
|
||||
<%= image_tag(@post.large_file_url, :width => @post.large_image_width, :height => @post.large_image_height, :id => "image") %>
|
||||
|
||||
<%= render "tags", :post => @post %>
|
||||
</div>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
<%= @post.tag_string %> - <%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user