added resizing of content window
This commit is contained in:
29
app/assets/javascripts/layout.js
Normal file
29
app/assets/javascripts/layout.js
Normal 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();
|
||||||
|
});
|
||||||
@@ -46,7 +46,7 @@ div#page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
section#content {
|
section#content {
|
||||||
width: 80%;
|
max-width: 50em;
|
||||||
float: left;
|
float: left;
|
||||||
padding-left: 2em;
|
padding-left: 2em;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
|||||||
Reference in New Issue
Block a user