WIP: Enabled metronic frontend
This commit is contained in:
BIN
public/theme/frontend/metronic/pages/img/fa-angles.png
Normal file
BIN
public/theme/frontend/metronic/pages/img/fa-angles.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
54
public/theme/frontend/metronic/pages/js/bs-carousel.js
vendored
Normal file
54
public/theme/frontend/metronic/pages/js/bs-carousel.js
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
var BsCarousel = function () {
|
||||
// Carousel interval
|
||||
// $('.carousel').carousel({
|
||||
// interval: 1000
|
||||
// });
|
||||
|
||||
// smart height detection for all major screens
|
||||
// if (Layout.getViewPort().width > 1600) {
|
||||
// height = $(window).height() - $('.subscribe').outerHeight(); // full height for high resolution
|
||||
// } else if (Layout.getViewPort().height > height) {
|
||||
// height = Layout.getViewPort().height;
|
||||
// }
|
||||
|
||||
(function( $ ) {
|
||||
//Function to animate slider captions
|
||||
function doAnimations( elems ) {
|
||||
//Cache the animationend event in a variable
|
||||
var animEndEv = 'webkitAnimationEnd animationend';
|
||||
|
||||
elems.each(function () {
|
||||
var $this = $(this),
|
||||
$animationType = $this.data('animation');
|
||||
$this.addClass($animationType).one(animEndEv, function () {
|
||||
$this.removeClass($animationType);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//Variables on page load
|
||||
var $myCarousel = $('#carousel-example-generic'),
|
||||
$firstAnimatingElems = $myCarousel.find('.item:first').find("[data-animation ^= 'animated']");
|
||||
|
||||
//Initialize carousel
|
||||
$myCarousel.carousel({
|
||||
loop:true,
|
||||
autoplay:true,
|
||||
autoplayTimeout:1000,
|
||||
autoplayHoverPause:true,
|
||||
});
|
||||
|
||||
//Animate captions in first slide on page load
|
||||
doAnimations($firstAnimatingElems);
|
||||
|
||||
//Pause carousel
|
||||
//$myCarousel.carousel('pause');
|
||||
|
||||
//Other slides to be animated on carousel slide event
|
||||
$myCarousel.on('slide.bs.carousel', function (e) {
|
||||
var $animatingElems = $(e.relatedTarget).find("[data-animation ^= 'animated']");
|
||||
doAnimations($animatingElems);
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
}();
|
Reference in New Issue
Block a user