Skip to content

Commit 7e91868

Browse files
committed
add icons
1 parent bc8a99e commit 7e91868

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

static/app.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
$(document).ready(function() {
22
const apiUrl = `${window.origin}/api/chat`; // Replace with your API URL
3-
const converter = new showdown.Converter();
43

54
function sendUserMessage() {
65
const userMessage = $('#user-message').val();
@@ -9,7 +8,6 @@ $(document).ready(function() {
98
// Append user message to the chat
109
$('#chat-container').append(`<div class="alert alert-warning"><strong>You:</strong> ${userMessage}</div>`);
1110
var el = $(`<div class="alert alert-success"></div>`).appendTo('#chat-container');
12-
console.log(el);
1311

1412
// Call API and process the response
1513
callApi(userMessage, el).catch(error => {

static/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Chatbot</title>
77
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
8+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
89
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
9-
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script>
1010
<script src="/app.js"></script>
1111
<style>
1212
#chat-container {
@@ -24,12 +24,12 @@
2424
</style>
2525
</head>
2626
<body>
27-
<div id="chat-container" class="container">
27+
<div id="chat-container" class="container-fluid">
2828

2929
<div class="input-group">
3030
<input type="text" id="user-message" class="form-control" placeholder="Type your message here...">
3131
<span class="input-group-btn">
32-
<button class="btn btn-primary" id="send-message" type="button">Send</button>
32+
<button class="btn btn-primary" id="send-message" type="button"><i class="bi bi-chat-dots"></i></button>
3333
</span>
3434
</div>
3535
</div>

0 commit comments

Comments
 (0)