3Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right.
45You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen!
67Have fun with it and hopefully your crush says yes hehe.
3Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right.
45You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen!
67Have fun with it and hopefully your crush says yes hehe.
3Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right.
45You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen!
67Have fun with it and hopefully your crush says yes hehe.
3Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right.
45You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen!
67Have fun with it and hopefully your crush says yes hehe.
13];
1415function preloadImage(src: string): Promise<HTMLImageElement> {
16return new Promise((resolve, reject) => {
17const img = new Image();
18img.onload = () => resolve(img);
19img.onerror = reject;
27const [currentGifIndex, setCurrentGifIndex] = useState(0);
28const [isPlaying, setIsPlaying] = useState(false);
29const [secondSectionImage, setSecondSectionImage] = useState(0);
30const [isLoading, setIsLoading] = useState(true);
31const audioRef = useRef<HTMLAudioElement>(null);
44const vinyl = "https://i.ibb.co/21FnfNQK/vinyl.png";
4546const landscapeImages = [
47"https://i.ibb.co/Ndng2vrb/1.jpg",
48"https://i.ibb.co/kVF2RjK0/2.jpg",
54const backgroundSong = "https://cdn1.esm3.com/music/5251/m219936.mp3";
5556// Preload all images when component mounts
57useEffect(() => {
58const preloadAllImages = async () => {
59try {
60// Preload all images: gifs, vinyl, and landscape images
61const allImages = [
62questionGif,
63...valentineGifs,
64vinyl,
65...landscapeImages,
66];
6768await Promise.all(allImages.map(preloadImage));
69setIsLoading(false);
70} catch (error) {
71console.error("Error preloading images:", error);
72setIsLoading(false);
73}
74};
7576preloadAllImages();
77}, []);
78113if (skipSection) {
114audioRef.current.currentTime = skipSection.end;
115// Change the second section image when skipping
116setSecondSectionImage(1);
117}
118188);
189190// If images are still loading, show loading spinner
191if (isLoading) {
192return <LoadingSpinner />;
337</div>
338339{/* Second Section: Landscape Image with Vinyl */}
340{isValentine && (
341<div
350}}
351>
352{/* Background Landscape Image */}
353<img
354src={landscapeImages[secondSectionImage]}
355style={{
356width: "100%",
392)}
393394{/* Third Section: Landscape Image 2 */}
395{isValentine && (
396<div
406>
407<img
408src={landscapeImages[2]}
409style={{
410width: "100%",
3Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right.
45You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen!
67Have fun with it and hopefully your crush says yes hehe.
3Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right.
45You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen!
67Have fun with it and hopefully your crush says yes hehe.
balancedJadeSalmonREADME.md1 match
3Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right.
45You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen!
67Have fun with it and hopefully your crush says yes hehe.
21<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
22<meta property="og:type" content="website">
23<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
24
25
3Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right.
45You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen!
67Have fun with it and hopefully your crush says yes hehe.