remove unused mobile templates
This commit is contained in:
@@ -286,14 +286,6 @@ class Post < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
module ImageMethods
|
module ImageMethods
|
||||||
def device_scale
|
|
||||||
if large_image_width > 320
|
|
||||||
320.0 / (large_image_width + 10)
|
|
||||||
else
|
|
||||||
1.0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def twitter_card_supported?
|
def twitter_card_supported?
|
||||||
image_width.to_i >= 280 && image_height.to_i >= 150
|
image_width.to_i >= 280 && image_height.to_i >= 150
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
<%= form_tag(m_posts_path, :method => "get") do %>
|
|
||||||
<%= text_field_tag("tags", params[:tags], :size => 14) %>
|
|
||||||
<%= submit_tag "Go", :name => nil %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= @post_set.presenter.post_previews_html(self, :path_prefix => "/m/posts") %>
|
|
||||||
|
|
||||||
<%= sequential_paginator(@post_set.posts) %>
|
|
||||||
|
|
||||||
<%= content_for(:html_header) do %>
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
$(document).on("swipeleft", function(e) {
|
|
||||||
if (e.gesture.distance > 150) {
|
|
||||||
var href = $(".paginator a[rel=next]").attr("href");
|
|
||||||
if (href) {
|
|
||||||
window.location = href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on("swiperight", function(e) {
|
|
||||||
if (e.gesture.distance > 150) {
|
|
||||||
var href = $(".paginator a[rel=prev]").attr("href");
|
|
||||||
if (href) {
|
|
||||||
window.location = href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for(:page_title) do %>
|
|
||||||
<% if @post_set.tag_string.present? %>
|
|
||||||
<%= @post_set.humanized_tag_string %> - <%= Danbooru.config.app_name %>
|
|
||||||
<% else %>
|
|
||||||
<%= Danbooru.config.app_name %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
<%= 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="options">
|
|
||||||
<% if @post.favorited_by?(CurrentUser.user.id) %>
|
|
||||||
<%= link_to "Unfavorite", favorite_path(@post), :method => :delete %> |
|
|
||||||
<% else %>
|
|
||||||
<%= link_to "Favorite", favorites_path(:post_id => @post.id), :method => :post %> |
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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 %>">
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
$(document).on("swipeleft", function(e) {
|
|
||||||
if (e.gesture.distance > 150) {
|
|
||||||
var href = $(".paginator a[rel=next]").attr("href");
|
|
||||||
if (href) {
|
|
||||||
window.location = href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on("swiperight", function(e) {
|
|
||||||
if (e.gesture.distance > 150) {
|
|
||||||
window.history.back();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for(:page_title) do %>
|
|
||||||
<%= @post.presenter.humanized_essential_tag_string %> - <%= Danbooru.config.app_name %>
|
|
||||||
<% end %>
|
|
||||||
Reference in New Issue
Block a user