Skin:Minerva Neue

From mediawiki.org
This page is a translated version of the page Skin:Minerva Neue and the translation is 68% complete.
此皮肤随附于MediaWiki 1.38及更高版本。 因此您无需另外下载。 但是,您仍需遵循此页面提供的其他使用说明。
MediaWiki皮肤手冊 - 分类
Minerva Neue (Minerva)
发行状态: 稳定版
兼容性政策 快照跟随MediaWiki发布。 master分支不向后兼容。
许可协议 GNU通用公共协议2.0或更新版本
下载
示例 在此维基上的例子
翻译Minerva Neue皮肤(如在translatewiki.net可用)
Vagrant角色 minerva
问题 : 开启的任务 · 报告错误
Minerva是能适应移动设备的响应式界面。

Minerva是世界各地维基媒体项目用于移动版的的皮肤。 与其他皮肤(如Vector )相比,它提供了一个更加简单的用户界面,并且在性能优化方面更优于其他皮肤,从而能够满足移动版用户的需求。

该皮肤经过优化,可与移动前端 扩展一起使用(把wgMFDefaultSkinClass设置成“SkinMinerva”即可),但在MediaWiki 1.35之后,无需安装扩展也可使用Minerva Neue。 对于较早的MediaWiki版本,需要安装MobileFrontend。

安裝

  • 如果使用Vagrant ,请通过vagrant roles enable minerva -p安装

手动安装

  • 下载文件,并将其放置在您skins/文件夹中的MinervaNeue目录内。
  • 将下列代码放置在您的LocalSettings.php 文件的底部:
    wfLoadSkin( 'MinervaNeue' );
    $wgDefaultSkin = 'minerva';
    
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认皮肤已成功安装。
  • 注意:设置$wgDefaultSkin = 'minerva'将使“Minerva”成为您的默认皮肤,即使是桌面版。 如果你只希望移动前端使用Minerva皮肤,则忽略这一行,使用$wgDefaultMobileSkin = 'minerva';(最近版本默认设置)。
参数设置中的Minerva

确保在调用wfLoadExtension之后才调用wfLoadSkin

MobileFrontend整合

整合了MobileFrontend(移动端模式)之后,使用Minerva的体验会提升,且会有各类其他功能:

  • 红链编辑确认
  • 参考资料弹窗
  • 增强版的搜索
  • 与更多热门的维基百科模板样式在移动设备上更好地整合

如要体验其好处:

使移动端Minerva同桌面端Minerva表现相同

When MobileFrontend is installed, Minerva is modified to behave in a simplified mode. If you would like Minerva to behave more like the desktop version add the following code to LocalSettings.php:

$wgMinervaTalkAtTop['base'] = true;
$wgMinervaAdvancedMainMenu['base'] = true;
$wgMinervaPersonalMenu['base'] = true;
$wgMinervaHistoryInPageActions['base'] = true;
$wgMinervaOverflowInPageActions['base'] = true;
$wgMinervaShowCategories['base'] = true;

配置

你的本地下载或在线中的Minerva readme列举了配置。

近期弃用的配置

  • $wgMinervaCountErrors - 曾用于通过statsd计数错误。 In the unlikely event you were using it as a 3rd party please refer to 扩展:WikimediaEvents for client side error logging.

配置菜单

主菜单中的某些URL可以调整。包括:

当添加相关扩展时,某些菜单项将自动启用。

Configuration of donation link

$wgMinervaDonateLink['base'] = true;
Default value is in MediaWiki 1.35 true and in 1.39 false.

When enabled a donate link will be added to the main menu. The donate link uses the sitesupport and sitesupport-url mediawiki messages.

桌面版和移动版的对比


MobileFrontend提供了MediaWiki Core中没有的附加功能。 您可以比较desktopmobile mode

当您正在移动版操作时,下面这些功能是可以使用的:

  • Core workflows such as editing and talk will trigger JavaScript based workflows. This is provided by Extension:移动前端 . See there for more for details.
  • 章节可以折叠和展开。 展开的章节会记忆在浏览器的本地存储中。
  • 根据当前模式,菜单包含了不同的选项,比如Special:Preferences可以在桌面版上使用。
  • 网页加载MediaWiki:Mobile.css(对于移动版)或MediaWiki:Common.css(对于桌面版)。
  • 如果启用了移动前端,该皮肤会链接到对移动设备进行了优化的页面。 参见Extension:移动前端 以获取更多信息。 比如,Special:Watchlist(对比桌面移动
  • 在移动版视图中,如文档中所说,导航栏侧边栏是隐藏的。

移动版中的桌面版选项是实验性的。 如果您发现了缺陷(bug)或提供修复补丁(patches),我们将不胜感激。

在桌面版上操作有很多问题,我们正在努力解决以修复。 欢迎您提供补丁和帮助。

问答

如果你有一个问题但本页没有解答——请放心使用讨论页面提出这些问题。

我安装移动前端时会得到什么?

Minerva works without MobileFrontend but installing MobileFrontend will provide several enhancements – notably reference and red link pop-up drawers, and a mobile optimized search and custom editor. These optimizations will apply to the desktop and mobile version. Currently it is not possible to disable the mobile view link but patches to that effect will gladly be accepted!

I maintain an extension, how can I integrate with Minerva?

How should I target styles to Minerva?

If the extension includes any UI, when testing your extension with Minerva, it is important to check if your extension works or degrades acceptably on break points. For testing purposes, Minerva operates on several breakpoints: 320px (@width-breakpoint-mobile), 720px (@width-breakpoint-tablet) and 1000px (@width-breakpoint-desktop). Your extension is expected to adapt to these breakpoints using appropriate media queries. It is acceptable for a feature to disable altogether, provided it gives the user feedback where necessary e.g.

@import 'mediawiki.skin.default.less';

@media screen and ( max-width: @width-breakpoint-tablet ) {
.myfeature { display: none; } /* not supported for mobile users */
.myfeature ~ .mobilewarning { display: block; } /* Show the warning message explaining why the feature was disabled. */
}

Normally it's acceptable to use media queries for your extension and this will benefit all skins, however in some cases you may need Minerva specific behaviour. If so you can use Manual:$wgResourceModuleSkinStyles to define styles.

How can I add items to Minerva menus?


The Minerva menu system is currently bespoke and does not work like other skins. We plan to fix this eventually so that Minerva makes use of the standard hook for modifying menus - Manual:Hooks/SkinTemplateNavigation::Universal . The work here is tracked in phab:T291568. If you would like to add menu items in the mean time, please use the MobileMenu hook.