스킨:벡터/2022
| This code base is maintained by the Reader Experience team. |
출시 상태: 안정 |
|||
|---|---|---|---|
| 호환성 정책 | 스냅샷은 미디어위키와 함께 릴리스됩니다. Master is not backwards compatible. | ||
| Composer | mediawiki/vector-skin | ||
| 라이선스 | GNU 일반 공중 사용 허가서 2.0 또는 이후 | ||
| 다운로드 | |||
| 예시 | |||
|
|||
| Quarterly downloads | 0 | ||
| Public wikis using | 14,010 (Ranked 2nd) | ||
| Public wikis using as default skin | 5,943 | ||
| $2 스킨 번역 (translatewiki.net에서 가능한 경우) | |||
| Vagrant role | vector | ||
| 이슈 | 미해결 작업 · 버그 보고 | ||
벡터 2022는 미디어위키 벡터 스킨의 두 번째 진화이며 데스크톱 개선 프로젝트의 한 부분으로서 개발되고 있습니다. 미디어위키 미디어위키 1.38 부터 번들되어 있습니다. 여러 위키미디어 프로젝트의 기본 스킨입니다.
벡터 2022는 자체 코드 기반이 없다는 점에서 대부분의 스킨과 다릅니다. 오히려 그 코드는 벡터 스킨의 일부이며 둘은 함께 다운로드됩니다.
이 스킨의 버전 미디어위키 1.38은 공식적인 타사 지원을 표시했습니다. 사이트가 미디어위키 1.36 또는 1.37을 실행하고 있고 벡터 2022를 사용하고 있다면 1.38 릴리스로 업그레이드할 때 문제를 마주치게 됩니다. 더 자세한 정보를 보려면 T299104와 Extension:WikimediaMaintenance를 참고하십시오.
설치
- 파일을 다운로드하고
Vector폴더를skins/디렉토리에 넣어 주세요. - 아래의 코드를 LocalSettings.php 파일의 말미에 추가합니다:
wfLoadSkin( 'Vector' );
- 필요에 따라 구성합니다.
완료 - 위키의 Special:Version에 이동해서, 스킨이 올바르게 설치된 것을 확인합니다.
선택적 종속성
벡터 2022는 설치된 경우 다음 확장을 사용할 수 있지만 필수는 아닙니다.
- UniversalLanguageSelector – 언어 전환 버튼의 경우
- PageImages – 검색창에 각 문서에 대한 이미지(사용 가능한 경우)를 포함
- ShortDescription – 검색창에 각 문서에 대한 설명을 포함하려면(위키미디어 프로젝트에는 비슷한 기능이 있지만 이 확장 기능을 사용하지 않음)
구성
벡터 2022를 기본 스킨으로 만들기
미디어위키 1.38 이상부터는 LocalSettings.php에 다음을 추가하여 벡터 2022를 기본 스킨으로 만들 수 있습니다.
$wgDefaultSkin = 'vector-2022';
Features
Dark mode
| 미디어위키 버전: | 1.43 |
Vector 2022 features a night mode (aka dark mode), which has three possible states:
day– also known as light modenight– also known as dark modeos– also known as automatic. This mode will automatically adapt to the state of the operating system or browser
Night mode is gated by a feature flag.
To enable it, set $wgVectorNightMode as follows:
$wgVectorNightMode['beta'] = true;
$wgVectorNightMode['logged_out'] = true;
$wgVectorNightMode['logged_in'] = true;
When enabled, the default theme mode is day. To change the default theme for all users to automatic mode or night mode, you set the default for the user option with either:
$wgDefaultUserOptions['vector-theme'] = 'os';
// or
$wgDefaultUserOptions['vector-theme'] = 'night';
Please note that your content has to be night mode compatible. You might want to read the recommendations for Wikimedia wikis.
Configurability
Note that Vector 2022 has several unstable feature flags, which may disappear at any time. Most of these feature flags relate to incomplete features. It is not recommended to change any feature flag from its default value unless listed here.
$wgVectorMaxWidthOptions- Can be used to configure whether the max-width applies. Relatively stable at this point.$wgVectorLanguageInMainPageHeader- Controls whether the language button is shown on the main page in the header.$wgVectorTypeahead- Associative array with configuration keys for API URLs and options such asshowDescriptionandshowThumbnail(both booleans).
Pinning
Vector 2022 allows control over whether various menus appear pinned in the sidebar or collapsed into the header. These options can be configured both by users in their preferences and by administrators as default settings.
The following pinning options are available:
vector-main-menu-pinned– Controls the main navigation menu position- 1 (default) – Menu is pinned in the left sidebar
- 0 – Menu is collapsed into header hamburger icon
vector-page-tools-pinned– Controls the page tools menu position- 1 (default) – Tools are pinned in the right sidebar
- 0 – Tools are collapsed into header icon
vector-toc-pinned– Controls the table of contents position- 1 (default) – Table of contents is pinned in the left sidebar
- 0 – Table of contents is collapsed into a floating button
vector-appearance-pinned– Controls the appearance menu position- 1 (default) – Appearance options are pinned in the sidebar
- 0 – Appearance options are collapsed into header icon
To change any of these defaults for logged in users, add the corresponding lines to LocalSettings.php:
Note this will not work for anonymous users due until T366999 is worked on.
// Example: Collapse all menus
$wgDefaultUserOptions['vector-main-menu-pinned'] = 0;
$wgDefaultUserOptions['vector-page-tools-pinned'] = 0;
$wgDefaultUserOptions['vector-toc-pinned'] = 0;
$wgDefaultUserOptions['vector-appearance-pinned'] = 0;
Workarounds
To pin the sidebar for anonymous users by default, this code can be added at the beginning of MediaWiki:Common.js (see live example):
if (!mw.config.get('wgUserName')) {
const observer = new MutationObserver((mutationsList, observer) => {
for (const mutation of mutationsList) {
if (mutation.target.classList.contains('vector-animations-ready')) {
document.querySelector( '[data-event-name="pinnable-header.vector-main-menu.pin"]' ).click()
observer.disconnect();
break;
}
}
});
observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
}
If you also want to pin the tools for anonymous users by default, you can add the following line of code (after line 5):
document.querySelector( '[data-event-name="pinnable-header.vector-page-tools.pin"]' ).click()
같이 보기
| 이 스킨은 하나 이상의 위키미디어 프로젝트에서 사용 중입니다. 이것은 아마도 이 스킨이 안정적이고 트래픽이 많은 웹 사이트에서 사용할 수 있을 만큼 충분히 잘 작동한다는 것을 의미합니다. 설치된 위치를 확인하려면 위키미디어의 CommonSettings.php 및 InitialiseSettings.php 구성 파일에서 이 스킨의 이름을 찾습니다. 특정 위키에 설치된 스킨의 전체 목록은 위키의 Special:Version 문서에서 볼 수 있습니다. |
| This skin is included in the following wiki farms/hosts and/or packages: |
- GPL licensed skins/ko
- Stable skins/ko
- Skins supporting Composer/ko
- Skins in Wikimedia version control/ko
- GetPreferences extensions/ko
- LocalUserCreated extensions/ko
- SkinPageReadyConfig extensions/ko
- All skins/ko
- Skins bundled with MediaWiki 1.38/ko
- Skins used on Wikimedia/ko
- Skins included in Canasta/ko
- Skins available as Debian packages/ko
- Skins included in Miraheze/ko
- Skins included in MyWikis/ko
- Skins included in ProWiki/ko
- Skins included in semantic::core/ko
- Skins included in ShoutWiki/ko
- Skins included in Telepedia/ko
- Skins included in Weird Gloop/ko
- Skins included in wiki.gg/ko
- Vector skin/ko
- Skins with dark mode/ko
