Minor bugfixtures

This commit is contained in:
Tony Air 2019-06-26 09:52:06 +07:00
parent 3b2a504225
commit d19033d8dc
2 changed files with 531 additions and 533 deletions

View File

@ -215,21 +215,19 @@
src = '';
classTerm = 'meta-lightbox-video';
if (video[1] == 'youtube') {
src = '//www.youtube.com/embed/' + video[4];
classTerm = 'meta-lightbox-youtube';
}
if (video[1] == 'youtu') {
src = '//www.youtube.com/embed/' + video[3];
classTerm = 'meta-lightbox-youtube';
}
if (video[1] == 'youtube-nocookie') {
src = '//www.youtube-nocookie.com/embed/' + video[4];
classTerm = 'nivo-lightbox-youtube';
if (video[1] == 'youtube' || video[1] == 'youtu' || video[1] == 'youtube-nocookie') {
const YouTubeGetID = (url) => {
url = url.split(/(vi\/|v%3D|v=|\/v\/|youtu\.be\/|\/embed\/)/);
return undefined !== url[2] ? url[2].split(/[^0-9a-z_\-]/i)[0] : url[0];
};
src = '//www.youtube-nocookie.com/embed/' + YouTubeGetID(href);
classTerm = classTerm + 'meta-lightbox-youtube';
}
if (video[1] == 'vimeo') {
src = '//player.vimeo.com/video/' + video[3];
classTerm = 'meta-lightbox-vimeo';
classTerm = classTerm + 'meta-lightbox-vimeo';
}
if (src) {

View File

@ -1,5 +1,5 @@
$link-color: #007bff;
$grid-float-breakpoint-max: 576px;
$lightbox-link-hover-color: #007bff !default;
$lightbox-breakpoint: 576px !default;
.meta-lightbox-theme-default.meta-lightbox-overlay {
background: #666;
@ -27,7 +27,7 @@ $grid-float-breakpoint-max: 576px;
}
&:hover {
color: $link-color;
color: $lightbox-link-hover-color;
opacity: 1;
background-color: rgba(0, 0, 0, 0.5);
}
@ -45,7 +45,7 @@ $grid-float-breakpoint-max: 576px;
height: 1.2em;
&:focus {
color: $link-color;
color: $lightbox-link-hover-color;
opacity: 1;
background-color: rgba(0, 0, 0, 0.5);
}
@ -64,7 +64,7 @@ $grid-float-breakpoint-max: 576px;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.4);
}
@media (max-width: $grid-float-breakpoint-max) {
@media (max-width: $lightbox-breakpoint) {
.meta-lightbox-wrap {
top: 5px !important;
bottom: 5px;