You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.3 KiB
HTML
66 lines
1.3 KiB
HTML
6 years ago
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<title></title>
|
||
|
<meta charset="utf-8">
|
||
|
<style type="text/css">
|
||
|
#wrapper {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
position: absolute;
|
||
|
left: 5%; top: 5%; right: 5%; bottom: 5%;
|
||
|
}
|
||
|
#textinput {
|
||
|
width: 100%;
|
||
|
border: none;
|
||
|
background: none;
|
||
|
}
|
||
|
#input {
|
||
|
padding: 2%;
|
||
|
flex: 0 1 auto;
|
||
|
background: aqua;
|
||
|
}
|
||
|
#display {
|
||
|
flex: 1 1 auto;
|
||
|
background: pink;
|
||
|
padding: 2%;
|
||
|
overflow: auto;
|
||
|
}
|
||
|
#display div.msg {
|
||
|
padding-bottom: 0.5em;
|
||
|
}
|
||
|
#display div.human {
|
||
|
color: black;
|
||
|
}
|
||
|
#display div.bot {
|
||
|
color: black;
|
||
|
text-transform: uppercase;
|
||
|
}
|
||
|
#display div.debug {
|
||
|
color: red;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="wrapper">
|
||
|
<div id="display">
|
||
|
</div>
|
||
|
<div id="input">
|
||
|
<input type="text" id="textinput" autofocus />
|
||
|
</div>
|
||
|
</div>
|
||
|
<script src="eliza.js"></script>
|
||
|
<script>
|
||
|
function eliza (rules) {
|
||
|
chatbot({
|
||
|
rules: rules,
|
||
|
input: document.getElementById("textinput"),
|
||
|
output: document.getElementById("display"),
|
||
|
debug: true,
|
||
|
autoscroll: true
|
||
|
});
|
||
|
}
|
||
|
</script>
|
||
|
<script src="doctor.js"></script>
|
||
|
</body>
|
||
|
</html>
|