added resizing of content window

This commit is contained in:
albert
2013-02-17 22:10:53 -05:00
parent 741f97481d
commit 54625aa79c
3 changed files with 31 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ $(function() {
// Table striping
$(".striped tbody tr:even").addClass("even");
$(".striped tbody tr:odd").addClass("odd");
// More link
if ($("#site-map-link").length > 0) {
$("#site-map-link").click(function(e) {

View File

@@ -0,0 +1,29 @@
(function() {
Danbooru.Layout = {};
Danbooru.Layout.initialize = function() {
$(window).resize(Danbooru.Layout.restyle_content);
}
Danbooru.Layout.restyle_content = function() {
if ($(window).width() > 1100) {
$("#content").css("max-width", "50em");
}
if ($(window).width() > 1300) {
$("#content").css("max-width", "60em");
}
if ($(window).width() > 1500) {
$("#content").css("max-width", "70em");
}
if ($(window).width() < 1000) {
$("#content").css("max-width", "40em");
}
}
})();
$(document).ready(function() {
Danbooru.Layout.initialize();
});

View File

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