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

rsvp-digital-card.blade.php 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. <div class="section bg-babyblue h-screen w-screen flex justify-center items-center">
  16. <div class="flex flex-col gap-3 w-4/5 z-10">
  17. <div class="flex justify-center">
  18. <p class="font-normal text-base text-navbarcolor uppercase">MAJLIS PERKAHWINAN ALIFF & AYUNA</p>
  19. </div>
  20. <div class="flex justify-center pt-8 pb-6">
  21. <img src="{{ asset('assets/logosmallest.png') }}" alt="Logo">
  22. </div>
  23. <div class="flex justify-center">
  24. <p class="font-normal text-2xl text-navbarcolor uppercase">RSVP</p>
  25. </div>
  26. <div class="flex justify-center">
  27. <form id="RSVPForm" class="flex flex-col gap-3">
  28. @csrf
  29. <label class="input input-sm input-bordered flex items-center gap-2">
  30. Name :
  31. <input type="text" name="name" class="grow"/>
  32. </label>
  33. <label class="input input-sm input-bordered flex items-center gap-2">
  34. Bilangan :
  35. <input type="number" name="member" class="grow"/>
  36. </label>
  37. <label class="input input-sm input-bordered flex items-center gap-2">
  38. No. Tel :
  39. <input type="number" name="phone" class="grow"/>
  40. </label>
  41. <button id="submitForm" class="bg-babybluedark rounded-lg py-2">Hantar</button>
  42. </form>
  43. </div>
  44. <div class="flex justify-center pt-2">
  45. <a onclick="contact.showModal()" class="bg-white rounded-full py-3 px-4 text-navbarcolor">
  46. <i class="fa-solid fa-phone"></i>
  47. </a>
  48. @include('modals.contact-modal')
  49. </div>
  50. </div>
  51. <img src="{{asset('assets/flower-left.png')}}" alt="" class="fixed -left-3/4 top-28">
  52. <img src="{{asset('assets/flower-right.png')}}" alt="" class="fixed -right-3/4 top-8">
  53. </div>
  54. <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  55. <script>
  56. $(document).ready(function() {
  57. $('#submitForm').click(function(e) {
  58. e.preventDefault();
  59. var formData = $('#RSVPForm').serialize();
  60. $.ajax({
  61. url: '{{ route('rsvp.save') }}',
  62. type: 'POST',
  63. data: formData,
  64. success: function(response) {
  65. if ('{{ session('success') }}') {
  66. showSuccessMessage('{{ session('success') }}');
  67. }
  68. $('#RSVPForm')[0].reset();
  69. },
  70. error: function(xhr, status, error) {
  71. console.error('Error submitting form:', error);
  72. }
  73. });
  74. });
  75. function showSuccessMessage(message) {
  76. // Create a dynamic success message element
  77. var successAlert = $('<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative" role="alert">' +
  78. '<span class="block sm:inline">' + message + '</span>' +
  79. '</div>');
  80. // Append the message to a suitable container in your HTML (e.g., modal, form, or body)
  81. $('#alert-success').append(successAlert);
  82. // Automatically remove the message after 3 seconds
  83. setTimeout(function() {
  84. successAlert.fadeOut('slow', function() {
  85. $(this).remove();
  86. });
  87. }, 3000); // 3 seconds
  88. }
  89. });
  90. </script>
  91. </body>
  92. </html>