-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
44 lines (33 loc) · 1.01 KB
/
index.php
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
<?php
// $message = $_POST['text'];
// $user = $_POST['user'];
// $messages[] = $message;
// $messages[] = $user;
// var_dump($messages);
// foreach($messages as $n) {
// echo $n;
// };
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chatbot</title>
<link rel="stylesheet" href="./css/styles.css">
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>
<body >
<section id="app">
<h4>D-One Chatbot</h4>
<ul class="chat">
<li class="message" v-for="(msg, idx) in messages" :key="idx">
<span @click="deleteMessage(idx)"></span>
</li>
</ul>
<input type="text" placeholder="Scrivi un messaggio" v-model="newMes" @keyup.enter="addMessage">
</section>
<script src="./js/app.js"></script>
</body>
</html>