User:Editingthingsforlife/vector-2022.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
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 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
public void applyEerieTheme() {
// Set global styles
setBackground(BACKGROUND_GRADIENT);
setFont(FONT_FAMILY, "1.1em", "300");
setOpacity(OPACITY);
// Style header (masthead)
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
public void injectCSS(String cssRules) {
// Pseudo-method to write to MediaWiki:Common.css
System.out.println("Injecting CSS: " + cssRules);
}
public static void main(String[] args) {
WikiTheme theme = new WikiTheme();
theme.applyEerieTheme();
}
}