7FONTS,
8hashPassword,
9SERVICE_IMAGES,
10testimonials,
11variantStyles,
301title,
302style = {},
303image,
304imageAlt = "",
305imageHeight = "200px",
306animation = "slideUp",
307}: {
309title?: string;
310style?: React.CSSProperties;
311image?: string;
312imageAlt?: string;
313imageHeight?: string;
314animation?: "fadeIn" | "slideUp";
315}) => {
327}}
328>
329{image && (
330<div
331style={{
332margin: "-24px -24px 24px -24px",
333height: imageHeight,
334overflow: "hidden",
335position: "relative",
337>
338<img
339src={image}
340alt={imageAlt}
341style={{
342width: "100%",
755textAlign: "center",
756padding: "80px 20px",
757background: `linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url(${SERVICE_IMAGES.hero})`,
758backgroundSize: "cover",
759backgroundPosition: "center",
993title="Schools & Colleges"
994style={{ borderTop: `4px solid ${COLORS.primary}` }}
995image={SERVICE_IMAGES.school}
996imageAlt="School management system"
997>
998<p>Student management, grading, and scheduling systems to streamline educational administration.</p>
1008title="Hospitals"
1009style={{ borderTop: `4px solid ${COLORS.secondary}` }}
1010image={SERVICE_IMAGES.hospital}
1011imageAlt="Hospital management system"
1012>
1013<p>
1025title="Factories"
1026style={{ borderTop: `4px solid ${COLORS.accent}` }}
1027image={SERVICE_IMAGES.factory}
1028imageAlt="Factory management system"
1029>
1030<p>Product tracking, resource planning, and process automation for manufacturing efficiency.</p>
1040title="Organizations"
1041style={{ borderTop: `4px solid ${COLORS.primaryLight}` }}
1042image={SERVICE_IMAGES.organization}
1043imageAlt="Organization management system"
1044>
1045<p>Employee management systems for HR, payroll, and attendance tracking.</p>
1097<div style={{ flex: 1, minWidth: "300px" }}>
1098<img
1099src={SERVICE_IMAGES.website}
1100alt="Website development"
1101style={{
1133<div style={{ flex: 1, minWidth: "300px" }}>
1134<img
1135src={SERVICE_IMAGES.networking}
1136alt="Networking solutions"
1137style={{
1235minWidth: "300px",
1236height: "300px",
1237background: `url(${SERVICE_IMAGES.gps}) center/cover no-repeat`,
1238position: "relative",
1239}}
223}
224</style>
225<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>💻</text></svg>">
226</head>
227<body>
orisconstants.tsx10 matches
23};
2425// Service images
26export const SERVICE_IMAGES = {
27school:
28"https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80",
29hospital:
30"https://images.unsplash.com/photo-1579684385127-1ef15d508118?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80",
31factory:
32"https://images.unsplash.com/photo-1504275107627-0c2ba7a43b1a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80",
33organization:
34"https://images.unsplash.com/photo-1521737711867-e3b97375f902?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80",
35website:
36"https://images.unsplash.com/photo-1547658719-da2b51169166?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1528&q=80",
37networking:
38"https://images.unsplash.com/photo-1558494949-ef010cbdcc31?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80",
39gps:
40"https://images.unsplash.com/photo-1501706362039-c06b2d715385?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80",
41hero:
42"https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1472&q=80",
43};
44
untitled-6961main.tsx26 matches
10// --- AI CREATIVE DIRECTION PROMPT ---
11const COMPOSITION_AI_PROMPT = `
12You are a master vector artist. Your task is to decide how to combine two sets of SVG paths: a 'text' shape and an 'image' texture shape. Your goal is to create the most artistic and meaningful composition based on the user's original phrase. You MUST respond ONLY with a single, minified JSON object.
13The JSON schema must be:
14{
22"stroke_width": "A number, e.g., 1.5"
23},
24"image_style": {
25"fill": "A hex color. This will be the fill for the image paths."
26}
27}
57}
5859// --- IMAGE VECTORIZATION LOGIC (CANVAS-FREE) ---
60async function getImagePath(imageUrl: string): Promise<{ path: string; width: number; height: number }> {
61const imageResponse = await fetch(imageUrl);
6263// **FIX: Add robust checking for the fetch response.**
64if (!imageResponse.ok) {
65throw new Error(`Source image URL failed with status ${imageResponse.status}: ${imageResponse.statusText}`);
66}
67const contentType = imageResponse.headers.get("content-type");
68if (!contentType || !contentType.startsWith("image/png")) {
69throw new Error(`Expected image/png from source, but received ${contentType || "no content type"}.`);
70}
7172// Now it's safe to decode the buffer.
73const pngBuffer = new Uint8Array(await imageResponse.arrayBuffer());
74const decodedPng = decode(pngBuffer);
75const { width, height, data } = decodedPng;
159outline: 0;
160}
161#image-display {
162margin-top: 1.5rem;
163background-color: var(--card-bg);
169transition: all .3s;
170}
171#image-display.loading {
172animation: pulse 1.5s cubic-bezier(.4, 0, .6, 1) infinite;
173}
17650% { opacity: .7; }
177}
178#image-display img {
179width: 100%;
180height: auto;
196<input type="text" id="phrase-input" placeholder="Enter a phrase and press Enter...">
197</div>
198<div id="image-display">
199<div class="placeholder" id="placeholder">
200<h3>Your generative art will appear here</h3>
205(function() {
206const input = document.getElementById("phrase-input");
207const display = document.getElementById("image-display");
208const baseUrl = \`\${sourceUrl.endsWith("/") ? sourceUrl : sourceUrl + "/"}\`;
209219const encoded = encodeURIComponent(phrase);
220const url = \`\${baseUrl}generate/\${encoded}.svg\`;
221const img = new Image();
222img.src = url;
223254app.get("/generate/:phrase{.+\\.svg}", async (c) => {
255const phrase = decodeURIComponent(c.req.param("phrase").replace(/\.svg$/, ""));
256const imageUrl = `https://maxm-imggenurl.web.val.run/${encodeURIComponent(phrase)}.png`;
257258try {
259const [aiDecision, imageVect] = await Promise.all([
260openai.chat.completions.create({
261model: "gpt-4o",
263response_format: { type: "json_object" },
264}),
265getImagePath(imageUrl),
266]);
267268const composition = JSON.parse(aiDecision.choices[0].message.content).composition;
269const { method, text_style, image_style } = composition;
270271const textPaths = await getTextPaths(phrase, text_style.font);
272const { path: imagePath, width, height } = imageVect;
273274let finalSvg =
277finalSvg += `<defs><clipPath id="text-clip">${
278textPaths.map(d => `<path d="${d}" />`).join("")
279}</clipPath></defs><g clip-path="url(#text-clip)"><path d="${imagePath}" fill="${image_style.fill}" /></g>`;
280} else {
281finalSvg +=
282`<path d="${imagePath}" fill="${image_style.fill}" /><g fill="${text_style.fill}" stroke="${text_style.stroke}" stroke-width="${text_style.stroke_width}">${
283textPaths.map(d => `<path d="${d}" />`).join("")
284}</g>`;
286finalSvg += `</svg>`;
287288return new Response(finalSvg, { headers: { "Content-Type": "image/svg+xml" } });
289} catch (error) {
290console.error("Full pipeline error:", error);
thilenius-webcamwebcam.tsx7 matches
4const url = new URL(req.url);
5const camera = (url.pathname == "/") ? "camera1" : url.pathname.slice(1);
6const response = await fetch("https://gliderport.thilenius.com/gpapi/getLastFiveSmallImages");
7const json = await response.json();
89// Grab the last image (should probably sort by date, but whatever.) Convert base64 string to a buffer
10const lastImage = json?.[camera]?.[4]?.image;
11if (!lastImage) {
12return new Response("No image found", { status: 404 });
13}
14const imageBuffer = Buffer.from(lastImage, "base64");
1516return new Response(imageBuffer, { headers: { "content-type": "image/png" } });
17}
lynkoindex.html1 match
1112<!-- reference the webpage's favicon. note: currently only svg is supported in val town files -->
13<link rel="icon" href="/favicon.svg" sizes="any" type="image/svg+xml">
1415<!-- import the webpage's javascript file -->
thirdTimervaltown.mdc2 matches
160161- **Redirects:** Use `return new Response(null, { status: 302, headers: { Location: "/place/to/redirect" }})` instead of `Response.redirect` which is broken
162- **Images:** Avoid external images or base64 images. Use emojis, unicode symbols, or icon fonts/libraries instead
163- **AI Image:** To inline generate an AI image use: `<img src="https://maxm-imggenurl.web.val.run/the-description-of-your-image" />`
164- **Storage:** DO NOT use the Deno KV module for storage
165- **Browser APIs:** DO NOT use the `alert()`, `prompt()`, or `confirm()` methods
thirdTimerindex.html1 match
4<meta charset="UTF-8" />
5<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6<link rel="icon" type="image/x-icon" href="/favicon.svg" />
78<title>Third Timer</title>
thirdTimerfavicon.http.tsx1 match
26return new Response(svg, {
27headers: {
28"Content-Type": "image/svg+xml",
29},
30});
sqliteadminREADME.md1 match
3This is a lightweight SQLite Admin interface to view and debug your SQLite data.
45
67It's currently super limited (no pagination, editing data, data-type specific viewers), and is just a couple dozens lines of code over a couple different vals. Forks encouraged! Just comment on the val if you add any features that you want to share.