-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
114 lines (101 loc) · 3 KB
/
index.html
File metadata and controls
114 lines (101 loc) · 3 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PlaceField Examples</title>
<link rel="icon" type="image/svg+xml" href="/assets/favicon.svg">
<style>
:root {
color: #0f172a;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
margin: 0;
background: #f8fafc;
}
main {
width: min(100% - 32px, 980px);
margin: 56px auto;
}
h1 {
margin: 0 0 12px;
font-size: 40px;
line-height: 1.08;
}
p {
max-width: 720px;
color: #475569;
font-size: 16px;
}
a {
color: #16a34a;
font-weight: 750;
text-decoration-thickness: 2px;
text-underline-offset: 3px;
}
.grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
margin-top: 28px;
}
.card {
display: grid;
gap: 10px;
border: 1px solid #cbd5e1;
border-radius: 8px;
background: #ffffff;
padding: 20px;
}
.card h2 {
margin: 0;
font-size: 20px;
}
.card p {
margin: 0;
font-size: 15px;
}
.note {
margin-top: 28px;
border-left: 3px solid #22c55e;
padding-left: 16px;
}
@media (max-width: 760px) {
.grid {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<main>
<h1>PlaceField Examples</h1>
<p>Sample integrations for PlaceField, a commercial location autocomplete API and JavaScript widget for city, municipality, administrative area, region, and country form fields.</p>
<section class="grid" aria-label="Examples">
<article class="card">
<h2>API Fetch</h2>
<p>Call the autocomplete endpoint directly and render your own result list.</p>
<a href="/examples/api-fetch/">Open API Fetch example</a>
</article>
<article class="card">
<h2>Basic JS</h2>
<p>Attach PlaceField autocomplete behavior to your own input and surrounding UI.</p>
<a href="/examples/basic-js/">Open Basic JS example</a>
</article>
<article class="card">
<h2>Full Widget</h2>
<p>Ready-made autocomplete field with bundled UI and optional fullscreen mobile search.</p>
<a href="/examples/full-widget/">Open Full Widget example</a>
</article>
<article class="card">
<h2>React example using Full Widget</h2>
<p>Small React/Vite example using the hosted Full Widget. Run this one with npm from its example folder.</p>
<code>cd examples/react-widget<br>npm install<br>npm run dev</code>
</article>
</section>
<p class="note">These examples use placeholder keys. Replace <code>pf_pub_xxx</code> with a public browser key and allowlist this origin before calling the hosted API.</p>
<p>Product docs: <a href="https://placefield.dev/docs">placefield.dev/docs</a></p>
</main>
</body>
</html>