You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ai-test.html
+89Lines changed: 89 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,72 @@ <h4 style="font-size: 18px; margin: 0; color: #c0c0ff;">🤖 Forum AI: ChatGPT A
37
37
</body>
38
38
</html>
39
39
40
+
<style>
41
+
/* Floating Button Styles */
42
+
#floatingButton {
43
+
position: fixed;
44
+
bottom:20px;
45
+
right:20px;
46
+
background-color:#007bff;
47
+
color: white;
48
+
border: none;
49
+
padding:15px20px;
50
+
border-radius:5px;
51
+
cursor: pointer;
52
+
box-shadow:02px5pxrgba(0,0,0,0.2);
53
+
z-index:1000; /* Ensure it's above other elements */
54
+
}
55
+
56
+
#floatingButton:hover {
57
+
background-color:#0056b3;
58
+
}
59
+
60
+
/* Widget Styles */
61
+
.widget {
62
+
position: fixed;
63
+
bottom:80px; /* Adjust based on button position and desired spacing */
64
+
right:20px;
65
+
background-color: white;
66
+
border:1px solid #ccc;
67
+
border-radius:5px;
68
+
box-shadow:04px8pxrgba(0,0,0,0.1);
69
+
z-index:999; /* Ensure it's below the button if you want the button always on top */
70
+
width:300px; /* Adjust as needed */
71
+
max-height:400px; /* Optional: for scrollable content */
72
+
overflow-y: auto; /* Optional: for scrollable content */
73
+
display: none; /* Initially hidden */
74
+
}
75
+
76
+
.widget-header {
77
+
background-color:#f0f0f0;
78
+
padding:10px;
79
+
border-bottom:1px solid #ddd;
80
+
display: flex;
81
+
justify-content: space-between;
82
+
align-items: center;
83
+
border-top-left-radius:5px;
84
+
border-top-right-radius:5px;
85
+
}
86
+
87
+
.widget-headerh3 {
88
+
margin:0;
89
+
font-size:1.2em;
90
+
}
91
+
92
+
#closeWidgetButton {
93
+
background: none;
94
+
border: none;
95
+
font-size:1.5em;
96
+
cursor: pointer;
97
+
padding:0;
98
+
line-height:1;
99
+
}
100
+
101
+
.widget-content {
102
+
padding:15px;
103
+
}
104
+
</style>
105
+
40
106
<script>
41
107
constapiKey="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";// Your provided API key
42
108
@@ -74,3 +140,26 @@ <h4 style="font-size: 18px; margin: 0; color: #c0c0ff;">🤖 Forum AI: ChatGPT A
74
140
document.getElementById("responseContent").textContent="Oops, something went wrong!";
0 commit comments