fix layout js

This commit is contained in:
albert 2013-02-17 22:21:05 -05:00
parent 54625aa79c
commit 693627d3c9
4 changed files with 16 additions and 15 deletions

View File

@ -2,24 +2,27 @@
Danbooru.Layout = {};
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() {
if ($(window).width() > 1100) {
$("#content").css("max-width", "50em");
}
$("#content").css("width", "50em");
}
if ($(window).width() > 1300) {
$("#content").css("max-width", "60em");
}
$("#content").css("width", "60em");
}
if ($(window).width() > 1500) {
$("#content").css("max-width", "70em");
}
$("#content").css("width", "70em");
}
if ($(window).width() < 1000) {
$("#content").css("max-width", "40em");
$("#content").css("width", "40em");
}
}
})();

View File

@ -46,7 +46,7 @@ div#page {
}
section#content {
max-width: 50em;
width: 70%;
float: left;
padding-left: 2em;
overflow: visible;

View File

@ -16,7 +16,7 @@
<% @wiki_pages.each do |wiki_page| %>
<tr>
<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>
<% end %>
</tbody>

View File

@ -9,8 +9,6 @@ module Danbooru
def paginate(page, options = {})
@paginator_options = options
# connection.execute("SET statement_timeout=500")
if use_sequential_paginator?(page)
paginate_sequential(page)
else