Skin:Vector

This page is a translated version of the page Skin:Vector and the translation is 29% complete.
This skin comes with MediaWiki 1.17 and above. Thus you do not have to download it again. However, you still need to follow the other instructions provided.
MediaWiki佈景主題手冊 - 分類
OOjs UI icon layout-ltr.svg
Vector
發行狀態: 穩定版
Dantman-Skin-vector.png
相容性方針 Snapshots releases along with MediaWiki. Master is not backwards compatible.
Composer mediawiki/vector-skin
許可協議 GNU General Public License 2.0 or later
下載
範例 https://en.wikipedia.org/
參數
翻譯佈景主題(如果佢喺translatewiki.net上提供嘅話)
檢查用途及版本矩陣
Vagrant role vector
Issues : Open tasks · Report a bug

Vector於2010年成爲MediaWiki嘅預設外觀

近年嚟,呢款外觀發生咗好大變化,例如切換到Mustache 並且添加咗新功能。 後者可透過特性開關嚟控制,所以用户依然可以停留喺舊版佈局。

In 2021, as part of the MediaWiki 1.36-1.38 releases it will see incremental updates as part of the work done by the Reading/Web/Desktop Improvements initiative. At the end of the project, the 2010 version and 2021 versions will be split into two separate skins.

安裝

  • If using Vagrant , install with vagrant roles enable vector -p

Manual installation

  • 下載文件,將佢擺落你skins/文件夾嘅Vector目錄入面。
  • 將下面嘅代碼添加落你LocalSettings.php嘅底部:
wfLoadSkin( 'Vector' );
  •   Done - 喺你嘅wiki上打開Special:Version,確認佈景主題已經安裝成功。

對於使用MediaWiki 1.24或更舊版本嘅用户:

上面嘅説明介紹嘅係從MediaWiki 1.25之後,用wfLoadSkin()安裝佈景主題嘅新方法。 如果需要喺早期版本中安裝呢款佈景主題,請唔好用wfLoadSkin( 'Vector' );,應該用:

require_once "$IP/skins/Vector/Vector.php";

(如果要喺早期發行版本中安裝呢款佈景主題,你可能需要下載被標記為來自Special:SkinDistributor嘅版本。)

將Vector設定為預設外觀

A default skin should be set for new users of a wiki by setting the variable $wgDefaultSkin in LocalSettings.php to the lowercase skin name specified in the skin file:

$wgDefaultSkin = 'vector';
// uncomment the following line to restore "classic" Vector appearance.
// $wgVectorDefaultSkinVersion = '1';

配置選項

wgVectorDefaultSkinVersion

MediaWiki version:
1.36

Restore the default “legacy” Vector look or use the modern Vector work being created as part of Reading/Web/Desktop Improvements .

$wgVectorDefaultSkinVersion = '1';

wgVectorUseIconWatch

Watch and unwatch as an icon rather than a link.

  • Supported Values:
    • trueuse an icon watch/unwatch button
    • false

use watch/unwatch text link

$wgVectorUseIconWatch = true;

wgVectorResponsive

MediaWiki version:
1.26

實驗性選項,可以令Vector適應手機嘅響應式外觀。 仲未喺生產環境下進行過測試或應用,但係默認情況下相對穩定。選項默認為false。

  • Supported Values:
    • true — 使用響應能力嚟改善狹窄視圖中嘅可用性
    • false — 無響應能力

Note in the 1.36 release, the meaning of this flag has changed and apply to only the newest iteration of Vector, and will require the following configuration:

$wgVectorResponsive = true;
$wgVectorDefaultSkinVersion = '2';

wgVectorPrintLogo (< 1.36, removed in 1.36)

MediaWiki version:
1.30

打印樣式內使用嘅圖標。 Keys are 'url', 'width', 'height' (in pixels). Note that this solution only works correctly if the image pointed to by 'url' is an SVG that does not specify width and height attributes, or its width and height match the corresponding variables below. Alternatively, a PNG or other type of image can be used, but its dimensions also need to match the corresponding variable below. That in turn may result in blurry images, though.

In 1.36, please use Manual:$wgLogos

$wgVectorPrintLogo = [
	'url' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
	'width' => 174,
	'height' => 27
];

功能

Vector外觀嘅基本特徵
  • 減少混亂感(主要透過減少螢幕上嘅文字行數)
  • 搜索欄嘅位置更為顯眼
  • Visual separation of the content-action and namespace links, the former of which being divided into view tabs and action menu items
  • Automatic increase/decrease of margins throughout the user interface based on browser size
  • Use of a star icon for watch and unwatch actions
Added features of the Vector extension (some of these features have later been merged into the Vector skin or into the MediaWiki Core or have been removed)
  • Simplified search portal, including suggestions
  • Collapsible navigation portals
  • Alert when leaving an edit page without saving
  • Automatic hiding of tabs that do not fit on screen
Experimental Vector extension features
  • Simplified footer content
  • Search box expands on focus
  • Section edit links are moved to be directly next to heading instead of on the right, and use an icon
CollapsibleNav support via CollapsibleVector extension

Notes

On updating to 1.36

MediaWiki version:
1.36

In MediaWiki 1.36 the appearance of Vector will be modernized in line with Reading/Web/Desktop Improvements . To opt out of these changes please add the following to your LocalSettings.php:

$wgVectorDefaultSkinVersion = '1';

Collapsible navigation

The collapsible navigation portals are now provided by the CollapsibleVector extension which will have to be installed additionally.

Experimental smartphone and tablet design

Vector will work on many mobile devices, but it is not fully optimized for mobile devices. As we approach the 1.36 release, Vector has been optimized to work with most tablets and an experimental mobile mode is available. In the upcoming 1.36 users will be able to enable a responsive mode using the following configuration:

$wgVectorResponsive = true;
$wgVectorDefaultSkinVersion = '2';

Vector currently has a poor implementation of responsive web design, in which the #right-navigation buttons might overlap the #left-navigation buttons due to width shortage, with no fallback icons like on Skin:Monobook , Skin:MinervaNeue and Skin:Timeless viewed on narrow displays.

In addition, the left side bar navigation links inside #mw-panel, as well as the top links inside #p-personal, move to the bottom of the page on narrow displays, beneath the content area, requiring the user to scroll to the bottom before being able to access it.

History of the skin

Vector became default skin in 2010 (MediaWiki 1.17 , git #2833b07a), succeeding MonoBook. It had been created in 2009 as part of the work done by the Wikipedia Usability Initiative . In 2021, as part of the MediaWiki 1.36 release it will see an update as part of the work done by the Reading/Web/Desktop Improvements initiative.

Vector provides a number of usability improvements over its predecessor MonoBook. It was the first skin to separate the flat level content_actions into the categorized content_navigation.

At the beginning the basic functionality was included in the core skin, while some of Vector's special features were handled by a separate extension (Extension:Vector ). The extension has since been merged into the skin itself.

Dark mode customizations

Many solutions relying on MediaWiki:Common.css exist to support a dark version of the skin, including Skin:Vector/DarkCSS and Skin:Vector/Wikipedia-userstyle-dark-minimum. An alternative skin to Vector exists that allows you to install as a separate skin at Skin:DarkVector.

Note all of these are supported by third parties, not the Wikimedia Foundation.

See also