152 </Col>
153 <Col md={6}>
154 <img src="https://maxm-imggenurl.web.val.run/futuristic-gaming-setup-with-rgb-lights" alt="Setup Gaming" className="img-fluid rounded shadow gaming-image" loading="lazy" />
155 </Col>
156 </Row>
515}
516
517.gaming-image {
518 border: 2px solid #00ffff;
519 box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
152 </Col>
153 <Col md={6}>
154 <img src="https://maxm-imggenurl.web.val.run/futuristic-gaming-setup-with-rgb-lights" alt="Setup Gaming" className="img-fluid rounded shadow gaming-image" loading="lazy" />
155 </Col>
156 </Row>
515}
516
517.gaming-image {
518 border: 2px solid #00ffff;
519 box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
152 </Col>
153 <Col md={6}>
154 <img src="https://maxm-imggenurl.web.val.run/futuristic-gaming-setup-with-rgb-lights" alt="Setup Gaming" className="img-fluid rounded shadow gaming-image" loading="lazy" />
155 </Col>
156 </Row>
515}
516
517.gaming-image {
518 border: 2px solid #00ffff;
519 box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
1111 <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."">
1112 <meta property="og:type" content="website">
1113 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115
152 </Col>
153 <Col md={6}>
154 <img src="https://maxm-imggenurl.web.val.run/futuristic-gaming-setup-with-rgb-lights" alt="Setup Gaming" className="img-fluid rounded shadow gaming-image" loading="lazy" />
155 </Col>
156 </Row>
515}
516
517.gaming-image {
518 border: 2px solid #00ffff;
519 box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
43 </Col>
44 <Col md={6}>
45 <img src="https://maxm-imggenurl.web.val.run/futuristic-gaming-setup-with-rgb-lights" alt="Setup Gaming" className="img-fluid rounded shadow gaming-image" loading="lazy" />
46 </Col>
47 </Row>
397}
398
399.gaming-image {
400 border: 2px solid #00ffff;
401 box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
43 </Col>
44 <Col md={6}>
45 <img src="https://maxm-imggenurl.web.val.run/futuristic-gaming-setup-with-rgb-lights" alt="Setup Gaming" className="img-fluid rounded shadow gaming-image" loading="lazy" />
46 </Col>
47 </Row>
397}
398
399.gaming-image {
400 border: 2px solid #00ffff;
401 box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
6 const url = new URL(req.url);
7 // console.log("url:", url)
8 const isImage = url.pathname.endsWith("/image");
9
10 if (isImage) {
11 const imageUrl = `https://api.apiflash.com/v1/urltoimage?access_key=${
12 Deno.env.get("APIFLASH_API_KEY")
13 }&url=${url.origin}&format=png&width=1200&height=800&scale_factor=2`;
14 // const imageUrl = "https://charlypoly-httpapiscreenshotpageexample.web.val.run/?url=" + url.origin;
15 // return Response.redirect(imageUrl, 302)
16 const res = await fetch(imageUrl);
17 const blob = await res.blob();
18 return new Response(blob, { headers: { "Content-Type": "image/png" } });
19 }
20
23 const v2fcframe = {
24 version: "next",
25 imageUrl: baseUrl + "/image",
26 button: {
27 title: title,
30 name: title,
31 url: baseUrl,
32 // splashImageUrl: baseUrl + "/image",
33 splashBackgroundColor: "#111111",
34 },
40 <head>
41 <title>${title}</title>
42 <meta property="og:image" content="${url.origin}/image" />
43 <meta property="og:image:width" content="800" />
44 <meta property="og:image:height" content="800" />
45 <meta name="twitter:card" content="summary_large_image" />
46 <meta name="fc:frame" content="${JSON.stringify(v2fcframe).replace(/"/g, """)}" />
47 <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.10.0/p5.min.js" integrity="sha512-lvddmeF7aHRJwdbJeYThWd5kWSjTrXBzCRF/jYROiHzmhMJ1dEXfGH5Q7ft0yhizXTopAETG03s5ajTflauijA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
82 return new Response(svg, {
83 headers: {
84 "Content-Type": "image/svg+xml",
85 "Access-Control-Allow-Origin": "*",
86 },
50 return new Response(svgResponse, {
51 headers: {
52 'Content-Type': 'image/svg+xml',
53 'Access-Control-Allow-Origin': '*'
54 }