MediaWiki:Common.js: Difference between revisions
From Lenn's Fun Stuff
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* Force load Google Fonts for Anisa */ | /* Force load Google Fonts for Anisa */ | ||
$('head').append('<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap">'); | $('head').append('<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap">'); | ||
/* FORCE ANISA THEME INJECTION */ | |||
$(document).ready(function() { | |||
if (mw.config.get('skin') === 'anisa') { | |||
var khStyles = ` | |||
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap'); | |||
:root { | |||
--kh-green: #3e5a47 !important; | |||
--kh-yellow: #ffd700 !important; | |||
--kh-dark-text: #2d4234 !important; | |||
--kh-light-bg: #f9fdfa !important; | |||
} | |||
.mw-parser-output h2, .mw-parser-output h3 { | |||
border-bottom: 2px solid var(--kh-green) !important; | |||
color: var(--kh-green) !important; | |||
font-family: 'Cinzel', serif !important; | |||
} | |||
.mw-parser-output h2::before { content: "\1F343 "; } | |||
`; | |||
$('<style>').text(khStyles).appendTo('head'); | |||
} | |||
}); | |||
Revision as of 06:23, 13 March 2026
/* Force load Google Fonts for Anisa */
$('head').append('<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap">');
/* FORCE ANISA THEME INJECTION */
$(document).ready(function() {
if (mw.config.get('skin') === 'anisa') {
var khStyles = `
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap');
:root {
--kh-green: #3e5a47 !important;
--kh-yellow: #ffd700 !important;
--kh-dark-text: #2d4234 !important;
--kh-light-bg: #f9fdfa !important;
}
.mw-parser-output h2, .mw-parser-output h3 {
border-bottom: 2px solid var(--kh-green) !important;
color: var(--kh-green) !important;
font-family: 'Cinzel', serif !important;
}
.mw-parser-output h2::before { content: "\1F343 "; }
`;
$('<style>').text(khStyles).appendTo('head');
}
});