Fazbeeer commited on
Commit
8759f9f
ยท
verified ยท
1 Parent(s): 84f6a48

change the name of the Ampliy helper from help to FAQ

Browse files
Files changed (5) hide show
  1. components/faq-chat.js +35 -28
  2. components/santa-animation.js +18 -52
  3. index.html +1 -1
  4. script.js +54 -0
  5. style.css +12 -0
components/faq-chat.js CHANGED
@@ -63,7 +63,7 @@ class FAQChat extends HTMLElement {
63
  .chat-toggle-container {
64
  position: fixed;
65
  bottom: 20px;
66
- right: 20px;
67
  z-index: 1001;
68
  }
69
  :host {
@@ -86,31 +86,35 @@ class FAQChat extends HTMLElement {
86
  :host(.open) {
87
  right: 20px;
88
  }
89
-
90
- .chat-toggle-btn {
91
- position: fixed;
92
- bottom: 20px;
93
- right: 20px;
94
- width: 60px;
95
- height: 60px;
96
- background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
97
- border-radius: 50%;
98
- border: 1px solid #e3b341;
99
- color: #e3b341;
100
- display: flex;
101
- align-items: center;
102
- justify-content: center;
103
- cursor: pointer;
104
- z-index: 999;
105
- box-shadow: 0 2px 10px rgba(0,0,0,0.2);
106
- transition: all 0.3s ease;
107
- }
108
-
109
- .chat-toggle-btn:hover {
110
- transform: scale(1.1);
111
- background: #e3b341;
112
- color: #000;
113
- }
 
 
 
 
114
  .chat-container {
115
  display: flex;
116
  flex-direction: column;
@@ -221,9 +225,12 @@ class FAQChat extends HTMLElement {
221
  }
222
  </style>
223
  <div class="chat-toggle-btn" id="chat-toggle">
224
- <i data-feather="message-square"></i>
 
 
 
225
  </div>
226
- <div class="chat-container">
227
  <div class="chat-header">
228
  <i data-feather="message-square"></i>
229
  Amplify FAQ Helper
 
63
  .chat-toggle-container {
64
  position: fixed;
65
  bottom: 20px;
66
+ left: 20px;
67
  z-index: 1001;
68
  }
69
  :host {
 
86
  :host(.open) {
87
  right: 20px;
88
  }
89
+ .chat-toggle-btn {
90
+ position: fixed;
91
+ bottom: 20px;
92
+ left: 20px;
93
+ min-width: 100px;
94
+ height: 50px;
95
+ background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
96
+ border-radius: 25px;
97
+ border: 1px solid #e3b341;
98
+ color: #e3b341;
99
+ display: flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ cursor: pointer;
103
+ z-index: 999;
104
+ box-shadow: 0 2px 10px rgba(0,0,0,0.2);
105
+ transition: all 0.3s ease;
106
+ padding: 0 20px;
107
+ font-weight: bold;
108
+ text-transform: uppercase;
109
+ font-size: 14px;
110
+ letter-spacing: 1px;
111
+ }
112
+ .chat-toggle-btn:hover {
113
+ transform: scale(1.05);
114
+ background: #e3b341;
115
+ color: #000;
116
+ box-shadow: 0 0 15px rgba(227, 179, 65, 0.5);
117
+ }
118
  .chat-container {
119
  display: flex;
120
  flex-direction: column;
 
225
  }
226
  </style>
227
  <div class="chat-toggle-btn" id="chat-toggle">
228
+ <div class="flex items-center">
229
+ <i data-feather="help-circle" class="mr-2"></i>
230
+ <span>Help</span>
231
+ </div>
232
  </div>
233
+ <div class="chat-container">
234
  <div class="chat-header">
235
  <i data-feather="message-square"></i>
236
  Amplify FAQ Helper
components/santa-animation.js CHANGED
@@ -21,8 +21,8 @@ class SantaAnimation extends HTMLElement {
21
  font-size: 64px;
22
  white-space: nowrap;
23
  animation:
24
- flyAcross 14s linear infinite,
25
- floatUpDown 2.5s ease-in-out infinite;
26
  filter: drop-shadow(0 0 10px rgba(255,0,0,0.5));
27
  }
28
 
@@ -36,37 +36,16 @@ class SantaAnimation extends HTMLElement {
36
  50% { top: 26%; }
37
  }
38
 
39
- .reindeer {
40
- position: absolute;
41
- font-size: 32px;
42
- animation: run 0.5s alternate infinite ease-in-out;
43
- }
44
-
45
- @keyframes run {
46
- from { transform: rotate(15deg); }
47
- to { transform: rotate(-15deg); }
48
- }
49
-
50
- .light {
51
- position: absolute;
52
- animation: glow 1.5s infinite alternate;
53
- }
54
-
55
- @keyframes glow {
56
- from { opacity: 0.4; }
57
- to { opacity: 1; }
58
- }
59
-
60
- .snowflake {
61
  position: absolute;
62
  color: white;
63
- opacity: 0.7;
64
- animation: snow 10s linear infinite;
65
  }
66
 
67
- @keyframes snow {
68
- from { transform: translateY(-10vh); }
69
- to { transform: translateY(110vh); }
70
  }
71
  </style>
72
  <div class="santa-container">
@@ -74,30 +53,17 @@ class SantaAnimation extends HTMLElement {
74
  </div>
75
  `;
76
 
77
- // Add lights
78
- const colors = ['gold', 'lime', 'cyan', 'orange'];
79
- for (let i = 0; i < 8; i++) {
80
- const light = document.createElement("div");
81
- light.className = "light";
82
- light.textContent = "โœจ";
83
- light.style.left = Math.random() * 100 + "vw";
84
- light.style.top = Math.random() * 100 + "vh";
85
- light.style.color = colors[Math.floor(Math.random() * colors.length)];
86
- light.style.fontSize = 12 + Math.random() * 20 + "px";
87
- this.shadowRoot.querySelector('.santa-container').appendChild(light);
88
- }
89
-
90
- // Add snowflakes
91
- for (let i = 0; i < 20; i++) {
92
- const snow = document.createElement("div");
93
- snow.className = "snowflake";
94
- snow.textContent = "โ†";
95
- snow.style.left = Math.random() * 100 + "vw";
96
- snow.style.fontSize = 10 + Math.random() * 15 + "px";
97
- snow.style.animationDuration = 5 + Math.random() * 10 + "s";
98
- this.shadowRoot.querySelector('.santa-container').appendChild(snow);
99
  }
100
  }
101
  }
102
-
103
  customElements.define('santa-animation', SantaAnimation);
 
21
  font-size: 64px;
22
  white-space: nowrap;
23
  animation:
24
+ flyAcross 12s linear infinite,
25
+ floatUpDown 2s ease-in-out infinite;
26
  filter: drop-shadow(0 0 10px rgba(255,0,0,0.5));
27
  }
28
 
 
36
  50% { top: 26%; }
37
  }
38
 
39
+ .star {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  position: absolute;
41
  color: white;
42
+ opacity: 0.3;
43
+ animation: twinkle 3s infinite ease-in-out;
44
  }
45
 
46
+ @keyframes twinkle {
47
+ 0%, 100% { opacity: 0.3; }
48
+ 50% { opacity: 1; }
49
  }
50
  </style>
51
  <div class="santa-container">
 
53
  </div>
54
  `;
55
 
56
+ // Add stars
57
+ for (let i = 0; i < 30; i++) {
58
+ const star = document.createElement("div");
59
+ star.className = "star";
60
+ star.textContent = "โœฆ";
61
+ star.style.left = Math.random() * 100 + "vw";
62
+ star.style.top = Math.random() * 100 + "vh";
63
+ star.style.fontSize = Math.random() * 10 + 8 + "px";
64
+ star.style.animationDelay = Math.random() * 3 + "s";
65
+ this.shadowRoot.querySelector('.santa-container').appendChild(star);
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
  }
68
  }
 
69
  customElements.define('santa-animation', SantaAnimation);
index.html CHANGED
@@ -452,7 +452,7 @@ Get Started Now
452
  </div>
453
  <!-- Footer Component -->
454
  <script src="components/footer.js"></script>
455
- <script>
456
  var player;
457
 
458
  function onYouTubeIframeAPIReady() {
 
452
  </div>
453
  <!-- Footer Component -->
454
  <script src="components/footer.js"></script>
455
+ <script>
456
  var player;
457
 
458
  function onYouTubeIframeAPIReady() {
script.js CHANGED
@@ -147,6 +147,60 @@ function initFaqChat() {
147
 
148
  document.addEventListener('DOMContentLoaded', () => {
149
  initFaqChat();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  const style = document.createElement('style');
151
  style.innerHTML = `
152
  @keyframes fall {
 
147
 
148
  document.addEventListener('DOMContentLoaded', () => {
149
  initFaqChat();
150
+
151
+ // Create Christmas elements
152
+ function createChristmasElements() {
153
+ // Create snowflakes container
154
+ const snowContainer = document.createElement('div');
155
+ snowContainer.style.position = 'fixed';
156
+ snowContainer.style.top = '0';
157
+ snowContainer.style.left = '0';
158
+ snowContainer.style.width = '100%';
159
+ snowContainer.style.height = '100%';
160
+ snowContainer.style.pointerEvents = 'none';
161
+ snowContainer.style.zIndex = '9999';
162
+ document.body.appendChild(snowContainer);
163
+
164
+ function createSnowflake() {
165
+ const snowflake = document.createElement('div');
166
+ snowflake.textContent = 'โ†';
167
+ snowflake.style.position = 'absolute';
168
+ snowflake.style.color = 'white';
169
+ snowflake.style.fontSize = Math.random() * 10 + 10 + 'px';
170
+ snowflake.style.opacity = Math.random();
171
+ snowflake.style.left = Math.random() * window.innerWidth + 'px';
172
+ snowflake.style.top = '-20px';
173
+ snowflake.style.animation = `fall ${5 + Math.random() * 10}s linear infinite`;
174
+ snowContainer.appendChild(snowflake);
175
+ setTimeout(() => snowflake.remove(), 15000);
176
+ }
177
+
178
+ // Create Christmas decorations
179
+ function createDecoration() {
180
+ const deco = document.createElement('div');
181
+ deco.className = 'christmas-decoration';
182
+ deco.style.left = Math.random() * window.innerWidth + 'px';
183
+ deco.style.top = Math.random() * window.innerHeight + 'px';
184
+
185
+ const decoTypes = ['๐ŸŽ„', '๐ŸŽ…', '๐ŸŽ', '๐Ÿ””', '๐Ÿงฆ'];
186
+ deco.textContent = decoTypes[Math.floor(Math.random() * decoTypes.length)];
187
+ deco.style.fontSize = Math.random() * 20 + 20 + 'px';
188
+ deco.style.animationDelay = Math.random() * 5 + 's';
189
+
190
+ document.body.appendChild(deco);
191
+ }
192
+
193
+ // Snow falling animation
194
+ setInterval(createSnowflake, 150);
195
+
196
+ // Add decorations
197
+ for (let i = 0; i < 15; i++) {
198
+ createDecoration();
199
+ }
200
+ }
201
+
202
+ // Initialize Christmas elements
203
+ createChristmasElements();
204
  const style = document.createElement('style');
205
  style.innerHTML = `
206
  @keyframes fall {
style.css CHANGED
@@ -48,6 +48,18 @@ body::after {
48
  pointer-events: none;
49
  z-index: -1;
50
  }
 
 
 
 
 
 
 
 
 
 
 
 
51
  .font-orbitron {
52
  font-family: 'Orbitron', sans-serif;
53
  }
 
48
  pointer-events: none;
49
  z-index: -1;
50
  }
51
+ /* Christmas decorations */
52
+ .christmas-decoration {
53
+ position: fixed;
54
+ z-index: 9997;
55
+ pointer-events: none;
56
+ animation: float 6s ease-in-out infinite;
57
+ }
58
+
59
+ @keyframes float {
60
+ 0%, 100% { transform: translateY(0); }
61
+ 50% { transform: translateY(-20px); }
62
+ }
63
  .font-orbitron {
64
  font-family: 'Orbitron', sans-serif;
65
  }