Advertisement
vitareinforce

swiper

Jan 19th, 2023
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.87 KB | None | 0 0
  1. @extends('layouts.template.website')
  2.  
  3. @section('css')
  4. <link href="/css/swiper-gl.min.css" />
  5. @endsection
  6.  
  7. @section('title')
  8. Homepage
  9. @endsection
  10.  
  11. @section('content')
  12. <div id="home">
  13. <div id="home-intro">
  14. <div class="row">
  15. <div class="col-lg-8">
  16. <div class="header">{!! $home->jumbotron_header !!}</div>
  17. <div class="sub-header">{!! $home->jumbotron_sub_header !!}</div>
  18. <button class="btn btn-default">About Us <i class="fa-regular fa-arrow-alt-circle-right"></i></button>
  19. </div>
  20. <div class="col-lg-4">
  21. <img class="img-fluid" src="/img/logo_clip.png" />
  22. </div>
  23. </div>
  24. </div>
  25. <div id="home-insights">
  26. <div class="container-fluid">
  27. <div class="row">
  28. <div class="col-lg-4">
  29. <h1><b>Insights</b> from Us</h1>
  30. <hr />
  31. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="row">
  36. <div class="col-lg-9">
  37. <div class="row">
  38. @foreach($insights as $n)
  39. <div id="insight-col-{{ $loop->index + 1 }}" class="col-lg-4 {{ $loop->index + 1 }}">
  40. <img id="insight-img-{{ $loop->index + 1 }}" class="img-fluid insights {{ $loop->index + 1 }} shadow" src="{{ env('APP_CMS_URL', 'http://localhost') }}/foto/{{ $n->foto }}" />
  41. <div id="insight-desc-{{ $loop->index + 1 }}" class="description {{ $loop->index + 1 }}">
  42. <h3>{{ $n->judul }}</h3>
  43. <a href="{{ route('insight.detail', $n->id) }}" target="_tab">{{ Str::limit($n->deskripsi, 250) }}</a>
  44. </div>
  45. </div>
  46. @endforeach
  47. </div>
  48. </div>
  49. <div class="col-lg-3">
  50. <a href="{{ route('insight.index') }}" target="_tab" class="btn btn-default">More Insights <i class="fa-regular fa-arrow-alt-circle-right"></i></a>
  51. </div>
  52. </div>
  53. </div>
  54. <div id="home-business">
  55. <div class="row">
  56. <div class="col-lg-6">
  57. <h1>
  58. <b>Business</b>
  59. <span>Needs</span>
  60. </h1>
  61. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sodales porttitor volutpat. Donec urna nunc, iaculis sed iaculis ac, sagittis pretium risus. Ut vitae rhoncus libero. Quisque vitae dignissim odio, non rutrum libero.<p>
  62. <label>Have any Needs in your businness?</label>
  63. <br />
  64. <a href="{{ route('solution.index', 'Business') }}" class="btn btn-default">Let's discuss <i class="fa-regular fa-arrow-alt-circle-right"></i></a>
  65. </div>
  66. <div class="col-lg-6">
  67. <h1>
  68. <b>Personal</b>
  69. <span>Needs</span>
  70. </h1>
  71. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sodales porttitor volutpat. Donec urna nunc, iaculis sed iaculis ac, sagittis pretium risus. Ut vitae rhoncus libero. Quisque vitae dignissim odio, non rutrum libero.<p>
  72. <label>Have any Needs in your personal?</label>
  73. <br />
  74. <a href="{{ route('solution.index', 'Personal') }}" class="btn btn-default">Let's discuss <i class="fa-regular fa-arrow-alt-circle-right"></i></a>
  75. </div>
  76. </div>
  77. </div>
  78. <div id="home-clients">
  79. <div class="container-fluid">
  80. <div class="row">
  81. <div class="col-lg-5">
  82. <h1>Our <b>Clients</b></h1>
  83. <hr />
  84. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="swiper clients">
  89. <div class="swiper-wrapper">
  90. @foreach($solutions as $s)
  91. <div class="swiper-slide">
  92. <div class="swiper-slide-content">
  93. <img class="swiper-slide-image swiper-gl-image" data-swiper-parallax="10%" src="{{ env('APP_CMS_URL', 'http://localhost') }}/foto/{{ $s->foto }}" />
  94. <div class="swiper-description animate__animated animate__zoomIn">
  95. <div class="swiper-slide-title" data-swiper-parallax="20%">{{ $s->judul }}</div>
  96. <div class="swiper-slide-text" data-swiper-parallax="-23%">
  97. {{ $s->deskripsi }}
  98. </div>
  99. <a class="swiper-description-expand" onclick="$('.swiper-description').css('height', '100%');">Read more...</a>
  100. </div>
  101.  
  102. </div>
  103. </div>
  104. @endforeach
  105. </div>
  106.  
  107. <div class="swiper-pagination"></div>
  108.  
  109. <div class="swiper-button-prev"></div>
  110. <div class="swiper-button-next"></div>
  111. </div>
  112. </div>
  113. <div id="home-form">
  114. <form id="contact-us" class="container">
  115. <div class="header-form">
  116. <h1>It starts with a meaningful <b>Conversation</b></h1>
  117. <hr />
  118. <p>a person, company, etc, that seeks the advice of a professional man or woman. a customer.</p>
  119. </div>
  120. <div class="form-group">
  121. <label class="form-label">Name</label>
  122. <input class="form-control" type="text" id="name" name="name" />
  123. </div>
  124. <div class="form-group">
  125. <label class="form-label">E-mail</label>
  126. <input class="form-control" type="email" id="email" name="email" />
  127. </div>
  128. <div class="form-group">
  129. <label class="form-label">Message</label>
  130. <textarea class="form-control" id="message" name="message" rows="7"></textarea>
  131. </div>
  132. <button type="submit" class="btn btn-default">Let's Talk <i class="fa-regular fa-arrow-alt-circle-right"></i></button>
  133. </form>
  134. </div>
  135. </div>
  136. @endsection
  137.  
  138. @section('js')
  139. <script src="/js/swiper-gl.min.js"></script>
  140. <script>
  141. $(document).ready(function() {
  142. $('#insight-img-1').mouseenter(function() {
  143. console.log(1);
  144. $('#insight-img-1').css('filter', 'brightness(50%)');
  145. $('#insight-desc-1').css('display', 'block');
  146. });
  147. $('#insight-img-1').mouseleave(function() {
  148. $('#insight-img-1').css('filter', 'brightness(100%)');
  149. $('#insight-desc-1').css('display', 'none');
  150. $('#insight-desc-1').mouseenter(function() {
  151. $('#insight-img-1').css('filter', 'brightness(50%)');
  152. $('#insight-desc-1').css('display', 'block');
  153. });
  154. $('#insight-desc-1').mouseleave(function() {
  155. $('#insight-img-1').css('filter', 'brightness(100%)');
  156. $('#insight-desc-1').css('display', 'none');
  157. });
  158. });
  159.  
  160. $('#insight-img-2').mouseenter(function() {
  161. console.log(2);
  162. $('#insight-img-2').css('filter', 'brightness(50%)');
  163. $('#insight-desc-2').css('display', 'block');
  164. });
  165. $('#insight-img-2').mouseleave(function() {
  166. $('#insight-img-2').css('filter', 'brightness(100%)');
  167. $('#insight-desc-2').css('display', 'none');
  168. $('#insight-desc-2').mouseenter(function() {
  169. $('#insight-img-2').css('filter', 'brightness(50%)');
  170. $('#insight-desc-2').css('display', 'block');
  171. });
  172. $('#insight-desc-2').mouseleave(function() {
  173. $('#insight-img-2').css('filter', 'brightness(100%)');
  174. $('#insight-desc-2').css('display', 'none');
  175. });
  176. });
  177.  
  178. $('#insight-img-3').mouseenter(function() {
  179. console.log(3);
  180. $('#insight-img-3').css('filter', 'brightness(50%)');
  181. $('#insight-desc-3').css('display', 'block');
  182. });
  183. $('#insight-img-3').mouseleave(function() {
  184. $('#insight-img-3').css('filter', 'brightness(100%)');
  185. $('#insight-desc-3').css('display', 'none');
  186. $('#insight-desc-3').mouseenter(function() {
  187. $('#insight-img-3').css('filter', 'brightness(50%)');
  188. $('#insight-desc-3').css('display', 'block');
  189. });
  190. $('#insight-desc-3').mouseleave(function() {
  191. $('#insight-img-3').css('filter', 'brightness(100%)');
  192. $('#insight-desc-3').css('display', 'none');
  193. });
  194. });
  195. var swiper = new Swiper(".swiper.clients", {
  196. modules: [SwiperGL],
  197. effect: "gl",
  198. gl: { shader: "flyeye" },
  199. centeredSlides: true,
  200. autoplay: {
  201. enabled: true,
  202. disableOnInteraction: false
  203. },
  204. loop: true,
  205. speed: 3000,
  206. spaceBetween: 0,
  207. navigation: {
  208. prevEl: ".swiper-button-prev",
  209. nextEl: ".swiper-button-next",
  210. },
  211. pagination: {zclickable: true, el: ".swiper-pagination" },
  212. keyboard: { enabled: true },
  213. parallax: { enabled: true },
  214. });
  215. $('.swiper.clients').on('mouseenter', function(e){
  216. swiper.autoplay.stop();
  217. })
  218. $('.swiper.clients').on('mouseleave', function(e){
  219. swiper.autoplay.start();
  220. $('.swiper-description').css('height', 'auto');
  221. })
  222. });
  223. </script>
  224. @endsection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement