fixed video stuff

This commit is contained in:
Sid Alapati 2024-06-07 17:12:30 -04:00
parent 96ce0a69dc
commit 97ac9ac478
3 changed files with 17 additions and 79 deletions

View File

@ -37,7 +37,7 @@ gulp.task("scripts", function () {
// Images
gulp.task("images", function () {
return gulp
.src(["./images/**"], { removeBOM: false })
.src(["./images/**/*"], { removeBOM: false })
.pipe(gulp.dest("./dist/images"))
.pipe(connect.reload());
});
@ -45,16 +45,15 @@ gulp.task("images", function () {
// Fonts
gulp.task("fonts", function () {
return gulp
.src(["./fonts/**"], { removeBOM: false })
.src(["./fonts/**/*"], { removeBOM: false })
.pipe(gulp.dest("./dist/fonts"))
.pipe(connect.reload());
});
// Other useless content
gulp.task("other", function () {
return gulp
.src(["./other/**"], { removeBOM: false })
.src(["./other/**/*"], { removeBOM: false })
.pipe(gulp.dest("./dist/other"))
.pipe(connect.reload());
});
@ -93,7 +92,14 @@ gulp.task("clean", function () {
gulp.task(
"default",
gulp.series("clean", async function minifyAll() {
return gulp.parallel("styles", "scripts", "images", "html", "fonts")();
return gulp.parallel(
"styles",
"scripts",
"images",
"html",
"fonts",
"other"
)();
})
);
@ -114,6 +120,7 @@ gulp.task("watch", function () {
gulp.watch("./images/**/*", gulp.series("images"));
gulp.watch("./*.html", gulp.series("html"));
gulp.watch("./fonts/**/*", gulp.series("fonts"));
gulp.watch("./other/**/*", gulp.series("other"));
});
gulp.task("dev", gulp.series("default", gulp.parallel("connect", "watch")));

View File

@ -273,6 +273,7 @@
class="button-play"
href="other/Code Abode Intro.mp4"
data-lightgallery="item"
target="_blank"
>
<svg width="19" height="21" viewbox="0 0 19 21">
<path
@ -282,7 +283,7 @@
</a>
<img
class="box-shadow"
src="other/Code Abode Intro.mp4"
src="images/baby.jpg"
alt=""
width="660"
height="406"

View File

@ -422,76 +422,6 @@
}
};
/**
* @desc Initialize the gallery with set of images
* @param {object} itemsToInit - jQuery object
* @param {string} [addClass] - additional gallery class
*/
function initLightGallery(itemsToInit, addClass) {
if (!isNoviBuilder) {
$(itemsToInit).lightGallery({
thumbnail: $(itemsToInit).attr("data-lg-thumbnail") !== "false",
selector: "[data-lightgallery='item']",
autoplay: $(itemsToInit).attr("data-lg-autoplay") === "true",
pause:
parseInt($(itemsToInit).attr("data-lg-autoplay-delay")) || 5000,
addClass: addClass,
mode: $(itemsToInit).attr("data-lg-animation") || "lg-slide",
loop: $(itemsToInit).attr("data-lg-loop") !== "false",
});
}
}
/**
* @desc Initialize the gallery with dynamic addition of images
* @param {object} itemsToInit - jQuery object
* @param {string} [addClass] - additional gallery class
*/
function initDynamicLightGallery(itemsToInit, addClass) {
if (!isNoviBuilder) {
$(itemsToInit).on("click", function () {
$(itemsToInit).lightGallery({
thumbnail: $(itemsToInit).attr("data-lg-thumbnail") !== "false",
selector: "[data-lightgallery='item']",
autoplay: $(itemsToInit).attr("data-lg-autoplay") === "true",
pause:
parseInt($(itemsToInit).attr("data-lg-autoplay-delay")) || 5000,
addClass: addClass,
mode: $(itemsToInit).attr("data-lg-animation") || "lg-slide",
loop: $(itemsToInit).attr("data-lg-loop") !== "false",
dynamic: true,
dynamicEl:
JSON.parse($(itemsToInit).attr("data-lg-dynamic-elements")) || [],
});
});
}
}
/**
* @desc Initialize the gallery with one image
* @param {object} itemToInit - jQuery object
* @param {string} [addClass] - additional gallery class
*/
function initLightGalleryItem(itemToInit, addClass) {
if (!isNoviBuilder) {
$(itemToInit).lightGallery({
selector: "this",
addClass: addClass,
counter: false,
youtubePlayerParams: {
modestbranding: 1,
showinfo: 0,
rel: 0,
controls: 0,
},
vimeoPlayerParams: {
byline: 0,
portrait: 0,
},
});
}
}
// Google ReCaptcha
if (plugins.captcha.length) {
$.getScript(