Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
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
export const char = (req: express.Request, res: express.Response) => {
if (req.method === "GET") {
return res.send(`
<!DOCTYPE html>
<html>
<head>
<title>
Character Sheet
</title>
<style>
.red {
background: red;
}
.blue {
background: blue;
}
.hide {
display: none !important;
}
textarea {
font-size: 12px;
text-align: left;
width: calc(100% - 20px - 2px);
border-radius: 10px;
padding: 10px;
resize: none;
overflow: hidden;
height: 15em;
}
input[type=checkbox] {
cursor: pointer;
}
div.box {
margin-top: 10px;
}
form.charsheet {
width: 800px;
right: 0;
left: 0;
margin-right: auto;
margin-left: auto;
margin-top: 10px;
}
form.charsheet div.textblock {
display: flex;
flex-direction: column-reverse;
width: 100%;
align-items: center;
}
form.charsheet div.textblock label {
text-align: center;
border: 1px solid black;
border-top: 0;
font-size: 10px;
width: calc(100% - 20px - 2px);
border-radius: 0 0 10px 10px;
padding: 4px 0;
font-weight: bold;
}
form.charsheet div.textblock textarea {
border: 1px solid black;
}
form.charsheet ul {
margin: 0;
padding: 0;
}
form.charsheet ul li {
list-style-image: none;
display: block;
}
form.charsheet ::-moz-placeholder {
color: #bbb;
}
form.charsheet :-ms-input-placeholder {
color: #bbb;
}
form.charsheet ::placeholder {
color: #bbb;
}
form.charsheet label {
text-transform: uppercase;
font-size: 12px;
}
form.charsheet header {
display: flex;
align-contents: stretch;
align-items: stretch;
}
form.charsheet header section.charname {
border: 1px solid black;
border-right: 0;
border-radius: 10px 0 0 10px;
padding: 5px 0;
background-color: #eee;
October 23, 2023