Merge branch 'master' of https://github.com/r888888888/danbooru
This commit is contained in:
20
app/views/layouts/mobile.html.erb
Normal file
20
app/views/layouts/mobile.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= yield :page_title %></title>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<%= csrf_meta_tag %>
|
||||
<%= stylesheet_link_tag "mobile", :media => "screen" %>
|
||||
<%= javascript_include_tag "mobile" %>
|
||||
<%= Danbooru.config.custom_html_header_content %>
|
||||
<%= yield :html_header %>
|
||||
</head>
|
||||
<body lang="en">
|
||||
<header id="top">
|
||||
<h1><%= link_to Danbooru.config.app_name, "/" %></h1>
|
||||
</header>
|
||||
<div id="page">
|
||||
<%= yield :layout %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
16
app/views/mobile/posts/index.html.erb
Normal file
16
app/views/mobile/posts/index.html.erb
Normal file
@@ -0,0 +1,16 @@
|
||||
<%= form_tag(m_posts_path, :method => "get") do %>
|
||||
<%= text_field_tag("tags", params[:tags], :size => 30) %>
|
||||
<%= submit_tag "Go", :name => nil %>
|
||||
<% end %>
|
||||
|
||||
<%= @post_set.presenter.post_previews_html(self, :path_prefix => "/m/posts") %>
|
||||
|
||||
<%= numbered_paginator(@post_set.posts) %>
|
||||
|
||||
<div id="tags">
|
||||
<%= @post_set.presenter.tag_list_html(self, :name_only => true, :path_prefix => "/m/posts") %>
|
||||
</div>
|
||||
|
||||
<%= content_for(:html_header) do %>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<% end %>
|
||||
14
app/views/mobile/posts/show.html.erb
Normal file
14
app/views/mobile/posts/show.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<%= form_tag(m_posts_path, :method => "get") do %>
|
||||
<%= text_field_tag("tags", params[:tags], :size => 20) %>
|
||||
<%= submit_tag "Go", :name => nil %>
|
||||
<% end %>
|
||||
|
||||
<%= @post.presenter.image_html(self) %>
|
||||
|
||||
<div id="tags">
|
||||
<%= @post.presenter.tag_list_html(self, :name_only => true, :path_prefix => "/m/posts") %>
|
||||
</div>
|
||||
|
||||
<%= content_for(:html_header) do %>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=<%= @post.device_scale %>">
|
||||
<% end %>
|
||||
@@ -10,5 +10,7 @@
|
||||
<% end %>
|
||||
|
||||
<li><%= link_to "Random post", random_posts_path(:tags => params[:tags]) %></li>
|
||||
|
||||
<li><%= link_to "Mobile version", m_posts_path(:tags => params[:tags]) %></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<li><%= link_to "Expunge", expunge_moderator_post_post_path(:post_id => post.id), :remote => true, :method => :post, :id => "expunge", :confirm => "This will permanently delete this post (meaning the file will be deleted). Are you sure you want to delete this post?" %></li>
|
||||
<% end %>
|
||||
|
||||
<li><%= link_to "Mobile version", m_post_path(post) %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user