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
export const vibe_playground = () =>
new Response(
`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PDF and Form Page</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
body, html {
height: 100%;
}
#container {
display: flex;
height: 100vh;
}
#pdfContainer, #formContainer {
width: 50%;
overflow: hidden;
}
#pdfEmbed {
width: 100%;
height: 100vh;
}
#formContent {
width: 100%;
height: 100vh;
overflow-y: scroll;
}
</style>
</head>
<body>
<div id="container">
<!-- PDF Embed Side -->
<div id="pdfContainer">
<embed id="pdfEmbed" src="path_to_your_pdf.pdf" type="application/pdf">
</div>
<!-- Form Side -->
<div id="formContainer">
<div id="formContent" class="p-4">
<form>
<!-- Add your form fields here. Example: -->
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>
`,
{ headers: { "Content-Type": "text/html" } },
);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023