Skin:Cosmos

From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page Skin:Cosmos and the translation is 33% complete.
Other languages:
English • ‎español • ‎français • ‎日本語
MediaWiki 外装マニュアル - カテゴリ
Crystal Clear device blockdevice.png
Cosmos
リリースの状態: 安定
Cosmos skin.png
説明 Cosmos is a skin designed and based off Fandom's Oasis skin. Designed to improve upon their design, and provide an efficient MediaWiki skin for non-Fandom users, or for users transitioning out of Fandom.
作者 Universal Omega
SamanthaNguyen
最新バージョン 5.0.0 (2021-02-02)
MediaWiki 1.35.0+
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
README.md
Join the Cosmos Discord server if you require immediate assistance, or create a task on Phabricator about it (link below).
mwcosmos.com
パラメーター
  • $wgCosmosWordmark
  • $wgCosmosBannerBackgroundColor
  • $wgCosmosWikiHeaderBackgroundImage
  • $wgCosmosBackgroundImage
  • $wgCosmosMainBackgroundColor
  • $wgCosmosContentBackgroundColor
  • $wgCosmosBackgroundImageSize
  • $wgCosmosButtonBackgroundColor
  • $wgCosmosToolbarBackgroundColor
  • $wgCosmosFooterBackgroundColor
  • $wgCosmosLinkColor
  • $wgCosmosSocialProfileAllowBio
  • $wgCosmosSocialProfileFollowBioRedirects
  • $wgCosmosSocialProfileModernTabs
  • $wgCosmosSocialProfileRoundAvatar
  • $wgCosmosSocialProfileShowEditCount
  • $wgCosmosSocialProfileShowGroupTags
  • $wgCosmosUseSocialProfileAvatar
  • $wgCosmosEnablePortableInfoboxEuropaTheme
  • $wgCosmosBackgroundImageRepeat
  • $wgCosmosBackgroundImageFixed
  • $wgCosmosProfileTagGroups
  • $wgCosmosNumberofGroupTags
  • $wgCosmosContentOpacityLevel
  • $wgCosmosEnabledRailModules
translatewiki.net で翻訳を利用できる場合は、Cosmos 外装の翻訳にご協力ください
使用状況とバージョン マトリクスを確認してください。
問題点 : 未解決のタスク · バグを報告

Cosmos is a skin designed and based off Fandom's Oasis skin. Designed to improve upon their design, and provide an efficient MediaWiki skin for non-Fandom users, or for users transitioning out of Fandom. If you would like to learn how to contribute, please read our guide.

インストール

vagrant>Vagrant </>, install with <tvar

  • <translate> 1>download-link</> and place the file(s) in a directory called <tvar|name>Cosmos</> in your <tvar|ext>skins/</> folder.</translate>
  • <translate> Add the following code at the bottom of your LocalSettings.php:</translate>
wfLoadSkin( 'Cosmos' );
  • 必要に応じて設定します。
  • Yes 完了 - <translate> Navigate to <tvar|special>Special:Version</> on your wiki to verify that the skin is successfully installed.</translate>


設定

These settings will apply when Cosmos is the active skin.

オプション 既定値 Requires 説明文
$wgCosmosWordmark 文字列; 完全な URL
  • $wgLogos['wordmark']['src'] (if exists)
  • $wgLogos['1x'] (if exists; fallback)
  • $wgLogo (if neither of the above exist)
  • false (if none of those exist)
Adds a wordmark to the wiki navigation
$wgCosmosBannerBackgroundColor 文字列; 色名または 16 進コード #c0c0c0 Changes the background color of the top banner (the one with the personal tools drop-down).
$wgCosmosWikiHeaderBackgroundImage 文字列; 完全な URL false Adds a background image to the wiki header (the one with the site navigation links); blends image with header colors using gradient.
$wgCosmosWikiHeaderBackgroundColor 文字列; 色名または 16 進コード #c0c0c0 Changes the background color of the wiki header (the one with the site navigation links); $wgCosmosWikiHeaderBackgroundImage uses this to blend the image to this color, if the image is set.
$wgCosmosBackgroundImage 文字列; 完全な URL false Adds a background image to the page body (behind the content area); effectively nullifies $wgCosmosMainBackgroundColor, as the image would cover the color.
$wgCosmosMainBackgroundColor 文字列; 色名または 16 進コード #1A1A1A Adds a background color to the page body (behind the content area); effectively nullified by $wgCosmosBackgroundImage, as the image would cover the color.
$wgCosmosContentBackgroundColor 文字列; 色名または 16 進コード #ffffff Changes the background color of the main wiki article content area; $wgCosmosContentOpacityLevel uses this to create an RGBA styled background color-opacity level.
$wgCosmosBackgroundImageSize String; auto, contain, or cover cover $wgCosmosBackgroundImage set; Sets the background image size for the body background if set; while the string accepts all values, it's recommended to use one of the following: auto, contain, or cover.
$wgCosmosButtonBackgroundColor 文字列; 色名または 16 進コード #c0c0c0 Changes the background color of the page action buttons for Cosmos; also sets PortableInfobox coloring through blending if the extension is installed.
$wgCosmosToolbarBackgroundColor 文字列; 色名または 16 進コード #000000 Changes the background color of the floating toolbar at the bottom.
$wgCosmosFooterBackgroundColor 文字列; 色名または 16 進コード #c0c0c0 Changes the background color of the footer; the footer always has an opacity of 0.8, so this variable is converted to RGBA to set this opacity.
$wgCosmosBackgroundImageRepeat Boolean false $wgCosmosBackgroundImage set; if true the background image will be set to 'repeat' otherwise, if false, it will be set to 'no-repeat'.
$wgCosmosBackgroundImageFixed Boolean true $wgCosmosBackgroundImage set; If true the background image will be set to position: fixed;.
$wgCosmosLinkColor 文字列; 色名または 16 進コード #0645ad Changes the color of links.
$wgCosmosContentOpacityLevel Integer 100 $wgCosmosContentBackgroundColor set; Set the content area background opacity in percentage, without the percent symbol (%).
Associative arrays
Option Default value Documentation
$wgCosmosEnabledRailModules
 'recentchanges' => false,
 'interface' => [
       'cosmos-custom-rail-module' => 'normal',
       'cosmos-custom-sticky-rail-module' => 'sticky'
 ]
Sets which rail modules will be enabled on Cosmos, and whether they are 'sticky' or 'normal'. 'interface' can be an array of any size with a list of interface messages for Cosmos to recognize as a new custom right rail. For any rail module, it can be mapped to either 'normal' or 'sticky', 'normal' will make them stay in a fixed position on the page, and 'sticky' makes them stick to the page as you scroll down. Setting it to false will disable the specific rail module entirely. If interface messages, set in the config are set to '-', don't exist, or are completely empty, it will treat them as disabled and won't appear in the rail at all. If no modules are appearing in rail, then the article area will expand to cover the rail area. If you don't have JavaScript enabled in your browser, then it is recommended to only have one sticky rail module enabled at the same time, otherwise they will overlap on top of each other. If the DummyFandoomMainpageTags extension is enabled on your wiki, the rail will not appear on the main page at all.

Extension configuration settings

SocialProfile

These configuration settings require SocialProfile to be installed in order to use them.

オプション 既定値 Requires 説明文
$wgCosmosSocialProfileAllowBio Boolean true Allows users to add a bio to display on their user pages, through Special:MyPage/bio.
$wgCosmosSocialProfileFollowBioRedirects Boolean false $wgCosmosSocialProfileAllowBio set to true Whether or not to follow redirects from Special:MyPage/bio and display the redirect target as bio instead. (experimental)
$wgCosmosSocialProfileModernTabs Boolean true Enables a modern version of the tabs on SocialProfile profile pages.
$wgCosmosSocialProfileRoundAvatar Boolean true Makes the avatar round on SocialProfile profile pages.
$wgCosmosSocialProfileShowEditCount Boolean true Show's the edit count and registration date for the user on SocialProfile profile pages, underneath their username.
$wgCosmosSocialProfileShowGroupTags Boolean true $wgCosmosNumberofGroupTags set and more then zero; $wgCosmosProfileTagGroups set with at least 1 usergroup in the array Enables usergroup tags to appear next to user's username on SocialProfile profile pages.
$wgCosmosUseSocialProfileAvatar Boolean true Use SocialProfile avatar as avatar next to username in top banner (the banner with the personal tool drop-down). If user doesn't have an avatar and this is set, will use the default SocialProfile avatar.
$wgCosmosProfileTagGroups Array [ 'bureaucrat', 'bot', 'sysop', 'interface-admin' ] $wgCosmosNumberofGroupTags set and more then zero; $wgCosmosSocialProfileShowGroupTags set to true Array of usergroups to show on SocialProfile pages if the user has them.
$wgCosmosNumberofGroupTags Integer 2 $wgCosmosProfileTagGroups set with at least 1 usergroup in the array; $wgCosmosSocialProfileShowGroupTags set to true Set the max number of group tags to show on a user's SocialProfile page if they have them.

PortableInfobox

These configuration settings require PortableInfobox to be installed in order to use them.

オプション 既定値 Requires 説明文
$wgCosmosEnablePortableInfoboxEuropaTheme Boolean true $wgCosmosButtonBackgroundColor set; Enables the Europa theme from Fandom's portable infobox extension on the ported extension.

インターフェイス

MediaWiki:Cosmos-tagline
Modifies the sitename text in the wiki header. Defaults to the value of MediaWiki:Sitename.
MediaWiki:Cosmos-navigation

Modifies the site navigation for this skin; defaults to MediaWiki:Sidebar, although it is recommended to copy MediaWiki:Sidebar to MediaWiki:Cosmos-navigation and follow the Cosmos navigation format for the best results. This navigation can be up to 3 levels deep, and allows a few variables to be used:

  • {$NEWVIDEOS_CONDITIONAL} (alternatively, {$NEWVIDEOS}) will display a link to Special:NewVideos only when the Video extension is enabled.
  • {$WANTEDPAGES_CONDITIONAL} (alternatively, {$WANTEDPAGES}) will display a link to Special:WantedPages only when the Video extension is not enabled.
  • {$WANTEDPAGES_FORCE} will display a link to Special:WantedPages regardless of if the Video extension is enabled or not.

The navigation should be in the format of:


*#|Community
**mainpage|mainpage-description
**recentchanges-url|recentchanges
**portal-url|portal
*link|Tab title/level one
**Level 2 tab title
***Level 3 content 1

*cosmos-explore
**recentchanges-url|recentchanges
**randompage-url|randompage
**Special:NewFiles|cosmos-newfiles
{$NEWVIDEOS_CONDITIONAL}
{$WANTEDPAGES_CONDITIONAL}

and, defaults to:


{{int:Sidebar}}
*cosmos-explore
**recentchanges-url|recentchanges
**randompage-url|randompage
**Special:NewFiles|cosmos-newfiles
{$NEWVIDEOS_CONDITIONAL}
{$WANTEDPAGES_CONDITIONAL}

Compatibility and notes

  • As of version 5.0.0 Cosmos has a special page, Special:ThemeDesigner, that allows some theme-related Cosmos configs be modified on-wiki. It also comes with the themdesigner right, which is given to sysops by default and is required in order to enter Special:ThemeDesigner. This is a highly experimental feature.
  • As of version 4.0.0, Cosmos supports MediaWiki 1.36.
  • Cosmos uses the Special:Statistics article count, therefore changing $wgArticleCountMethod = 'any'; and afterwards running maintenance/UpdateArticleCount.php will make that counter use all content pages.
    • Counter will not display at all if user does not have the read userright.
  • An "Admin Dashboard" icon will appear if the AdminLinks extension is enabled and you have the needed right (adminlinks).
  • Links to Special:AddVideo will appear if the Video extension is enabled and you have the needed right (addvideo).
  • Cosmos uses cookies for the sitenotice by default. If the DismissableSiteNotice extension is enabled, then Cosmos will convert to that extension instead.
  • Cosmos supports Echo notifications. If the Echo extension is enabled and the user is logged in then Cosmos will display notification icons next to the personal tools menu.
  • Cosmos has a create article method to easily create articles through a popup.
    • Will not appear if user does not have both the edit and createpage rights.
  • When Cosmos is installed, there will be a preference that will be available upon the selection of the Cosmos skin, allowing to toggle the mobile responsiveness of Cosmos. Enabled by default.
  • Cosmos does not support the DarkMode extension, therefore removes it from the personal tools when it's enabled.
  • Cosmos supports Miraheze's ManageWiki extension. It will adhere to the managewikisidebar preference, and if that is on, it will display manage wiki links in the navigation.
  • There are body classes for the main page and whether a user is logged in or not.

Planned features

  • Configuration to change content area width is planned.