File size: 2,537 Bytes
cce2a89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/chat_style.css') }}">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <title>Collapsible Chat Panel</title>
</head>

<body>
    <button class="btn btn-primary toggle-button" type="button" id="toggleButton">
        <i class="fas fa-arrow-left"></i>
    </button>
    <div class="container">
            <div class="sidechatpanel" id="sidechatpanel">
                <div class="msger-header">
                    <span class="">LaborEconomicsBot</span>
                    <a href="javascript:void(0)" class="closebtn" onclick="closeNav()"
                        style="float: right; margin-right: 15px;">
                        <i class="fas fa-times"></i>
                    </a>
                </div>
                <div class="chat-container">
                    <div class="bot-message">
                        <div class="bot-icon"></div>
                        <div class="bot-message-bubble">
                            Ask any question related to labor ecomomics Data!
                        </div>
                    </div>
                </div>

                <form class="msger-inputarea" method="POST">
                    <div class="msger-input">
                        <input type="text" id="textInput" autocomplete="off" placeholder="Enter your message...">
                        <!-- Hidden field to capture any other value from the web page -->
                        <input type="hidden" name="hiddenField" id="hiddenField">
                        <button type="submit" class="msger-send-btn"></button>
                    </div>
                </form>
            </div>
        <!-- </div> -->
    </div>

    <script src='https://use.fontawesome.com/releases/v5.0.13/js/all.js'></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script>
        const toggleButton = document.getElementById('toggleButton');
        const sidechatpanel = document.getElementById('sidechatpanel');

        toggleButton.addEventListener('click', () => {
            sidechatpanel.classList.toggle('show');
        });
    </script>
    <script>
        function closeNav() {
            document.getElementById("toggleButton").click();
        }   
    </script>
</body>

</html>