Wedding Invitation
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

calendar-modal.blade.php 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <dialog id="calendar" class="modal">
  2. <div class="modal-box w-11/12 max-w-5xl">
  3. <h3 class="text-lg font-bold">Kalendar</h3>
  4. <div class="flex items-center justify-center py-8 px-4">
  5. <div class="max-w-sm w-full shadow-lg">
  6. <div class="md:p-8 p-5 bg-babyblue rounded-t">
  7. <div class="flex items-center justify-center">
  8. <span tabindex="0" class="focus:outline-none text-base font-bold text-gray-800">August 2024</span>
  9. </div>
  10. <div class="flex items-center justify-between pt-12 overflow-x-auto">
  11. <table class="w-full">
  12. <thead>
  13. <tr>
  14. <th>
  15. <div class="w-full flex justify-center">
  16. <p class="text-base font-medium text-center text-gray-800">Mo</p>
  17. </div>
  18. </th>
  19. <th>
  20. <div class="w-full flex justify-center">
  21. <p class="text-base font-medium text-center text-gray-800">Tu</p>
  22. </div>
  23. </th>
  24. <th>
  25. <div class="w-full flex justify-center">
  26. <p class="text-base font-medium text-center text-gray-800">We</p>
  27. </div>
  28. </th>
  29. <th>
  30. <div class="w-full flex justify-center">
  31. <p class="text-base font-medium text-center text-gray-800">Th</p>
  32. </div>
  33. </th>
  34. <th>
  35. <div class="w-full flex justify-center">
  36. <p class="text-base font-medium text-center text-gray-800">Fr</p>
  37. </div>
  38. </th>
  39. <th>
  40. <div class="w-full flex justify-center">
  41. <p class="text-base font-medium text-center text-gray-800">Sa</p>
  42. </div>
  43. </th>
  44. <th>
  45. <div class="w-full flex justify-center">
  46. <p class="text-base font-medium text-center text-gray-800">Su</p>
  47. </div>
  48. </th>
  49. </tr>
  50. </thead>
  51. <tbody>
  52. <tr>
  53. <td class="pt-6">
  54. <div class="px-2 py-2 cursor-pointer flex w-full justify-center"></div>
  55. </td>
  56. <td class="pt-6">
  57. <div class="px-2 py-2 cursor-pointer flex w-full justify-center"></div>
  58. </td>
  59. <td>
  60. <div class="px-2 py-2 cursor-pointer flex w-full justify-center"></div>
  61. </td>
  62. <td class="pt-6">
  63. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  64. <p class="text-base text-gray-500 font-medium">1</p>
  65. </div>
  66. </td>
  67. <td class="pt-6">
  68. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  69. <p class="text-base text-gray-500 font-medium">2</p>
  70. </div>
  71. </td>
  72. <td class="pt-6">
  73. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  74. <p class="text-base text-gray-500">3</p>
  75. </div>
  76. </td>
  77. <td class="pt-6">
  78. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  79. <p class="text-base text-gray-500">4</p>
  80. </div>
  81. </td>
  82. </tr>
  83. <tr>
  84. <td>
  85. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  86. <p class="text-base text-gray-500 font-medium">5</p>
  87. </div>
  88. </td>
  89. <td>
  90. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  91. <p class="text-base text-gray-500 font-medium">6</p>
  92. </div>
  93. </td>
  94. <td>
  95. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  96. <p class="text-base text-gray-500 font-medium">7</p>
  97. </div>
  98. </td>
  99. <td>
  100. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  101. <p class="text-base text-gray-500 font-medium">8</p>
  102. </div>
  103. </td>
  104. <td>
  105. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  106. <p class="text-base text-gray-500 font-medium">9</p>
  107. </div>
  108. </td>
  109. <td>
  110. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  111. <p class="text-base text-gray-500">10</p>
  112. </div>
  113. </td>
  114. <td>
  115. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  116. <p class="text-base text-gray-500">11</p>
  117. </div>
  118. </td>
  119. </tr>
  120. <tr>
  121. <td>
  122. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  123. <p class="text-base text-gray-500 font-medium">12</p>
  124. </div>
  125. </td>
  126. <td>
  127. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  128. <p class="text-base text-gray-500 font-medium">13</p>
  129. </div>
  130. </td>
  131. <td>
  132. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  133. <p class="text-base text-gray-500 font-medium">14</p>
  134. </div>
  135. </td>
  136. <td>
  137. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  138. <p class="text-base text-gray-500 font-medium">15</p>
  139. </div>
  140. </td>
  141. <td>
  142. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  143. <p class="text-base text-gray-500 font-medium">16</p>
  144. </div>
  145. </td>
  146. <td>
  147. <div class="w-full h-full">
  148. <div class="flex items-center justify-center w-full rounded-full cursor-pointer">
  149. <a role="link" tabindex="0" class="focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-700 focus:bg-indigo-500 hover:bg-indigo-500 text-base w-8 h-8 flex items-center justify-center font-medium text-white bg-indigo-700 rounded-full">17</a>
  150. </div>
  151. </div>
  152. </td>
  153. <td>
  154. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  155. <p class="text-base text-gray-500">18</p>
  156. </div>
  157. </td>
  158. </tr>
  159. <tr>
  160. <td>
  161. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  162. <p class="text-base text-gray-500 font-medium">19</p>
  163. </div>
  164. </td>
  165. <td>
  166. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  167. <p class="text-base text-gray-500 font-medium">20</p>
  168. </div>
  169. </td>
  170. <td>
  171. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  172. <p class="text-base text-gray-500 font-medium">21</p>
  173. </div>
  174. </td>
  175. <td>
  176. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  177. <p class="text-base text-gray-500 font-medium">22</p>
  178. </div>
  179. </td>
  180. <td>
  181. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  182. <p class="text-base text-gray-500 font-medium">23</p>
  183. </div>
  184. </td>
  185. <td>
  186. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  187. <p class="text-base text-gray-500">24</p>
  188. </div>
  189. </td>
  190. <td>
  191. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  192. <p class="text-base text-gray-500">25</p>
  193. </div>
  194. </td>
  195. </tr>
  196. <tr>
  197. <td>
  198. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  199. <p class="text-base text-gray-500 font-medium">26</p>
  200. </div>
  201. </td>
  202. <td>
  203. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  204. <p class="text-base text-gray-500 font-medium">27</p>
  205. </div>
  206. </td>
  207. <td>
  208. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  209. <p class="text-base text-gray-500 font-medium">28</p>
  210. </div>
  211. </td>
  212. <td>
  213. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  214. <p class="text-base text-gray-500 font-medium">29</p>
  215. </div>
  216. </td>
  217. <td>
  218. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  219. <p class="text-base text-gray-500 font-medium">30</p>
  220. </div>
  221. </td>
  222. <td>
  223. <div class="px-2 py-2 cursor-pointer flex w-full justify-center">
  224. <p class="text-base text-gray-500">31</p>
  225. </div>
  226. </td>
  227. </tr>
  228. </tbody>
  229. </table>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. <div class="modal-action">
  235. <form method="dialog" id="closeCalendarForm"></form>
  236. <button type="button" class="btn bg-babybluedark" id="saveDate">Simpan</button>
  237. <button type="button" class="btn" id="submitCloseCalendarForm">Tutup</button>
  238. </div>
  239. </div>
  240. </dialog>
  241. @push('script')
  242. <script>
  243. $(document).ready(function() {
  244. $('#submitCloseCalendarForm').click(function(e) {
  245. $('#closeCalendarForm').submit();
  246. });
  247. });
  248. </script>
  249. <script>
  250. function getMobileOperatingSystem() {
  251. var userAgent = navigator.userAgent || navigator.vendor || window.opera;
  252. if (/windows phone/i.test(userAgent)) {
  253. return "Windows Phone";
  254. }
  255. if (/android/i.test(userAgent)) {
  256. return "Android";
  257. }
  258. if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
  259. return "iOS";
  260. }
  261. return "unknown";
  262. }
  263. document.getElementById('saveDate').addEventListener('click', function () {
  264. const os = getMobileOperatingSystem();
  265. console.log("Operating System: " + os);
  266. const title = 'Majlis Perkahwinan Aliff & Ayuna';
  267. const startDate = '20240817T110000';
  268. const endDate = '20240817T160000';
  269. const details = 'Majlis Resepsi Perkawinan Aliff & Ayuna';
  270. const location = 'Dewan Jubli Perak Sultan Haji Ahmad Shah, Jalan Teluk Sisek, Kuantan, Pahang';
  271. if (os === 'iOS') {
  272. const icsContent = `BEGIN:VCALENDAR
  273. VERSION:2.0
  274. BEGIN:VEVENT
  275. SUMMARY:${title}
  276. DTSTART:${startDate}
  277. DTEND:${endDate}
  278. DESCRIPTION:${details}
  279. LOCATION:${location}
  280. END:VEVENT
  281. END:VCALENDAR`;
  282. const dataURI = 'data:text/calendar;charset=utf-8,' + encodeURIComponent(icsContent);
  283. const a = document.createElement('a');
  284. a.href = dataURI;
  285. a.download = 'event.ics';
  286. document.body.appendChild(a);
  287. a.click();
  288. document.body.removeChild(a);
  289. } else if (os === 'Android') {
  290. const googleCalendarUrl = `https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(title)}&dates=${startDate}/${endDate}&details=${encodeURIComponent(details)}&location=${encodeURIComponent(location)}`;
  291. window.open(googleCalendarUrl, '_blank');
  292. } else {
  293. alert('Your device is not supported for this feature.');
  294. }
  295. });
  296. </script>
  297. @endpush