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

View File

@ -273,6 +273,7 @@
class="button-play" class="button-play"
href="other/Code Abode Intro.mp4" href="other/Code Abode Intro.mp4"
data-lightgallery="item" data-lightgallery="item"
target="_blank"
> >
<svg width="19" height="21" viewbox="0 0 19 21"> <svg width="19" height="21" viewbox="0 0 19 21">
<path <path
@ -282,7 +283,7 @@
</a> </a>
<img <img
class="box-shadow" class="box-shadow"
src="other/Code Abode Intro.mp4" src="images/baby.jpg"
alt="" alt=""
width="660" width="660"
height="406" 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 // Google ReCaptcha
if (plugins.captcha.length) { if (plugins.captcha.length) {
$.getScript( $.getScript(