File size: 2,937 Bytes
66ad91e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97813a3
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
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Chatbot Embed with AnythingLLM</title>
  
  <!-- CSS Styles -->
  <style>
    /* Basic reset */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    /* Body styling */
    body {
      font-family: Arial, sans-serif;
      background-color: #f4f4f4;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* Header styling */
    header {
      background-color: #4CAF50;
      color: white;
      padding: 1rem;
      text-align: center;
    }

    /* Main content styling */
    main {
      flex: 1;
      padding: 2rem;
      text-align: center;
    }

    /* Chatbot widget container */
    .chatbot-widget {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 1000;
    }

    /* Optional: Button to open the chatbot */
    .chatbot-button {
      background-color: #4CAF50;
      color: white;
      border: none;
      padding: 15px;
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      transition: background-color 0.3s ease;
      font-size: 18px;
    }

    .chatbot-button:hover {
      background-color: #45a049;
    }
  </style>
</head>
<body>

  <!-- Header Section -->
  <header>
    <h1>Welcome to Our Website</h1>
    <p>Interact with our chatbot below!</p>
  </header>

  <!-- Main Content -->
  <main>
    <h2>About Us</h2>
    <p>Here is some information about our services...</p>
    <!-- Add more content as needed -->
  </main>

  <!-- Chatbot Widget Container -->
  <div class="chatbot-widget">
    <!-- Optional: Chatbot Open Button -->
    <button class="chatbot-button" id="open-chatbot">💬</button>
  </div>

  <!-- Chatbot Embed Script -->
  <script
    data-embed-id="f873bd25-2eb1-4e69-9f13-114ca6585a5b"
    data-base-api-url="https://severian-anything.hf.space/api/embed"
    src="https://severian-anything.hf.space/embed/anythingllm-chat-widget.min.js">
  </script>

  <!-- Optional: Script to Toggle Chatbot Visibility -->
  <script>
    // Wait for the DOM to load
    document.addEventListener('DOMContentLoaded', function() {
      const chatbotButton = document.getElementById('open-chatbot');

      // Assuming the chat widget adds an iframe or a specific element, you may need to adjust the selector
      chatbotButton.addEventListener('click', function() {
        // Toggle visibility of the chatbot widget
        const chatbotIframe = document.querySelector('iframe[src*="anythingllm-chat-widget"]');
        if (chatbotIframe) {
          if (chatbotIframe.style.display === 'none' || !chatbotIframe.style.display) {
            chatbotIframe.style.display = 'block';
          } else {
            chatbotIframe.style.display = 'none';
          }
        }
      });
    });
  </script>

</body>
</html>