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();
|
||||
});
|
||||
Reference in New Issue
Block a user