@@ -159,7 +159,43 @@ Always eager to learn new techniques, share knowledge with the community, and he
159159 "Forensics: Digital detective work" ,
160160 "Incident response: Racing against time" ,
161161 "Bug bounties: Ethical hacking pays" ,
162- "Purple teams: Where red meets blue"
162+ "Purple teams: Where red meets blue" ,
163+ "Information is power, access is everything" ,
164+ "Every click tells a story" ,
165+ "Security is not a product, it's a process" ,
166+ "The weakest link is often human" ,
167+ "Trust but verify, then verify again" ,
168+ "Defense in depth, attack in breadth" ,
169+ "Hackers don't break in, they log in" ,
170+ "Your network is only as secure as its weakest password" ,
171+ "Patch today, breathe easy tomorrow" ,
172+ "Encryption: Making data unreadable to the wrong eyes" ,
173+ "Firewalls: The digital castle walls" ,
174+ "Malware analysis: Dissecting digital pathogens" ,
175+ "Phishing: Fishing for credentials in human waters" ,
176+ "APT: Advanced Persistent Threats require persistent defense" ,
177+ "IoT: Internet of Things, Internet of Threats" ,
178+ "Cloud security: Protecting data in someone else's computer" ,
179+ "Mobile security: Pocket-sized attack vectors" ,
180+ "BYOD: Bring Your Own Device, Bring Your Own Risk" ,
181+ "Threat hunting: Proactive defense against reactive attacks" ,
182+ "SIEM: Security Information and Event Management" ,
183+ "SOC: Security Operations Center - The digital war room" ,
184+ "Honeypots: Sweet traps for digital intruders" ,
185+ "Sandboxing: Quarantining suspicious behavior" ,
186+ "DLP: Data Loss Prevention - Keeping secrets secret" ,
187+ "IAM: Identity and Access Management - You are who you prove to be" ,
188+ "MFA: Multi-Factor Authentication - Something you know, have, and are" ,
189+ "VPN: Virtual Private Networks - Tunneling through public danger" ,
190+ "PKI: Public Key Infrastructure - The backbone of digital trust" ,
191+ "OSINT: Open Source Intelligence - Hiding in plain sight" ,
192+ "CTF: Capture The Flag - Gamifying security skills" ,
193+ "Red team exercises: Authorized adversarial testing" ,
194+ "Blue team defense: Monitoring, detecting, responding" ,
195+ "Purple team collaboration: Breaking down silos" ,
196+ "DevSecOps: Security baked into every code commit" ,
197+ "Shift left: Security from the start, not as an afterthought" ,
198+ "Zero trust: Never trust, always verify"
163199 ]
164200 } ;
165201
@@ -288,10 +324,19 @@ Always eager to learn new techniques, share knowledge with the community, and he
288324 }
289325
290326 console . log ( '✅ Starting quotes animation' ) ;
291- let currentQuoteIndex = 0 ;
327+ let lastQuoteIndex = - 1 ;
292328 let isTyping = false ;
293329 const quotes = data . cybersec_quotes ;
294330
331+ // Function to get random quote index, ensuring it's different from the last one
332+ function getRandomQuoteIndex ( ) {
333+ let randomIndex ;
334+ do {
335+ randomIndex = Math . floor ( Math . random ( ) * quotes . length ) ;
336+ } while ( randomIndex === lastQuoteIndex && quotes . length > 1 ) ;
337+ return randomIndex ;
338+ }
339+
295340 function typewriterEffect ( text , callback ) {
296341 if ( isTyping ) return ;
297342 isTyping = true ;
@@ -301,7 +346,7 @@ Always eager to learn new techniques, share knowledge with the community, and he
301346 const backspaceSpeed = 30 ;
302347 const pauseDuration = 2000 ;
303348
304- // Clear and setup
349+ // Clear and setup with fixed height to prevent page movement
305350 quoteEl . innerHTML = `
306351 <div class="quote-text" style="
307352 font-style: italic;
@@ -310,10 +355,14 @@ Always eager to learn new techniques, share knowledge with the community, and he
310355 line-height: 1.6;
311356 max-width: 800px;
312357 margin: 0 auto;
313- min-height: 2em;
358+ min-height: 4.2em;
359+ height: 4.2em;
360+ display: flex;
361+ align-items: center;
362+ justify-content: center;
314363 opacity: 1;
315364 visibility: visible;
316- display: block ;
365+ overflow: hidden ;
317366 ">
318367 <span id="typing-quote"></span><span class="cursor-blink">|</span>
319368 </div>
@@ -350,10 +399,11 @@ Always eager to learn new techniques, share knowledge with the community, and he
350399 }
351400
352401 function showNextQuote ( ) {
353- const quote = quotes [ currentQuoteIndex ] ;
354- console . log ( `📝 Showing quote: ${ quote } ` ) ;
402+ const randomIndex = getRandomQuoteIndex ( ) ;
403+ lastQuoteIndex = randomIndex ;
404+ const quote = quotes [ randomIndex ] ;
405+ console . log ( `📝 Showing random quote: ${ quote } ` ) ;
355406 typewriterEffect ( quote , ( ) => {
356- currentQuoteIndex = ( currentQuoteIndex + 1 ) % quotes . length ;
357407 setTimeout ( showNextQuote , 500 ) ;
358408 } ) ;
359409 }
0 commit comments