Remove font user options
这个提交包含在:
父节点
963aaa6406
当前提交
b1adf08439
|
@ -100,13 +100,6 @@ the sidebar on the left and 2/12 for the white space on the right), use
|
|||
|
||||
$wgMedikContentWidth = 'narrow';
|
||||
|
||||
### User settings
|
||||
|
||||
#### Basic font size
|
||||
|
||||
Every user is able to change the default font size in their user settings. It's
|
||||
found in `Special:Preferences` under the skin preferences.
|
||||
|
||||
## Contributing
|
||||
|
||||
You can contribute to the original git repository:
|
||||
|
|
|
@ -24,15 +24,10 @@ class MedikTemplate extends BaseTemplate {
|
|||
'narrow' => 'col-xl-8',
|
||||
];
|
||||
|
||||
$fontSize = MediaWikiServices::getInstance()
|
||||
->getUserOptionsLookup()
|
||||
->getOption( $this->getSkin()->getUser(), 'medik-font' );
|
||||
|
||||
echo $templateParser->processTemplate( 'skin', [
|
||||
'medik-color' => RequestContext::getMain()->getConfig()->get( 'MedikColor' ),
|
||||
'html-logo' => $this->getLogo(),
|
||||
'html-search-userlinks' => $this->getSearch() . $this->getUserLinks(),
|
||||
'medik-fontsize' => $fontSize,
|
||||
'html-navigation-heading' => $this->getMsg( 'navigation-heading' )->parse(),
|
||||
'html-site-navigation' => $this->getSiteNavigation(),
|
||||
'medik-content-width' => $contentWidth[
|
||||
|
|
|
@ -32,33 +32,4 @@ class SkinMedik extends SkinTemplate {
|
|||
$out->addModules( [ 'skins.medik.js' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add user preferences
|
||||
*
|
||||
* @param User $user
|
||||
* @param array &$preferences
|
||||
*/
|
||||
public static function onGetPreferences( User $user, array &$preferences ) {
|
||||
$skin = MediaWikiServices::getInstance()
|
||||
->getUserOptionsLookup()
|
||||
->getOption( $user, 'skin' );
|
||||
|
||||
if ( $skin === 'medik' ) {
|
||||
$preferences[ 'medik-font' ] = [
|
||||
'type' => 'select',
|
||||
'label-message' => 'medik-font-label',
|
||||
'section' => 'rendering/skin',
|
||||
'options' => [
|
||||
'80%' => '0.8em',
|
||||
'85%' => '0.85em',
|
||||
'90% (' . wfMessage( 'medik-default' )->text() . ')' => '0.9em',
|
||||
'95%' => '0.95em',
|
||||
'100%' => '1.0em',
|
||||
'105%' => '1.05em',
|
||||
'110%' => '1.1em'
|
||||
],
|
||||
'default' => '0.9em'
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,12 +59,6 @@
|
|||
"description": "Show only logo without text in the navbar."
|
||||
}
|
||||
},
|
||||
"Hooks": {
|
||||
"GetPreferences": "SkinMedik::onGetPreferences"
|
||||
},
|
||||
"DefaultUserOptions": {
|
||||
"medik-font": "0.9em"
|
||||
},
|
||||
"ResourceModules": {
|
||||
"skins.medik": {
|
||||
"class": "ResourceLoaderSkinModule",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div class="row">
|
||||
|
||||
<!-- navigation sidebar -->
|
||||
<div id="mw-navigation" role="navigation" class="col-12 col-md-3 col-xl-2" style="font-size: {{medik-fontsize}};">
|
||||
<div id="mw-navigation" role="navigation" class="col-12 col-md-3 col-xl-2">
|
||||
<nav class="nav flex-column">
|
||||
<h2>
|
||||
{{{html-navigation-heading}}}
|
||||
|
|
正在加载...
在新工单中引用