1
+ ---
2
+ import { getImage } from " astro:assets" ;
3
+ import audiocomBackground from " ../../assets/img/audiocom-background.webp" ;
4
+ import { Image } from " astro:assets" ;
5
+ import FeaturedVideo from " ../video/FeaturedVideo" ;
6
+ import JoinAudioDotComButton from " ../button/JoinAudioDotComButton" ;
7
+ import AudioDotComLogo from " ../../assets/img/audio-dot-com.svg" ;
8
+ import VideoPlaceholder from ' ../../assets/img/audiocom-placeholder.webp'
9
+
10
+ // Optimize the background image
11
+ const optimizedBg = await getImage ({
12
+ src: audiocomBackground ,
13
+ format: " webp" ,
14
+ width: 960 , // Default size, you can adjust based on your needs
15
+ quality: 50 ,
16
+ });
17
+
18
+ const releaseVideoPlaceholderImage = await getImage ({
19
+ src: VideoPlaceholder ,
20
+ format: " webp" ,
21
+ width: 732 ,
22
+ quality: 80 ,
23
+ });
24
+
25
+ const releaseVideo = {
26
+ title: " Introducing Audio.com" ,
27
+ placeholderImage: releaseVideoPlaceholderImage .src ,
28
+ videoURL: " https://www.youtube-nocookie.com/embed/ZDnQgaCoppo?autoplay=1" ,
29
+ imageAltText: " Video thumbnail: 15 reasons why you should use Audio.com"
30
+ };
31
+ ---
32
+
33
+ <!-- Apply the background using inline style -->
34
+ <section style ={ ` background-image: url('${optimizedBg .src }'); background-size: cover; ` } >
35
+ <div
36
+ class =" grid md:grid-cols-2 max-w-screen-xl px-6 sm:px-12 py-12 gap-8 mx-auto"
37
+ >
38
+ <div class =" flex lg:items-center col-span-2 md:col-span-1 md:col-start-1 row-start-2 md:row-start-1" >
39
+ <FeaturedVideo
40
+ client:load
41
+ placeholderImage ={ releaseVideo .placeholderImage }
42
+ imageAltText ={ releaseVideo .imageAltText }
43
+ videoURL ={ releaseVideo .videoURL }
44
+ textColor =" text-slate-50"
45
+ matomoEventName ={ releaseVideo .title }
46
+ />
47
+ </div >
48
+ <div class =" col-span-2 md:col-span-1 md:col-start-2 md:row-start-1 flex flex-col gap-8 lg:py-12" >
49
+ <Image src ={ AudioDotComLogo } class =" w-20" alt =" audio.com" />
50
+ <div >
51
+ <h2 class =" text-white" >Level up your Audacity</h2 >
52
+ <p class =" text-gray-300 mt-4" >
53
+ Audio.com, the online companion to Audacity, lets you collaborate on
54
+ projects, create versioned backups, and easily share and publish your
55
+ work.
56
+ </p >
57
+ </div >
58
+
59
+ <JoinAudioDotComButton
60
+ href =" https://audio.com/audacity/auth/sign-in?mtm_campaign=audacityteamorg&mtm_content=Block_button"
61
+ />
62
+ </div >
63
+ </div >
64
+ </section >
0 commit comments