User:Editingthingsforlife/vector-2022.js: Difference between revisions

Editingthingsforlife (talk | contribs)
No edit summary
Editingthingsforlife (talk | contribs)
No edit summary
Line 1: Line 1:
// Eerie JavaScript effects for Descent Wiki
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Madness Descent Wiki</title>
    <link href="style.css" rel="stylesheet" type="text/css" media="all">
    <link href="https://fonts.googleapis.com/css2?family=Special+Elite&family=Roboto+Condensed:wght@400;700&display=swap" rel="stylesheet">
  </head>
  <body>
    <div class="container">
      <!-- Sidebar -->
      <nav class="sidebar">
        <div class="logo">
          <img src="/madness_descent_logo.png" alt="Madness Descent Logo">
        </div>
        <h2>Navigation</h2>
        <ul class="nav-links">
          <li><a href="/monsters.html">Monsters</a></li>
          <li><a href="#">Items</a></li>
          <li><a href="#">Lore</a></li>
          <li><a href="#">Credits</a></li>
        </ul>
        <h2>Community</h2>
        <ul class="community-links">
          <li><a href="https://discord.gg/GTBAKgCrez" target="_blank">Discord Server</a></li>
          <li><a href="#">Credits</a></li>
        </ul>
      </nav>


$(document).ready(function() {
      <!-- Main Content -->
    // 1. Background Flicker
      <main class="main-content">
    const backgroundContainer = $('#mw-content-text');
        <div class="header-bar">
    if (backgroundContainer.length) {
          <div class="tabs">
        setInterval(function() {
            <a href="#" class="active">Main Page</a>
             backgroundContainer.css('opacity', Math.random() * 0.1 + 0.9); // Flicker between 0.9 and 1 opacity
            <a href="#">Discussion</a>
         }, 4000 + Math.random() * 3000); // Flicker every 4-7 seconds
             <a href="#">History</a>
    }
          </div>
         </div>


    // 2. Glitchy Hover on Sidebar Links
        <div class="hero-section">
    const sidebarLinks = $('.vector-menu-portal .vector-menu-content li a');
          <h1>Madness Descent Wiki</h1>
    sidebarLinks.each(function() {
          <p>Welcome to the official Madness Descent Wiki!</p>
        $(this).on('mouseover', function() {
          <p>Madness Descent is an asymmetrical Roblox game inspired by Pillar Chase 2.</p>
            $(this).css({
        </div>
                'transform': 'translateX(' + (Math.random() * 5 - 2.5) + 'px)', // Random horizontal glitch
                'filter': 'brightness(0.7)' // Dim on hover
            });
        }).on('mouseout', function() {
            $(this).css({
                'transform': 'translateX(0)',
                'filter': 'brightness(1)'
            });
        });
    });


    // 3. Delayed Fade-In for Welcome Message
        <section class="navigation">
    const welcomeMessage = $('.mw-parser-output p');
          <table>
    welcomeMessage.css('opacity', 0); // Start hidden
            <thead>
    setTimeout(function() {
              <tr>
         welcomeMessage.animate({ opacity: 1 }, 2500); // Fade in over 2.5 seconds
                <th>Explore</th>
     }, 1500); // Delay by 1.5 seconds
              </tr>
});
            </thead>
            <tbody>
              <tr>
                <td><a href="/monsters.html" class="table-link">Monsters</a></td>
              </tr>
            </tbody>
          </table>
         </section>
      </main>
     </div>
  </body>
</html>