-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.html
176 lines (169 loc) · 4.61 KB
/
popup.html
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html>
<head>
<title>AMA</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
width: 350px;
padding: 10px;
background-color: #f7f7f7;
display: flex;
flex-direction: column;
height: 500px;
box-sizing: border-box;
}
#status {
margin-bottom: 10px;
}
#startCrawl {
width: 100%;
padding: 10px;
background-color: #057c21;
border: none;
color: white;
font-size: 16px;
border-radius: 5px;
cursor: pointer;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
#startCrawl:disabled {
background-color: #cccccc;
cursor: not-allowed;
}
#progressContainer {
width: 100%;
background-color: #e0e0e0;
border-radius: 5px;
overflow: hidden;
margin-top: 10px;
display: none;
}
#progressBar {
height: 10px;
background-color: #4caf50;
width: 0%;
}
#chatSection {
margin-top: 20px;
flex: 1;
max-height: 300px;
overflow-y: auto;
background-color: white;
padding: 10px;
border-radius: 5px;
box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.message {
margin-bottom: 15px;
overflow-wrap: break-word;
}
.message.user {
text-align: right;
}
.message.assistant {
text-align: left;
}
.message .bubble {
display: inline-block;
padding: 10px;
border-radius: 15px;
max-width: 80%;
}
.message.user .bubble {
background-color: #057c21;
color: white;
border-bottom-right-radius: 0;
}
.message.assistant .bubble {
background-color: #e5e5ea;
color: black;
border-bottom-left-radius: 0;
}
#inputSection {
margin-top: 10px;
display: flex;
}
#questionInput {
flex: 1;
padding: 10px;
border-radius: 20px;
border: 1px solid #ccc;
outline: none;
font-size: 14px;
}
#askQuestion {
margin-left: 10px;
padding: 10px 15px;
background-color: #057c21;
border: none;
color: white;
font-size: 16px;
border-radius: 50%;
cursor: pointer;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
#askQuestion:disabled {
background-color: #cccccc;
cursor: not-allowed;
}
#settingsLink {
margin-top: 15px;
text-align: right;
}
#settingsLink a {
text-decoration: none;
font-size: 14px;
color: #057c21;
}
#settingsLink a:hover {
text-decoration: underline;
}
#footer {
margin-top: 10px;
text-align: center;
font-size: 12px;
color: #888;
}
#footer a {
color: #057c21;
text-decoration: none;
display: inline-flex;
align-items: center;
}
#footer a:hover {
text-decoration: underline;
}
#footer .fire-emoji {
margin-left: 5px;
}
#chatSection::-webkit-scrollbar {
width: 8px;
}
#chatSection::-webkit-scrollbar-thumb {
background-color: #cccccc;
border-radius: 4px;
}
</style>
</head>
<body>
<div id="status">Click the button to start crawling the current site.</div>
<button id="startCrawl">Start Crawl</button>
<div id="progressContainer">
<div id="progressBar"></div>
</div>
<div id="settingsLink">
<a href="#" id="openOptions">Settings</a>
</div>
<div id="chatSection" style="display:none;">
</div>
<div id="inputSection" style="display:none;">
<input type="text" id="questionInput" placeholder="Type your message here..." />
<button id="askQuestion">➤</button>
</div>
<div id="footer">
Built with <3 by <a href="https://www.github.com/TRohit20" target="_blank" rel="noopener noreferrer">Rohit</a>
</div>
<script src="popup.js"></script>
</body>
</html>