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
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#extended {
|
#extended {
|
||||||
display: none;
|
display: none;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
a, a:active, a:visited {
|
a, a:active, a:visited {
|
||||||
color: #333;
|
color: #333;
|
||||||
|
|
|
@ -25,7 +25,7 @@ body {
|
||||||
#extended.view-icons {
|
#extended.view-icons {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
margin: 0 -14px;
|
// margin: 0 -14px;
|
||||||
}
|
}
|
||||||
#bottombar {
|
#bottombar {
|
||||||
.center {
|
.center {
|
||||||
|
|
|
@ -74,15 +74,10 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event
|
||||||
setLocation = function (newAbsHref, keepBrowserUrl) {
|
setLocation = function (newAbsHref, keepBrowserUrl) {
|
||||||
|
|
||||||
newAbsHref = encodedHref(newAbsHref);
|
newAbsHref = encodedHref(newAbsHref);
|
||||||
|
|
||||||
if (absHref !== newAbsHref) {
|
if (absHref !== newAbsHref) {
|
||||||
absHref = newAbsHref;
|
absHref = newAbsHref;
|
||||||
|
|
||||||
notify.set('loading...');
|
|
||||||
modulejs.require('core/refresh')(function () {
|
|
||||||
notify.set();
|
|
||||||
event.pub('location.changed', getItem());
|
|
||||||
});
|
|
||||||
|
|
||||||
if (history) {
|
if (history) {
|
||||||
if (keepBrowserUrl) {
|
if (keepBrowserUrl) {
|
||||||
history.replaceState({absHref: absHref}, '', absHref);
|
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) {
|
setLink = function ($el, item) {
|
||||||
|
|
|
@ -16,6 +16,15 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c
|
||||||
'</a>' +
|
'</a>' +
|
||||||
'</li>',
|
'</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) {
|
update = function (viewmode) {
|
||||||
|
|
||||||
var $extended = $('#extended');
|
var $extended = $('#extended');
|
||||||
|
@ -32,6 +41,8 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c
|
||||||
$extended.removeClass('view-' + mode);
|
$extended.removeClass('view-' + mode);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
adjustSpacing();
|
||||||
},
|
},
|
||||||
|
|
||||||
init = function () {
|
init = function () {
|
||||||
|
@ -54,6 +65,8 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c
|
||||||
}
|
}
|
||||||
|
|
||||||
update(store.get(storekey));
|
update(store.get(storekey));
|
||||||
|
|
||||||
|
$(window).on('resize', adjustSpacing);
|
||||||
};
|
};
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue