mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
IMPR: Header, sidebar and video preview fixtures
This commit is contained in:
parent
d61dd6a519
commit
bd2559a8bc
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
|
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
|
||||||
"version": "2.3.6",
|
"version": "2.3.7",
|
||||||
"author": "Tony Air <tony@twma.pro>",
|
"author": "Tony Air <tony@twma.pro>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",
|
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",
|
||||||
|
@ -28,9 +28,6 @@ const HeaderUI = (($) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
updateHeader();
|
updateHeader();
|
||||||
$Body.on('scroll resize', () => {
|
|
||||||
updateHeader();
|
|
||||||
});
|
|
||||||
|
|
||||||
const updateFooter = (i, el) => {
|
const updateFooter = (i, el) => {
|
||||||
const $el = $(el);
|
const $el = $(el);
|
||||||
@ -45,14 +42,6 @@ const HeaderUI = (($) => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
$('.footer,.jsFooterUI').each(updateFooter);
|
$('.footer,.jsFooterUI').each(updateFooter);
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
$Body.on('resize', () => {
|
|
||||||
$('.footer,.jsFooterUI').css('height', 'auto');
|
|
||||||
setTimeout(() => {
|
|
||||||
$('.footer,.jsFooterUI').each(updateFooter);
|
|
||||||
}, 500);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static dispose() {
|
static dispose() {
|
||||||
@ -65,6 +54,13 @@ const HeaderUI = (($) => {
|
|||||||
HeaderUI.init();
|
HeaderUI.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// align event content
|
||||||
|
$(W).on(`${Events.RESIZE}`, () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
HeaderUI.init();
|
||||||
|
}, 200);
|
||||||
|
});
|
||||||
|
|
||||||
W.HeaderUI = new HeaderUI();
|
W.HeaderUI = new HeaderUI();
|
||||||
|
|
||||||
return HeaderUI;
|
return HeaderUI;
|
||||||
|
@ -53,9 +53,9 @@ const SidebarUI = (($) => {
|
|||||||
$innerWrapper.attr('style', '');
|
$innerWrapper.attr('style', '');
|
||||||
}else if(scrollPos >= (contentOffset + contentOffsetHeight - $innerWrapper[0].offsetHeight)){
|
}else if(scrollPos >= (contentOffset + contentOffsetHeight - $innerWrapper[0].offsetHeight)){
|
||||||
// bottom pos
|
// bottom pos
|
||||||
$innerWrapper.attr('style', `position:absolute;bottom:${fontSize}px`);
|
$innerWrapper.attr('style', `position:absolute;bottom:${fontSize}px`);
|
||||||
}else {
|
}else {
|
||||||
// scrolled pos
|
// scrolled pos
|
||||||
$innerWrapper.attr('style', `position:fixed;top:${fontSize}px;width:${sidebarWidth}px`);
|
$innerWrapper.attr('style', `position:fixed;top:${fontSize}px;width:${sidebarWidth}px`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,10 @@ const VideoPreviewUI = (($) => {
|
|||||||
ui.$_el.data(DATA_KEY, this);
|
ui.$_el.data(DATA_KEY, this);
|
||||||
const href = ui.$_el.attr('href') || ui.$_el.data('href');
|
const href = ui.$_el.attr('href') || ui.$_el.data('href');
|
||||||
const YouTubeGetID = (url) => {
|
const YouTubeGetID = (url) => {
|
||||||
parsedURL = url.split(/(vi\/|v%3D|v=|\/v\/|youtu\.be\/|\/embed\/)/);
|
const parsedURL = url.split(
|
||||||
|
/(vi\/|v%3D|v=|\/v\/|youtu\.be\/|\/embed\/)/,
|
||||||
|
);
|
||||||
|
console.log(parsedURL);
|
||||||
return undefined !== parsedURL[2]
|
return undefined !== parsedURL[2]
|
||||||
? parsedURL[2].split(/[^0-9a-z_-]/i)[0]
|
? parsedURL[2].split(/[^0-9a-z_-]/i)[0]
|
||||||
: parsedURL[0];
|
: parsedURL[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user