aboutsummaryrefslogtreecommitdiff
blob: e800bfe0d8cee7e3fa353b9837a580de126f95c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
 * Tyrian -- the new look of gentoo.org
 * MediaWiki implementation based on MonoBook nouveau.
 *
 * Copyright (C) 2014-2016 Alex Legler <a3li@gentoo.org>
 */

$wgExtensionCredits['skin'][] = array(
	'path' => __FILE__,
	'name' => 'Tyrian',
	'namemsg' => 'skinname-tyrian',
	'descriptionmsg' => 'tyrian-desc',
	'url' => 'http://www.gentoo.org/',
	'author' => array('Alex Legler'),
	'license-name' => 'GPLv2',
);

// Register files
$wgAutoloadClasses['SkinTyrian'] = __DIR__ . '/SkinTyrian.php';
$wgAutoloadClasses['TyrianTemplate'] = __DIR__ . '/TyrianTemplate.php';
$wgMessagesDirs['Tyrian'] = __DIR__ . '/i18n';

// Register skin
$wgValidSkinNames['tyrian'] = 'Tyrian';

// Register modules
$wgResourceModules['skins.tyrian.styles'] = array(
	'position' => 'top',
	'styles' => array(
		'main.css' => array('media' => 'screen'),
	),
	'remoteSkinPath' => 'Tyrian',
	'localBasePath' => __DIR__,
);

$wgHooks['OutputPageBeforeHTML'][] = 'injectMetaTags';

function injectMetaTags($out) {
	$out->addMeta('viewport', 'width=device-width, initial-scale=1.0');
	$out->addMeta('theme-color', '#54487a');
	return true;
}