Repository navigation
Expand file tree
/
Copy pathpronto_demo.html
More file actions
159 lines (142 loc) · 3.06 KB
/
Copy pathpronto_demo.html
File metadata and controls
159 lines (142 loc) · 3.06 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta
name="description"
content="This file, pronto_demo.html, demonstrates pronto.js. It uses pronto_demo.js."
>
<title>The Pronto Demonstration</title>
<style>
@font-face {
font-family: 'Programma';
font-weight: bold;
src: url('https://www.crockford.com/woff/Programma-Bold.woff2') format('woff2');
}
#demo {
line-height: 4em;
overflow-wrap: normal;
white-space: normal;
word-break: normal;
}
#demo span {
background-color: antiquewhite;
border: 2pt solid black;
font-family: Programma, mono;
font-size: 112.5%;
font-style: normal;
font-weight: bold;
margin-left: 1em;
padding: 0.5em;
white-space: nowrap;
}
#demo span.success {
background-color: palegreen;
}
#demo span.failure {
background-color: pink;
}
#demo span.cancelled {
background-color: lightgray;
}
#demo input, #choice input {
border: 2pt solid black;
border-radius: 1em;
cursor: pointer;
font-family: Programma, mono;
font-size: 112.5%;
font-style: normal;
font-weight: bold;
margin-left: 0.5em;
margin-right: 0.5em;
margin-top: 0;
margin-bottom: 0;
padding-left: 0.5em;
padding-right: 0.5em;
}
#source, #demo, #choice {
background-color: whitesmoke;
border: 2pt solid black;
border-radius: 1em;
font-family: Programma, mono;
font-size: 112.5%;
font-style: normal;
font-weight: bold;
margin: 1em;
padding: 1em;
}
#demo span input[name=success] {
background-color: palegreen;
}
#demo span input[name=failure] {
background-color: pink;
}
#demo span input[name=success]:hover {
background-color: green;
color: white;
}
#demo span input[name=failure]:hover {
background-color: red;
color: white;
}
#demo span[class] input[name] {
display: none;
}
h1 {
text-align: center;
}
#also {
background-color: linen;
border: 2pt solid black;
border-radius: 1em;
margin: 1em;
padding: 1em;
}
#also div::before {
content: "⏵ ";
}
#also div {
cursor: pointer;
font-size: 100%;
margin-bottom: 0;
margin-top: 0;
}
body {
background-color: #bfb6a7;
padding-left: 7%;
padding-right: 7%;
}
a, #also div {
text-decoration: none;
}
a:link {
color: black;
}
a:visited {
color: maroon;
}
a:hover, #also div:hover {
background-color: yellow;
color: blue;
text-decoration: underline;
}
a:active {
color: red;
}
</style>
</head>
<body><noscript>Nothing good happens without JavaScript.</noscript>
<h1>The Pronto Demonstration</h1>
<div id=choice></div>
<div id=demo><span><input name=success type=button value="+"><input name=failure type=button value="-"></span></div>
<pre id=source></pre>
<script
src="./pronto_demo.js"
type="module"
></script>
<div id=also>
<div><a href="https://www.crockford.com/pronto.html">About Pronto</a></div>
<div id="widget_source">Widget source</div>
<div id="proto_widget">Proto widget</div>
<div><a href="https://github.com/douglascrockford/Pronto">Pronto on GitHub</a></div></div>
</body></html>