Viewing: frontend-layout-old.blade.php
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Evolve Publication</title> <link rel="stylesheet" type="text/css" href="{{asset('frontend/css/bootstrap.min.css')}}"> <link rel="stylesheet" type="text/css" href="{{asset('frontend/css/all.min.css')}}"> <link rel="stylesheet" type="text/css" href="{{asset('frontend/css/slick.css')}}"/> <link rel="stylesheet" type="text/css" href="{{asset('frontend/css/slick-theme.css')}}"> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css"> <link rel="stylesheet" type="text/css" href="{{asset('frontend/css/style.css')}}"> <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="icon" href="{{asset('assets/fav-icon.png')}}" type="image/png"> <script async src="https://www.googletagmanager.com/gtag/js?id=G-4F1Z0NQYS4"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-4F1Z0NQYS4'); </script> <!-- Meta Pixel Code --> <script> !function (f, b, e, v, n, t, s) { if (f.fbq) return; n = f.fbq = function () { n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments) }; if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; t = b.createElement(e); t.async = !0; t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s) }(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', '1461722807961897'); fbq('track', 'PageView'); </script> </head> <body> @php $config = general_configration() ?? '';@endphp @include('frontend.includes.header',['config'=> $config]) <main id="main"> @yield('content') </main> @include('frontend.includes.footer',['config'=> $config]) <script src="https://code.jquery.com/jquery-2.2.0.min.js" type="text/javascript"></script> <script type="text/javascript" src="{{asset('frontend/js/bootstrap.min.js')}}"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script> <script type="text/javascript" src="{{asset('frontend/js/slick.js')}}"></script> <script type="text/javascript"> $(document).on('ready', function() { $('.main_slider').slick({ infinite: true, slidesToShow: 1, slidesToScroll: 1, dots: false, arrows: true, asNavFor: '.slider-nav', prevArrow:"<button type='button' class='slick-prev pull-left'><i class='fa-solid fa-angle-left' aria-hidden='true'></i></button>", nextArrow:"<button type='button' class='slick-next pull-right'><i class='fa-solid fa-angle-right' aria-hidden='true'></i></button>" }); $('.slider-nav').slick({ slidesToShow: 4, slidesToScroll: 1, asNavFor: '.main_slider', dots: true, centerMode: false, focusOnSelect: true, responsive: [ { breakpoint: 600, settings: { slidesToShow: 1, slidesToScroll:1 , infinite: true, dots: true } }, ] }); $('.add_slider').slick({ infinite: true, slidesToShow: 1, slidesToScroll: 1, dots: false, arrows: false, autoplay: true, autoplaySpeed: 2000, }); }); </script> <script> $(document).ready(function() { $('.otp-input').on('input', function() { if ($(this).val().length > 1) { $(this).val($(this).val().charAt($(this).val().length - 1)); // Keep only the last character } if ($(this).val().length === 1) { $(this).next().focus(); } }); $('.otp-input').on('keydown', function(e) { if (e.key.length === 1 && e.key.match(/[^0-9]/)) { e.preventDefault(); // Prevent non-numeric characters } }); }); </script> <script type="text/javascript"> document.addEventListener('DOMContentLoaded',function(){ let body = $('body'); body.on('submit','#update-detail-form',function(event){ event.preventDefault(); let url = body.find(this).attr('action'); let formData = new FormData(this); if(formData && url){ $.ajax({ method: 'POST', url:url , // Update with your server route data: formData, headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, dataType:'json', processData: false, contentType: false, success: function (response) { if(response.current_password_error){ body.find('#current_password-error').html(response.current_password_error); } else{ alert('updated successfully'); window.location.reload(); } }, error: function (error) { let fieldNames = ['first_name', 'last_name','current_password','password','company']; fieldNames.forEach(function (fieldName) { if (error.responseJSON.errors && error.responseJSON.errors[fieldName]) { // Clear previous error messages for the specific field $('#' + fieldName + '-error').empty(); // Display the first error message for the specific field $('#' + fieldName + '-error').html(error.responseJSON.errors[fieldName][0]); } }); } }); } }); }); </script> <script type="text/javascript"> let handleRequest = (value)=> { if(value =='logout'){ document.getElementById('logout-form').submit(); } if(value =='dashboard'){ window.location.href = "{{url('/user/dashboard')}}" } } </script> <script> class TextToSpeech { static get isSupported() { return 'speechSynthesis' in window; } get paused() { return this.synth.paused } get speaking() { return this.synth.speaking } constructor(opts) { this.onVoicesChanged = opts?.onVoicesChanged || function () { }; this.onStatusChanged = opts?.onStatusChanged || function () { }; this.synth = speechSynthesis; this.synth.onvoiceschanged = () => { this.defaultVoice = this.getVoices().find(voice => voice.name === "Alex") || this.getVoices().find(voice => voice.name === "Microsoft Zira - English (United States)"); this.onVoicesChanged(); }; if (this.getVoices().length > 0) { this.defaultVoice = this.getVoices().find(voice => voice.name === "Alex") || this.getVoices().find(voice => voice.name === "Microsoft Zira - English (United States)"); this.onVoicesChanged(); } setTimeout(this.onStatusChanged); } getVoices() { return this.synth.getVoices(); } pause() { this.synth.pause(); } resume() { this.synth.resume(); } cancel() { this.synth.cancel(); this.onStatusChanged(); } speak({ voice, text, speed = 1, pitch = 1 }) { this.cancel(); const utter = new SpeechSynthesisUtterance(); utter.rate = speed; utter.pitch = pitch; utter.text = text; utter.lang = voice.lang; utter.voice = voice; utter.onend = this.onStatusChanged; utter.onpause = this.onStatusChanged; utter.onresume = this.onStatusChanged; utter.onstart = this.onStatusChanged; utter.onboundary = this.onStatusChanged; this.synth.speak(utter); } } var tts document.addEventListener("DOMContentLoaded", function () { const root = document.querySelector('#text-to-speech'); if (!TextToSpeech.isSupported) { root.textContent = "This browser doesn't support Text-To-Speech."; root.style.color = 'red'; return; } const comp = { richTextContent: root.querySelector('.description'), // Select the rich text container speak: root.querySelector('#speak'), pause: root.querySelector('#pause'), cancel: root.querySelector('#cancel'), }; tts = new TextToSpeech({ onVoicesChanged: () => { // Since we removed the voice selection, there's no need to update the voices. }, onStatusChanged: (event) => { comp.speak.disabled = tts.speaking; comp.cancel.disabled = !tts.speaking; comp.pause.disabled = !tts.speaking; comp.pause.innerHTML = tts.paused ? '<i class="fas fa-play"></i>' : '<i class="fas fa-pause-circle"></i>'; if (!tts.speaking) { comp.richTextContent.blur(); } if (event && event.name === 'word') { comp.richTextContent.focus(); // Implement your own logic for text selection within the rich text content here } }, }); comp.speak.onclick = () => { // Extract the text content from the rich text container const textToRead = comp.richTextContent.textContent; tts.speak({ voice: tts.defaultVoice, text: textToRead, // Pass the extracted text content here }); }; comp.pause.onclick = () => { if (tts.paused) tts.resume(); else tts.pause(); }; comp.cancel.onclick = () => { tts.cancel(); }; // tts.cancel(); comp.cancel.onload = () => { tts.cancel(); }; }); window.onbeforeunload = function(){ tts.cancel(); }; </script> @yield('script') <script> $('body').on('submit', '#inquiry-form', function (event) { event.preventDefault(); var formData = new FormData(this); var csrfToken = $('meta[name="csrf-token"]').attr('content'); // Get the CSRF token value $.ajax({ type: 'POST', url: "{{route('frontend.subscribe')}}", // Replace 'your.route.name' with the actual route name data: formData, processData: false, contentType: false, headers: { 'X-CSRF-TOKEN': csrfToken // Include the CSRF token in the headers }, success: function (data) { // Handle the success response here if(data.status == 200){ $('body').find('.news-letter').val(''); } }, error: function (xhr, status, error) { // Handle any errors here console.error(xhr.responseText); } }); }); </script> <script> let showModal = ()=> { $('body').find('#staticBackdrop').modal('show'); } </script> <script> $(document).ready(function() { var delay = 3000; // Select the alert by its class var $alert = $(".alert"); // Delay for a certain time and then fade out slowly setTimeout(function() { $alert.fadeOut('slow', function() { $alert.alert('close'); }); }, delay); }); </script> <script> var page = 2; var loading = false; var ajaxUrl = '{{url()->current()}}';//'/wisdom-talks'; // Initial URL $('#load-more-button').on('click', function() { if (loading) return; $('#load-more-button').html('Loading...'); $.get(ajaxUrl, { page: page }, function(data) { if (data.html != '') { $('#story-container').append(data.html); page++; $('#load-more-button').html('Load More'); } if(data.nextPage == null) { $('#load_more').hide(); } }).always(function() { loading = false; }); loading = true; }); </script> <script type="text/javascript"> let showVideoModal = (id) => { if (id !== null) { $.ajax({ url: '/fetch/ceo/video', method: 'GET', data: { id: id }, success: function (response) { let iframeHtml = response.videoUrl; let modalBody = $('#exampleModal .modal-body'); modalBody.html(iframeHtml); // Show the modal $('#exampleModal').modal('show'); }, error: function (error) { alert('An error occurred while fetching the video.'); console.error(error); } }); } }; </script> <!-- <script> $(document).ready(function(){ const firstReadMoreToggle = $("p.read-more-toggle:first"); firstReadMoreToggle.hide(); // Select the <p> tag with class "read-more-toggle" that follows the first one const nextReadMoreToggle = firstReadMoreToggle.next("p.read-more-toggle"); var maxLength = 50; $(".show-read-more").each(function(){ var myStr = $(this).text(); if($.trim(myStr).length > maxLength){ var newStr = myStr.substring(0, maxLength); var removedStr = myStr.substring(maxLength, $.trim(myStr).length); $(this).empty().html(newStr); $(this).append(' <a href="javascript:void(0);" class="read-more">read more...</a>'); $(this).append('<span class="more-text">' + removedStr + '</span>'); } }); $(".read-more").click(function(){ $(this).siblings(".more-text").contents().unwrap(); $(this).remove(); }); }); </script> --> <script> $('[data-fancybox="gallery"]').fancybox({ buttons: [ "slideShow", "thumbs", "zoom", "fullScreen", "share", "close" ], loop: false, protect: true }); </script> <script> $(document).ready(function () { // Initialize Fancybox $("[data-fancybox]").fancybox({ }); $(".more-button").on("click", function (e) { e.preventDefault(); const galleryKey = $(this).data("gallery-key"); // Open Fancybox for the corresponding gallery $("[data-fancybox=gallery_" + galleryKey + "]").eq(0).trigger("click"); }); }); </script> <script> $(document).ready(function () { // Initialize FancyBox for the entire gallery $(".image-gallery a").fancybox({ // Add any desired configuration options here buttons: [ "slideShow", "thumbs", "zoom", "fullScreen", "share", "close" ], loop: false, protect: true }); // Open the gallery when clicking the "View Gallery" button $("#view-gallery-button").on("click", function () { $(".image-gallery a:first").click(); // Open the first image }); }); </script> <script> $(document).ready(function() { // $('.readMoreBtn').click(function(e) { // e.preventDefault(); // $("p").slideToggle(); // }); $('.readMoreBtn').click(function(ev){ let target = ev.currentTarget.dataset.target; console.log(target); ev.currentTarget.style.display = "none"; $(target + ' .all').show(); $(target + ' .readLessBtn').show(); $(target + ' .short-desc').hide() }) $('.readLessBtn').click(function(ev){ let target = ev.currentTarget.dataset.target; console.log(target); ev.currentTarget.style.display = "none"; $(target + ' .all').hide(); $(target + ' .short-desc').show() $(target + ' .readMoreBtn').show() }) }); </script> </body> </html>
Return