Wedding Invitation
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

rsvp-digital-card.blade.php 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>{{config('app.name')}}</title>
  8. <link rel="preconnect" href="https://fonts.bunny.net">
  9. <link href="https://fonts.bunny.net/css?family=figtree:400,600&display=swap" rel="stylesheet" />
  10. <link href="https://cdn.jsdelivr.net/npm/daisyui@4.12.10/dist/full.min.css" rel="stylesheet" type="text/css" />
  11. <meta name="csrf-token" content="{{ csrf_token() }}">
  12. @vite(['resources/css/app.css'])
  13. </head>
  14. <body class="antialiased font-serif">
  15. <audio id="player" autoplay loop>
  16. <source src="{{'assets/background-music.mp3'}}" type="audio/mp3">
  17. </audio>
  18. <div class="section bg-babyblue h-screen w-screen flex justify-center items-center">
  19. <div class="flex flex-col gap-3 w-4/5 z-10">
  20. <div class="flex justify-center">
  21. <p class="font-normal text-base text-navbarcolor uppercase">MAJLIS PERKAHWINAN ALIFF & AYUNA</p>
  22. </div>
  23. <div class="flex justify-center pt-8 pb-6">
  24. <img src="{{ asset('assets/logosmallest.png') }}" alt="Logo">
  25. </div>
  26. <div class="flex justify-center">
  27. <p class="font-normal text-2xl text-navbarcolor uppercase">RSVP</p>
  28. </div>
  29. <div class="flex justify-center">
  30. <form id="RSVPForm" class="flex flex-col gap-3">
  31. @csrf
  32. <label class="input input-sm input-bordered flex items-center gap-2">
  33. Name :
  34. <input type="text" name="name" class="grow"/>
  35. </label>
  36. <label class="input input-sm input-bordered flex items-center gap-2">
  37. Bilangan :
  38. <input type="number" name="member" class="grow"/>
  39. </label>
  40. <label class="input input-sm input-bordered flex items-center gap-2">
  41. No. Tel :
  42. <input type="number" name="phone" class="grow"/>
  43. </label>
  44. <button id="submitForm" class="bg-babybluedark rounded-lg py-2">Hantar</button>
  45. </form>
  46. </div>
  47. <div class="flex justify-center pt-2">
  48. <a onclick="contact.showModal()" class="bg-white rounded-full py-3 px-4 text-navbarcolor">
  49. <i class="fa-solid fa-phone"></i>
  50. </a>
  51. @include('modals.contact-modal')
  52. </div>
  53. </div>
  54. <img src="{{asset('assets/flower-left.png')}}" alt="" class="fixed -left-3/4 top-28">
  55. <img src="{{asset('assets/flower-right.png')}}" alt="" class="fixed -right-3/4 top-8">
  56. </div>
  57. <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  58. <script>
  59. $(document).ready(function() {
  60. $('#submitForm').click(function(e) {
  61. e.preventDefault();
  62. var formData = $('#RSVPForm').serialize();
  63. $.ajax({
  64. url: '{{ route('rsvp.save') }}',
  65. type: 'POST',
  66. data: formData,
  67. success: function(response) {
  68. if ('{{ session('success') }}') {
  69. showSuccessMessage('{{ session('success') }}');
  70. }
  71. $('#RSVPForm')[0].reset();
  72. },
  73. error: function(xhr, status, error) {
  74. console.error('Error submitting form:', error);
  75. }
  76. });
  77. });
  78. function showSuccessMessage(message) {
  79. // Create a dynamic success message element
  80. var successAlert = $('<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative" role="alert">' +
  81. '<span class="block sm:inline">' + message + '</span>' +
  82. '</div>');
  83. // Append the message to a suitable container in your HTML (e.g., modal, form, or body)
  84. $('#alert-success').append(successAlert);
  85. // Automatically remove the message after 3 seconds
  86. setTimeout(function() {
  87. successAlert.fadeOut('slow', function() {
  88. $(this).remove();
  89. });
  90. }, 3000); // 3 seconds
  91. }
  92. });
  93. </script>
  94. </body>
  95. </html>