Skip to content

Commit 03c8b20

Browse files
✨ Revamp video section with animated play button and improved layout
1 parent cf28f01 commit 03c8b20

File tree

2 files changed

+76
-12
lines changed

2 files changed

+76
-12
lines changed
87.2 KB
Binary file not shown.

resources/views/welcome.blade.php

Lines changed: 76 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,22 @@ class="relative -top-5 grid size-10 place-items-center rounded-full bg-black/30
211211
aria-label="Watch NativePHP introduction video on YouTube"
212212
>
213213
<svg
214+
x-init="
215+
() => {
216+
motion.animate(
217+
$el,
218+
{
219+
x: [-1, 1],
220+
},
221+
{
222+
duration: 0.6,
223+
repeat: Infinity,
224+
repeatType: 'mirror',
225+
ease: motion.easeInOut,
226+
},
227+
)
228+
}
229+
"
214230
xmlns="http://www.w3.org/2000/svg"
215231
class="size-4"
216232
viewBox="0 0 17 22"
@@ -952,6 +968,7 @@ class="mx-auto mt-20 max-w-5xl px-5"
952968
aria-labelledby="laracon-talk-title"
953969
>
954970
<div class="flex flex-wrap items-center justify-between gap-5">
971+
{{-- Left side --}}
955972
<div class="lg:max-w-96">
956973
<div
957974
x-init="
@@ -1024,18 +1041,65 @@ class="pt-2 leading-relaxed text-gray-500 opacity-0 dark:text-gray-400"
10241041
Laravel to build cross-platform desktop applications.
10251042
</p>
10261043
</div>
1027-
<iframe
1028-
width="560"
1029-
height="315"
1030-
src="https://www.youtube.com/embed/iG7VscBFnqo?si=AcavmLM7l_oczik7"
1031-
title="Marcel Pociot at Laracon US - Building Desktop Applications with PHP"
1032-
frameborder="0"
1033-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
1034-
referrerpolicy="strict-origin-when-cross-origin"
1035-
allowfullscreen
1036-
class="rounded-xl ring-1 ring-black/10"
1037-
loading="lazy"
1038-
></iframe>
1044+
1045+
{{-- Right side --}}
1046+
<div class="grid place-items-center">
1047+
<a
1048+
href="https://www.youtube.com/watch?v=iG7VscBFnqo"
1049+
target="_blank"
1050+
rel="noopener"
1051+
class="group relative"
1052+
title="Marcel Pociot at Laracon US - Building Desktop Applications with PHP"
1053+
aria-label="Watch Marcel Pociot's talk at Laracon US 2023"
1054+
>
1055+
{{-- Play button --}}
1056+
<div
1057+
class="absolute right-1/2 top-1/2 grid size-16 -translate-y-1/2 translate-x-1/2 place-items-center rounded-full bg-white/10 text-white ring-1 ring-white/10 backdrop-blur transition duration-300 ease-in-out will-change-transform group-hover:scale-110 group-hover:text-[#d4fd7d]"
1058+
aria-hidden="true"
1059+
>
1060+
<svg
1061+
x-init="
1062+
() => {
1063+
motion.animate(
1064+
$el,
1065+
{
1066+
x: [0, 3],
1067+
},
1068+
{
1069+
duration: 0.6,
1070+
repeat: Infinity,
1071+
repeatType: 'mirror',
1072+
ease: motion.easeInOut,
1073+
},
1074+
)
1075+
}
1076+
"
1077+
xmlns="http://www.w3.org/2000/svg"
1078+
class="size-7"
1079+
viewBox="0 0 17 22"
1080+
fill="none"
1081+
aria-hidden="true"
1082+
>
1083+
<path
1084+
fill-rule="evenodd"
1085+
clip-rule="evenodd"
1086+
d="M3.69143 0.285087C2.05005 -0.569218 0 0.584286 0 2.57588V19.4241C0 21.4158 2.05005 22.5692 3.69143 21.7149C5.89832 20.5663 9.15122 18.7792 11.8609 16.9047C13.2129 15.9695 14.4582 14.9932 15.3743 14.0457C15.8326 13.5718 16.228 13.0853 16.5129 12.5954C16.7949 12.1104 17 11.5686 17 11C17 10.4314 16.7949 9.88956 16.5129 9.40462C16.228 8.91473 15.8326 8.42821 15.3743 7.95433C14.4582 7.00681 13.2129 6.03045 11.8609 5.09525C9.15122 3.22087 5.89832 1.43373 3.69143 0.285087Z"
1087+
fill="currentColor"
1088+
/>
1089+
</svg>
1090+
<span class="sr-only">Play video</span>
1091+
</div>
1092+
{{-- Image --}}
1093+
<img
1094+
src="{{ Vite::asset('resources/images/marcel2023laraconus.webp') }}"
1095+
alt="Marcel Pociot at Laracon US - Building Desktop Applications with PHP"
1096+
class="w-full max-w-[505px] rounded-xl"
1097+
width="505"
1098+
height="282"
1099+
loading="lazy"
1100+
/>
1101+
</a>
1102+
</div>
10391103
</div>
10401104
</section>
10411105

0 commit comments

Comments
 (0)