flxa-htmlexample.web.val.run
Readme

Searchbar

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// View at https://andreterron-htmlExample.web.val.run?name=Andre
export default async function(req: Request): Promise<Response> {
const query = new URL(req.url).searchParams;
// Read name from the querystring or body. Defaults to "you" if not present.
const name = query.get("name") || (await req.json().catch(() => ({}))).name || "you";
// Returns the HTML response
return new Response(
`<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0">
<title>test-widget | canibuild</title>
<link rel="shortcut icon" href="/favicon.png">
<meta name="theme-color" content="#224946">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;800&amp;display=swap" rel="stylesheet">
<style>
body {
margin: 0;
background-color: #fafafa;
height: 100%;
font-family: 'Outfit', sans-serif;
font-weight: 400;
}
.main-navigation {
display: flex;
justify-content: space-between;
max-width: 1200px;
margin: auto;
background-color: #fafafa;
padding: 2rem 0;
& .logo {
width: 180px;
height: 40px;
background: #22b573;
}
& ul {
list-style: none;
padding: 0;
margin: 0;
& li {
display: inline-block;
margin-right: 1rem;
font-family: 'Outfit', sans-serif;
font-weight: 800;
font-size: large;
& a {
text-decoration: none;
color: #22b573;
}
}
}
}
.content {
padding: 4rem 2rem;
background-color: #224946;
}
.banner {
max-width: 1200px;
margin: auto;
background-image: url('https://a.storyblok.com/f/154592/1366x814/e639882ad4/canibuild-visual-selling.png/m/filters:format(webp)?auto=format&fit=max&w=640');
background-size: contain;
background-position: right;
background-repeat: no-repeat;
}
h1,
h2 {
padding: 2rem 0;
color: white;
font-weight: 800;
font-family: 'Outfit', sans-serif;
font-size: 52px;
line-height: 1.3;
padding: 0;
margin: 0;
}
h2 {
color: #22b573;
font-weight: 400;
}
.canibuild-search-widget {
width: 100%;
max-width: 500px;
height: 55px;
display: block;
background: white;
border-radius: 4px;
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
1
stevekrouse avatar

Interesting! I'm curious what this is for

v2
April 30, 2024