mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-03-24 06:20:07 +01:00
Some style improvments.
This commit is contained in:
parent
796e508635
commit
f97a4e490b
@ -11,6 +11,7 @@
|
||||
|
||||
#extended {
|
||||
display: none;
|
||||
margin: 0 auto;
|
||||
|
||||
a, a:active, a:visited {
|
||||
color: #333;
|
||||
|
@ -25,7 +25,7 @@ body {
|
||||
#extended.view-icons {
|
||||
padding: 0;
|
||||
border: none;
|
||||
margin: 0 -14px;
|
||||
// margin: 0 -14px;
|
||||
}
|
||||
#bottombar {
|
||||
.center {
|
||||
|
@ -74,15 +74,10 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event
|
||||
setLocation = function (newAbsHref, keepBrowserUrl) {
|
||||
|
||||
newAbsHref = encodedHref(newAbsHref);
|
||||
|
||||
if (absHref !== newAbsHref) {
|
||||
absHref = newAbsHref;
|
||||
|
||||
notify.set('loading...');
|
||||
modulejs.require('core/refresh')(function () {
|
||||
notify.set();
|
||||
event.pub('location.changed', getItem());
|
||||
});
|
||||
|
||||
if (history) {
|
||||
if (keepBrowserUrl) {
|
||||
history.replaceState({absHref: absHref}, '', absHref);
|
||||
@ -91,6 +86,12 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
notify.set('loading...');
|
||||
modulejs.require('core/refresh')(function () {
|
||||
notify.set();
|
||||
event.pub('location.changed', getItem());
|
||||
});
|
||||
},
|
||||
|
||||
setLink = function ($el, item) {
|
||||
|
@ -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…
x
Reference in New Issue
Block a user