charmaineValSearchtypes.tsx8 matches
8username: z.string(),
9description: z.string().nullable(),
10image_url: z.string().nullable(),
11forked_branch_id: z.string().nullable(),
12updated_at: z.string().datetime(),
36username: string;
37project_url: string;
38image_url?: string | null;
39};
4047username: string | null;
48bio: string | null;
49profile_image_url: string | null;
50url: string;
51updated_at: string;
131username: string;
132url: string;
133profile_image_url: string | null;
134projectCount: number;
135};
139username: string;
140url: string;
141image_url: string | null;
142updated_at: string;
143};
165project_url: string;
166project_description: string | null;
167user_profile_image_url: string | null;
168update_count: number;
169featured?: boolean; // For marking vals to be featured in newsletter
176url: string;
177description: string | null;
178image_url: string | null;
179user_profile_image_url: string | null;
180edit_sessions: number; // Number of distinct edit sessions (grouped by timestamp)
181file_count: number;
charmaineValSearch.cursorrules2 matches
178179- **Redirects:** Use `return new Response(null, { status: 302, headers: { Location: "/place/to/redirect" }})` instead of `Response.redirect` which is broken
180- **Images:** Avoid external images or base64 images. Use emojis, unicode symbols, or icon fonts/libraries instead
181- **AI Image:** To inline generate an AI image use: `<img src="https://maxm-imggenurl.web.val.run/the-description-of-your-image" />`
182- **Storage:** DO NOT use the Deno KV module for storage
183- **Browser APIs:** DO NOT use the `alert()`, `prompt()`, or `confirm()` methods
FarcasterSpacesimage.tsx16 matches
8import { fetchUsersById } from './neynar.ts'
910export function handleImageEndpoints(app: Hono) {
11const headers = {
12'Content-Type': 'image/png',
13'cache-control': 'public, max-age=3600', // 86400
14}
15app.get('/image', async (c) => {
16const channel = c.req.query('channel')
17if (channel) return c.body(await spaceImage(channel), 200, headers)
18return c.body(await homeImage(), 200, headers)
19})
20app.get('/icon', async (c) => {
21const rounded = !!c.req.query('rounded')
22return c.body(await iconImage(rounded), 200, headers)
23})
24}
2526export async function homeImage() {
27return await ogImage(
28<div tw="w-full h-full flex justify-start items-end text-[100px] bg-black text-white p-[50px]">
29<div tw="flex flex-col items-start">
37}
3839export async function spaceImage(channel: string) {
40const space = await fetchSpace(channel)
41if (!space) return await homeImage()
4243const users = await fetchUsersById([space.created_by, ...space.hosts, ...space.speakers].join(','))
48const speakers = users?.filter((u) => speakerFids.includes(u.fid))
4950return await ogImage(
51<div tw="w-full h-full flex justify-start items-start text-[100px] bg-black text-white p-[50px]">
52<div tw="flex flex-col items-start ">
84}
8586export async function iconImage(rounded = false) {
87const roundedClass = rounded ? 'rounded-[96px]' : ''
88return await ogImage(
89<div tw={`w-full h-full flex justify-center items-center text-[100px] bg-[#7c65c1] text-white p-[50px] ${roundedClass}`}>
90<img tw="w-[350px] h-[350px]" src={base64Icon(Mic)} />
99//////////
100101export async function ogImage(body, options = {}) {
102const svg = await satori(body, {
103width: 945,
109if (code === 'emoji') {
110const unicode = segment.codePointAt(0).toString(16).toUpperCase()
111return `data:image/svg+xml;base64,` + btoa(await loadEmoji(unicode))
112}
113return ''
145const base64 = Buffer.from(svg).toString('base64')
146// console.log('getIconDataUrl', name, svg, base64)
147return `data:image/svg+xml;base64,${base64}`
148}
149
FarcasterSpacesfarcaster.ts4 matches
5export const name = 'Spaces'
6// export const iconUrl = "https://imgur.com/FgHOubn.png";
7// export const ogImageUrl = "https://imgur.com/oLCWKFI.png";
89export function embedMetadata(baseUrl: string, path: string = '/') {
11return {
12version: 'next',
13imageUrl: baseUrl + '/image' + (channel ? '?channel=' + channel : ''),
14button: {
15title: name,
18name: name,
19url: baseUrl + path,
20splashImageUrl: baseUrl + '/icon',
21splashBackgroundColor: '#111111',
22},
47iconUrl: baseUrl + '/icon',
48homeUrl: baseUrl,
49splashImageUrl: baseUrl + '/icon?rounded=1',
50splashBackgroundColor: '#111111',
51subtitle: 'Live audio conversations',
MiniAppStarterimage.tsx12 matches
5import satori from 'npm:satori'
67export function handleImageEndpoints(app: Hono) {
8const headers = {
9'Content-Type': 'image/png',
10'cache-control': 'public, max-age=86400',
11}
12app.get('/image', async (c) => {
13return c.body(await homeImage(), 200, headers)
14})
15app.get('/icon', async (c) => {
16const rounded = !!c.req.query('rounded')
17return c.body(await iconImage(rounded), 200, headers)
18})
19}
2021export async function homeImage() {
22return await ogImage(
23<div tw="w-full h-full flex justify-start items-end text-[100px] bg-black text-white p-[50px]">
24<div tw="flex flex-col items-start">
32}
3334export async function iconImage(rounded = false) {
35const roundedClass = rounded ? 'rounded-[96px]' : ''
36return await ogImage(
37<div
38tw={`w-full h-full flex justify-center items-center text-[100px] bg-[#7c65c1] text-white p-[50px] ${roundedClass}`}
49//////////
5051export async function ogImage(body, options = {}) {
52const svg = await satori(body, {
53width: 945,
59if (code === 'emoji') {
60const unicode = segment.codePointAt(0).toString(16).toUpperCase()
61return `data:image/svg+xml;base64,` + btoa(await loadEmoji(unicode))
62}
63return ''
95const base64 = Buffer.from(svg).toString('base64')
96// console.log('getIconDataUrl', name, svg, base64)
97return `data:image/svg+xml;base64,${base64}`
98}
99
MiniAppStarterfarcaster.ts4 matches
5export const name = "Mini App Starter";
6// export const iconUrl = "https://imgur.com/TrJLlwp.png";
7// export const ogImageUrl = "https://imgur.com/xKVOVUE.png";
89export function embedMetadata(baseUrl: string, path: string = "/") {
10return {
11version: "next",
12imageUrl: baseUrl + "/image",
13button: {
14title: name,
17name: name,
18url: baseUrl + path,
19splashImageUrl: baseUrl + "/icon",
20splashBackgroundColor: "#111111",
21},
55"iconUrl": baseUrl + "/icon",
56"homeUrl": baseUrl,
57"splashImageUrl": baseUrl + "/icon?rounded=1",
58"splashBackgroundColor": "#111111",
59"primaryCategory": "developer-tools",
waho_pro_advancenewpage.tsx6 matches
7return (
8<div className="no-internet-container">
9<img src="https://i.postimg.cc/t4q16WRj/images.png" alt="No Internet" />
10<div className="no-internet-message">
11No internet connection
20}
2122function Slideshow({ images }) {
23useEffect(() => {
24let currentSlideIndex = 0;
70slides[0].style.left = "0%";
71}
72}, []); // images dependency removed to run once, assuming images don't change post-mount
7374return (
75<div className="slideshow-container">
76{images.map((src, index) => (
77<img key={index} className={`mySlides ${index === 0 ? "visible" : ""}`} src={src} alt={`Slide ${index + 1}`} />
78))}
593}
594595const slideshowImages = [
596"https://i.postimg.cc/KvSbQsgQ/download-4.png",
597"https://i.postimg.cc/NMzVyLRp/download-5.png",
662</div>
663</div>
664<Slideshow images={slideshowImages} />
665<Card {...loginCardData} />
666<Card {...scanCodeCardData} />
templateHackerNewsAlertREADME.md3 matches
11## Example
12This val tracks mentions of "Val Town" on Hacker News and sends updates to a Discord webhook.
13
1415---
19### 1. Fork this Val
20To start using this template, fork this val by clicking the fork button at the top-right corner of the page.
21
2223---
24### 2. View Source Code
25<em>The `CODE` box shows you the the full source code of this val, you may need to scroll down to see it.</em>
26
2728---
Tarunkumartypes.ts1 match
15price: number; // Price in Indian Rupees
16description: string;
17image_url: string;
18duration: string;
19highlights: string[];
tarunkumarwebsiteindex.html2 matches
5<meta name="viewport" content="width=device-width, initial-scale=1.0">
6<title>TravelEase - Your Ultimate Travel Companion</title>
7<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>✈️</text></svg>">
8
9<!-- TailwindCSS -->
51
52.travel-bg {
53background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23667eea' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
54}
55</style>