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

Editingthingsforlife (talk | contribs)
Created page with "public class WikiTheme { // Define theme properties for an eerie, uncanny aesthetic private static final String PRIMARY_COLOR = "#1E2528"; // Dark, muted teal-gray private static final String SECONDARY_COLOR = "#D8E0E3"; // Off-white, slightly unsettling private static final String ACCENT_COLOR = "#4A5B66"; // Cold, muted blue private static final String FONT_FAMILY = "'Roboto', sans-serif"; // Clean but slightly sterile private static final doubl..."
 
Editingthingsforlife (talk | contribs)
No edit summary
Line 1: Line 1:
public class WikiTheme {
// Eerie JavaScript effects for Descent Wiki
    // Define theme properties for an eerie, uncanny aesthetic
    private static final String PRIMARY_COLOR = "#1E2528"; // Dark, muted teal-gray
    private static final String SECONDARY_COLOR = "#D8E0E3"; // Off-white, slightly unsettling
    private static final String ACCENT_COLOR = "#4A5B66"; // Cold, muted blue
    private static final String FONT_FAMILY = "'Roboto', sans-serif"; // Clean but slightly sterile
    private static final double OPACITY = 0.95; // Slight transparency for unease
    private static final String BACKGROUND_GRADIENT = "linear-gradient(135deg, #1E2528, #2A3439)";


    // Method to apply theme to Vector-2022 skin
// Wait for the DOM to load
    public void applyEerieTheme() {
$(document).ready(function() {
        // Set global styles
    // 1. Subtle Background Flicker
        setBackground(BACKGROUND_GRADIENT);
    const backgroundContainer = $('#mw-content-text');
        setFont(FONT_FAMILY, "1.1em", "300");
    if (backgroundContainer.length) {
         setOpacity(OPACITY);
         setInterval(function() {
 
            backgroundContainer.css('opacity', Math.random() * 0.1 + 0.9); // Random opacity between 0.9 and 1
        // Style header (masthead)
         }, 3000 + Math.random() * 2000); // Flicker every 3-5 seconds
        styleHeader(PRIMARY_COLOR, SECONDARY_COLOR, "box-shadow: 0 2px 5px rgba(0,0,0,0.5)");
 
        // Style content area
        styleContent(SECONDARY_COLOR, ACCENT_COLOR, "border: 1px solid #4A5B66; border-radius: 5px");
 
        // Style links to feel slightly off
        styleLinks(ACCENT_COLOR, "text-decoration: none; transition: color 0.3s ease-in-out");
 
         // Add subtle animations for unease
        addHoverEffects("transform: scale(1.02); filter: brightness(0.9)");
     }
     }


     // Method to simulate CSS injection into MediaWiki
     // 2. Hover Distortion on Sidebar Links
     public void injectCSS(String cssRules) {
    const sidebarLinks = $('.vector-menu-portal .vector-menu-content li a');
         // Pseudo-method to write to MediaWiki:Common.css
     sidebarLinks.each(function() {
         System.out.println("Injecting CSS: " + cssRules);
         $(this).on('mouseover', function() {
     }
            $(this).css({
                'transform': 'translateX(' + (Math.random() * 4 - 2) + 'px)', // Slight horizontal glitch
                'filter': 'brightness(0.8)' // Dim on hover
            });
         }).on('mouseout', function() {
            $(this).css({
                'transform': 'translateX(0)',
                'filter': 'brightness(1)'
            });
        });
     });


     public static void main(String[] args) {
     // 3. Delayed Text Fade-In for Main Content
        WikiTheme theme = new WikiTheme();
    const mainContent = $('.mw-parser-output');
         theme.applyEerieTheme();
    mainContent.css('opacity', 0); // Start hidden
     }
    setTimeout(function() {
}
         mainContent.animate({ opacity: 1 }, 2000); // Fade in over 2 seconds
     }, 1000); // Delay by 1 second
});