fix layout js
This commit is contained in:
@@ -2,24 +2,27 @@
|
|||||||
Danbooru.Layout = {};
|
Danbooru.Layout = {};
|
||||||
|
|
||||||
Danbooru.Layout.initialize = function() {
|
Danbooru.Layout.initialize = function() {
|
||||||
$(window).resize(Danbooru.Layout.restyle_content);
|
if ($("#c-posts").length && $("#a-index").length) {
|
||||||
|
$(window).resize(Danbooru.Layout.restyle_content);
|
||||||
|
Danbooru.Layout.restyle_content();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Layout.restyle_content = function() {
|
Danbooru.Layout.restyle_content = function() {
|
||||||
if ($(window).width() > 1100) {
|
if ($(window).width() > 1100) {
|
||||||
$("#content").css("max-width", "50em");
|
$("#content").css("width", "50em");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($(window).width() > 1300) {
|
if ($(window).width() > 1300) {
|
||||||
$("#content").css("max-width", "60em");
|
$("#content").css("width", "60em");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($(window).width() > 1500) {
|
if ($(window).width() > 1500) {
|
||||||
$("#content").css("max-width", "70em");
|
$("#content").css("width", "70em");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($(window).width() < 1000) {
|
if ($(window).width() < 1000) {
|
||||||
$("#content").css("max-width", "40em");
|
$("#content").css("width", "40em");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ div#page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
section#content {
|
section#content {
|
||||||
max-width: 50em;
|
width: 70%;
|
||||||
float: left;
|
float: left;
|
||||||
padding-left: 2em;
|
padding-left: 2em;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<% @wiki_pages.each do |wiki_page| %>
|
<% @wiki_pages.each do |wiki_page| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tag-category-<%= wiki_page.category_name %>"><%= link_to wiki_page.pretty_title, wiki_page_path(wiki_page, :noredirect => 1) %></td>
|
<td class="tag-category-<%= wiki_page.category_name %>"><%= link_to wiki_page.pretty_title, wiki_page_path(wiki_page, :noredirect => 1) %></td>
|
||||||
<td><%= wiki_page.updated_at.strftime("%m/%d/%Y %I:%M") %> by <%= h wiki_page.creator.name %></td>
|
<td><%= wiki_page.updated_at.strftime("%m/%d/%Y %I:%M") %> by <%= h link_to wiki_page.creator.name, user_path(wiki_page.creator) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ module Danbooru
|
|||||||
def paginate(page, options = {})
|
def paginate(page, options = {})
|
||||||
@paginator_options = options
|
@paginator_options = options
|
||||||
|
|
||||||
# connection.execute("SET statement_timeout=500")
|
|
||||||
|
|
||||||
if use_sequential_paginator?(page)
|
if use_sequential_paginator?(page)
|
||||||
paginate_sequential(page)
|
paginate_sequential(page)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user