Browse Source

add audio to single page rsvp

am
farhan 4 months ago
parent
commit
4a7245ebab

+ 3
- 3
app/Http/Controllers/MainController.php View File

15
         $host = $request->getHost();
15
         $host = $request->getHost();
16
         if ($host == 'aliffayuna.com') {
16
         if ($host == 'aliffayuna.com') {
17
             return view('digital-card', compact(['rsvp', 'guestbook']));
17
             return view('digital-card', compact(['rsvp', 'guestbook']));
18
-        }
19
-
20
-        if ($host == 'rsvp.aliffayuna.com') {
18
+        } else if ($host == 'rsvp.aliffayuna.com') {
19
+            return view('rsvp-digital-card');
20
+        } else {
21
             return view('rsvp-digital-card');
21
             return view('rsvp-digital-card');
22
         }
22
         }
23
     }
23
     }

BIN
public/assets/background-music.mp3 View File


+ 3
- 0
resources/views/rsvp-digital-card.blade.php View File

14
     @vite(['resources/css/app.css'])
14
     @vite(['resources/css/app.css'])
15
 </head>
15
 </head>
16
 <body class="antialiased font-serif">
16
 <body class="antialiased font-serif">
17
+    <audio id="player" autoplay loop>
18
+        <source src="{{'assets/background-music.mp3'}}" type="audio/mp3">
19
+    </audio>
17
     <div class="section bg-babyblue h-screen w-screen flex justify-center items-center">
20
     <div class="section bg-babyblue h-screen w-screen flex justify-center items-center">
18
         <div class="flex flex-col gap-3 w-4/5 z-10">
21
         <div class="flex flex-col gap-3 w-4/5 z-10">
19
             <div class="flex justify-center">
22
             <div class="flex justify-center">

Loading…
Cancel
Save