mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 20:44:53 -04:00
Some style improvments.
This commit is contained in:
parent
796e508635
commit
f97a4e490b
4 changed files with 22 additions and 7 deletions
|
@ -16,6 +16,15 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c
|
|||
'</a>' +
|
||||
'</li>',
|
||||
|
||||
adjustSpacing = function () {
|
||||
|
||||
var contentWidth = $('#content').width(),
|
||||
$extended = $('#extended'),
|
||||
itemWidth = ($extended.hasClass('view-icons') || $extended.hasClass('view-grid')) ? ($extended.find('.entry').eq(0).width() || 1) : 1;
|
||||
|
||||
$extended.width(Math.floor(contentWidth / itemWidth) * itemWidth);
|
||||
},
|
||||
|
||||
update = function (viewmode) {
|
||||
|
||||
var $extended = $('#extended');
|
||||
|
@ -32,6 +41,8 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c
|
|||
$extended.removeClass('view-' + mode);
|
||||
}
|
||||
});
|
||||
|
||||
adjustSpacing();
|
||||
},
|
||||
|
||||
init = function () {
|
||||
|
@ -54,6 +65,8 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c
|
|||
}
|
||||
|
||||
update(store.get(storekey));
|
||||
|
||||
$(window).on('resize', adjustSpacing);
|
||||
};
|
||||
|
||||
init();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue