mirror of
https://github.com/a2nt/meta-lightbox.git
synced 2024-10-22 17:05:53 +02:00
Minor bugfixtures
This commit is contained in:
parent
3b2a504225
commit
d19033d8dc
@ -215,21 +215,19 @@
|
|||||||
src = '';
|
src = '';
|
||||||
classTerm = 'meta-lightbox-video';
|
classTerm = 'meta-lightbox-video';
|
||||||
|
|
||||||
if (video[1] == 'youtube') {
|
if (video[1] == 'youtube' || video[1] == 'youtu' || video[1] == 'youtube-nocookie') {
|
||||||
src = '//www.youtube.com/embed/' + video[4];
|
const YouTubeGetID = (url) => {
|
||||||
classTerm = 'meta-lightbox-youtube';
|
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];
|
||||||
if (video[1] == 'youtu') {
|
};
|
||||||
src = '//www.youtube.com/embed/' + video[3];
|
|
||||||
classTerm = 'meta-lightbox-youtube';
|
src = '//www.youtube-nocookie.com/embed/' + YouTubeGetID(href);
|
||||||
}
|
classTerm = classTerm + 'meta-lightbox-youtube';
|
||||||
if (video[1] == 'youtube-nocookie') {
|
|
||||||
src = '//www.youtube-nocookie.com/embed/' + video[4];
|
|
||||||
classTerm = 'nivo-lightbox-youtube';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (video[1] == 'vimeo') {
|
if (video[1] == 'vimeo') {
|
||||||
src = '//player.vimeo.com/video/' + video[3];
|
src = '//player.vimeo.com/video/' + video[3];
|
||||||
classTerm = 'meta-lightbox-vimeo';
|
classTerm = classTerm + 'meta-lightbox-vimeo';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (src) {
|
if (src) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
$link-color: #007bff;
|
$lightbox-link-hover-color: #007bff !default;
|
||||||
$grid-float-breakpoint-max: 576px;
|
$lightbox-breakpoint: 576px !default;
|
||||||
|
|
||||||
.meta-lightbox-theme-default.meta-lightbox-overlay {
|
.meta-lightbox-theme-default.meta-lightbox-overlay {
|
||||||
background: #666;
|
background: #666;
|
||||||
@ -27,7 +27,7 @@ $grid-float-breakpoint-max: 576px;
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $link-color;
|
color: $lightbox-link-hover-color;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ $grid-float-breakpoint-max: 576px;
|
|||||||
height: 1.2em;
|
height: 1.2em;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
color: $link-color;
|
color: $lightbox-link-hover-color;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
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);
|
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 {
|
.meta-lightbox-wrap {
|
||||||
top: 5px !important;
|
top: 5px !important;
|
||||||
bottom: 5px;
|
bottom: 5px;
|
||||||
|
Loading…
Reference in New Issue
Block a user