app.min.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. ! function (n, t, e) {
  2. console.log("init");
  3. var o = {
  4. init: function (e) {
  5. o.select2(), o.stellar(), o.carousel(), o.portfolio(), o.lightCase(), o.sideNav(), o.counter(), o.skills(), o.aos(), o.navbarChange()
  6. },
  7. select2: function () {
  8. n(e).ready(function () {
  9. n("select").select2()
  10. })
  11. },
  12. stellar: function () {
  13. var e = n(t).width();
  14. 767 <= e && (n(".bg-fixed").attr("data-stellar-background-ratio", "0.8"), n.stellar({
  15. horizontalScrolling: !1,
  16. responsive: !0,
  17. parallaxBackgrounds: !0,
  18. scrollProperty: "scroll"
  19. }))
  20. },
  21. carousel: function () {
  22. n(".testi-carousel").owlCarousel({
  23. loop: !0,
  24. margin: 10,
  25. autoplay: !0,
  26. nav: !1,
  27. dots: !0,
  28. dotSpeed: 1e3,
  29. autoplay: !0,
  30. autoplaySpeed: 1e3,
  31. items: 1
  32. }), n(".client-slider").owlCarousel({
  33. loop: !0,
  34. margin: 10,
  35. nav: !0,
  36. navSpeed: 1e3,
  37. dots: !1,
  38. autoplay: !0,
  39. autoplaySpeed: 1e3,
  40. navText: ['<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>'],
  41. responsive: {
  42. 0: {
  43. items: 1
  44. },
  45. 600: {
  46. items: 3
  47. },
  48. 1e3: {
  49. items: 6
  50. }
  51. }
  52. })
  53. },
  54. portfolio: function () {
  55. var t = n(".grid-portfolio").isotope({
  56. itemSelector: ".grid-item",
  57. masonry: {
  58. gutter: ".gutter-sizer",
  59. columnWidth: ".grid-sizer"
  60. },
  61. percentPosition: !0
  62. });
  63. return n(".filter-button-group").on("click", "a", function () {
  64. var e = n(this).attr("data-filter");
  65. t.isotope({
  66. filter: e
  67. })
  68. }), n(".btn-filter a.is-checked").addClass("active"), n(".btn-filter a").on("click", function () {
  69. n(".btn-filter a").removeClass("active"), n(this).addClass("active")
  70. }), !1
  71. },
  72. lightCase: function () {
  73. jQuery(e).ready(function (e) {
  74. e("a[data-rel^=lightcase]").lightcase()
  75. })
  76. },
  77. sideNav: function () {
  78. n("#side-nav-open").click(function () {
  79. n("#side-nav").css("width", "300"), setTimeout(function () {
  80. n("body").addClass("sidenav-open")
  81. }, 200), setTimeout(function () {
  82. n("body").addClass("in")
  83. }, 400)
  84. }), n("#side-nav-close, #canvas-overlay").click(function () {
  85. setTimeout(function () {
  86. n("body").removeClass("in")
  87. }, 200), setTimeout(function () {
  88. n("body").removeClass("sidenav-open"), n("#side-nav").css("width", "0")
  89. }, 400)
  90. }), n("#side-search-open").click(function () {
  91. n("#side-search").css("width", "300"), setTimeout(function () {
  92. n("body").addClass("sidesearch-open")
  93. }, 200), setTimeout(function () {
  94. n("body").addClass("in")
  95. }, 300)
  96. }), n("#side-search-close, #canvas-overlay").click(function () {
  97. setTimeout(function () {
  98. n("body").removeClass("in")
  99. }, 200), setTimeout(function () {
  100. n("body").removeClass("sidesearch-open"), n("#side-search").css("width", "0")
  101. }, 300)
  102. })
  103. },
  104. counter: function () {
  105. n("#counter").each(function () {
  106. n(this).waypoint({
  107. handler: function (e) {
  108. n(".number").countTo({
  109. speed: 1e3
  110. }), this.destroy()
  111. },
  112. offset: "80%"
  113. })
  114. })
  115. },
  116. skills: function () {
  117. n("#skills").each(function () {
  118. return n(this).waypoint({
  119. handler: function (e) {
  120. n(".progress").each(function () {
  121. console.log(n(this).attr("data-percent")), n(this).find(".progress-bar").delay(1e4).css({
  122. width: n(this).attr("data-percent")
  123. })
  124. })
  125. },
  126. offset: "80%"
  127. }), !1
  128. })
  129. },
  130. aos: function () {
  131. AOS.init({
  132. once: !0
  133. })
  134. },
  135. navbarChange: function () {
  136. n(t).scroll(function () {
  137. var e = n(t).scrollTop();
  138. return 150 < e ? (n("#header-navbar").removeClass("navbar-transparent"), n("body").addClass("not-on-top")) : (n("body").removeClass("not-on-top"), n("#header-navbar").addClass("navbar-transparent")), !1
  139. })
  140. }
  141. };
  142. n(e).ready(function () {
  143. o.init(n)
  144. })
  145. }(window.jQuery, window, document);