<!doctype html>
<html lang="hu">

<head>

  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  <meta name="description" content="@yield('meta_description', 'Default description')">
  <meta name="keywords" content="@yield('meta_keywords', 'default, keywords')">
  <title>@yield('title', 'Doma - Kapu Tech')</title>

  <link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
  <!-- Font Awesome icons (free version)-->
  <script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
  <!-- Google fonts-->
  {{-- <link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet" />
  <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet" /> --}}

  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">

  {{-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> --}}
  {{-- @vite('resources/css/app.css') --}}
  @vite(['resources/sass/app.scss'])

  <script src="https://www.google.com/recaptcha/api.js?render={{ env('GOOGLE_RECAPTCHA_KEY') }}"></script>
  <!-- Google tag (gtag.js) -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=G-JYWXBYFMCV"></script>
  <script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
      dataLayer.push(arguments);
    }
    gtag('js', new Date());

    gtag('config', 'G-JYWXBYFMCV');
  </script>
</head>

<body id="page-top">
  {{-- Navbar Start --}}
  <!-- Navigation-->
  <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
    <div class="container px-4 px-lg-5">
      <a class="navbar-brand" href="/">
        <img src="{{asset('assets/img/logo-white.png')}}" alt="doma-kaputech" srcset="" style="height: 75px; width: 150px;">
      </a>
      <button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
        <i class="fas fa-bars"></i>
      </button>
      <div class="collapse navbar-collapse" id="navbarResponsive">
        <ul class="navbar-nav ms-auto">
          <li class="nav-item"><a class="nav-link" href="/garazskapu">Garázskapu</a></li>
          <li class="nav-item"><a class="nav-link" href="/pergola">Pergola</a></li>
          <li class="nav-item"><a class="nav-link" href="/kertkapu">Kertkapu</a></li>
          <li class="nav-item"><a class="nav-link" href="/kertibutor">Kerti bútorok</a></li>
          <li class="nav-item"><a class="nav-link" href="/kapcsolat">Kapcsolat</a></li>
        </ul>
      </div>
    </div>
  </nav>
  {{-- Navbar END --}}


  @yield('content')


  {{-- Footer Start --}}
  <footer class="footer bg-black small text-center text-white-50">
    <div class="container px-4 px-lg-5">Szerzői jogok &copy; Doma Kapu-Tech {{ date('Y')}}</div>
  </footer>
  {{-- Footer End --}}

  {{-- Scripts --}}
  @vite(['resources/js/app.js'])

  @if(Session::get('success') || Session::get('error'))
  <script type="module">
    $('html, body').animate({
      scrollTop: $("#submitButton").offset().top
    }, 1000);

    // window.setTimeout(function(){
    //     $('#successMessage').hide().next('#success').show();
    // }, 1500);
  </script>
  @endif


  <script type="text/javascript">
    document.addEventListener('DOMContentLoaded', function() {
      $('#contactForm').submit(function(event) {
        event.preventDefault();

        grecaptcha.ready(function() {
          grecaptcha.execute("{{ env('GOOGLE_RECAPTCHA_KEY') }}", {
            action: 'subscribe_newsletter'
          }).then(function(token) {
            $('#contactForm').prepend('<input type="hidden" name="g-recaptcha-response" value="' + token + '">');
            $('#contactForm').unbind('submit').submit();
          });;
        });
      });
    }, false);
  </script>

</body>

</html>