This page is a translated version of the page Skin:Cosmos and the translation is 97% complete.
MediaWiki 外装マニュアル - カテゴリ
Cosmos
リリースの状態: 不安定
説明 Cosmosは、Fandom の Oasis 外装をベースにデザインされた外装です。 そのデザインを改善し、非 Fandom の利用者、または Fandom から移行する利用者のために効率的な MediaWiki 外装を提供するように設計されています。
作者
最新バージョン 7.0.0 (2023-05-11)
互換性の方針 MediaWiki とともにリリースされるスナップショット。 master には後方互換性がありません。
MediaWiki 1.39.0+
ライセンス GNU 一般公衆利用許諾書 3.0 以降
ダウンロード
README.md
緊急のサポートが必要な場合は、Cosmos Discord サーバーに参加いただくか、Phabricator でタスクを作成してください(以下のリンク)。
Cosmos Example Wiki, Wikimedia Skins Lab
パラメーター
  • $wgCosmosWordmark
  • $wgCosmosBannerBackgroundColor
  • $wgCosmosWikiHeaderBackgroundImage
  • $wgCosmosBackgroundImage
  • $wgCosmosMainBackgroundColor
  • $wgCosmosContentBackgroundColor
  • $wgCosmosBackgroundImageSize
  • $wgCosmosContentWidth
  • $wgCosmosButtonBackgroundColor
  • $wgCosmosToolbarBackgroundColor
  • $wgCosmosFooterBackgroundColor
  • $wgCosmosLinkColor
  • $wgCosmosSocialProfileAllowBio
  • $wgCosmosSocialProfileFollowBioRedirects
  • $wgCosmosSocialProfileModernTabs
  • $wgCosmosSocialProfileRoundAvatar
  • $wgCosmosSocialProfileShowEditCount
  • $wgCosmosSocialProfileShowGroupTags
  • $wgCosmosSocialProfileTagGroups
  • $wgCosmosSocialProfileNumberofGroupTags
  • $wgCosmosUseSocialProfileAvatar
  • $wgCosmosEnablePortableInfoboxEuropaTheme
  • $wgCosmosBackgroundImageRepeat
  • $wgCosmosBackgroundImageFixed
  • $wgCosmosContentOpacityLevel
  • $wgCosmosEnabledRailModules
  • $wgCosmosRailDisabledNamespaces
  • $wgCosmosRailDisabledPages
  • $wgCosmosEnableWantedPages
  • $wgCosmosFetchWantedPagesFromCache
  • $wgCosmosWantedPagesMaxTitlesCount
  • $wgCosmosWantedPagesFetchedNamespaces
四半期ごとのダウンロード数 91 (Ranked 7th)
使用している公開ウィキ 25 (Ranked 71st)
既定の外装として使用している公開ウィキ 2
translatewiki.net で翻訳を利用できる場合は、Cosmos 外装の翻訳にご協力ください
問題点 : 未解決のタスク · バグを報告

Cosmos は、Fandom の Oasis 外装をベースにデザインされた外装です。 そのデザインを改善し、非 Fandom の利用者、または Fandom から移行する利用者のために効率的な MediaWiki 外装を提供するように設計されています。 寄付の方法を知りたい方は、ガイドをお読みください。


インストール

  • ダウンロードして、ファイルを skins/ フォルダー内の Cosmos という名前のディレクトリ内に配置します。
  • ファイル LocalSettings.php の末尾に以下のコードを追加してください:
    wfLoadSkin( 'Cosmos' );
    
  • 必要に応じて設定します。
  •   完了 - 自分のウィキの Special:Version に移動して、外装が正しくインストールされたことを確認してください。

設定

これらの設定は、Cosmos がアクティブな外装であるときに適用されます。

オプション 既定値 必要事項 説明文
$wgCosmosWordmark 文字列; 完全な URL またはファイル名
  • $wgLogos['wordmark']['src'] (if exists)
  • $wgLogos['1x'] (if exists; fallback)
  • false (if neither of the above exist)
wikiのナビゲーションにワードマークを追加する
$wgCosmosBannerBackgroundColor 文字列; 色名または 16 進コード '#c0c0c0' トップバナー(パーソナルツールのドロップダウンがあるバナー)の背景色を変更します。
$wgCosmosWikiHeaderBackgroundImage 文字列; 完全な URL またはファイル名 false wikiヘッダ(サイトナビゲーションリンクがあるもの)に背景画像を追加します; グラデーションを使用してヘッダカラーと画像をブレンドします。
$wgCosmosWikiHeaderBackgroundColor 文字列; 色名または 16 進コード '#c0c0c0' wikiヘッダーの背景色を変更します(サイトナビゲーションリンクを持つもの)。$wgCosmosWikiHeaderBackgroundImage は画像が設定されている場合、この色に画像をブレンドするためにこれを使用します。
$wgCosmosBackgroundImage 文字列; 完全な URL またはファイル名 false ページ本体(コンテンツ領域の後ろ)に背景画像を追加します。画像が色を覆うので、効果的に $wgCosmosMainBackgroundColor を無効化します。
$wgCosmosMainBackgroundColor 文字列; 色名または 16 進コード '#1A1A1A' ページ本体(コンテンツ領域の後ろ)に背景色を追加します。イメージが色をカバーするので、$wgCosmosBackgroundImage によって効果的に無効化されます。
$wgCosmosContentBackgroundColor 文字列; 色名または 16 進コード '#ffffff' メインWiki記事コンテンツエリアの背景色を変更します。$wgCosmosContentOpacityLevel はRGBAスタイルの背景色-不透明度レベルを作成するためにこれを使用します。
$wgCosmosBackgroundImageSize 文字列:auto、contain、またはcover 'cover' $wgCosmosBackgroundImage set; 文字列はすべての値を受け入れるが、次のいずれかを使用することが推奨される:auto、contain、またはcover。
$wgCosmosContentWidth String; default, large, or full 'default' Sets the main content area width. Can be 'default', 'large', or 'full'. 'default' means the width is 1024px on screen sizes 1084px to 1595px, and 1178px on screen sizes 1596px and above. 'large' means it is the default (for the relevent screen size) plus 176px. 'full' will set the width to 'auto' for either screen size. In addition if it is set to 'full', the screen-size specific max-width, and padding on #mw-content-wrapper are not set on either of the mentioned screen sizes, and use the default ones or that of lower screen sizes, making max-width much larger, and making the content area have much less padding.
$wgCosmosButtonBackgroundColor 文字列; 色名または 16 進コード '#c0c0c0' Cosmos のページ操作ボタンの背景色を変更します。拡張機能がインストールされている場合は、ブレンドによって PortableInfobox の色付けも設定されます。
$wgCosmosToolbarBackgroundColor 文字列; 色名または 16 進コード '#000000' 下部のフローティングツールバーの背景色を変更します。
$wgCosmosFooterBackgroundColor 文字列; 色名または 16 進コード '#c0c0c0' フッターの背景色を変更します。フッターの不透明度は常に0.8なので、この変数はRGBAに変換されて、この不透明度を設定します。
$wgCosmosBackgroundImageRepeat 真偽値 false $wgCosmosBackgroundImage set; もしtrueなら、背景画像は'repeat'に設定され、もしfalseなら、それは'no-repeat'に設定されるでしょう。
$wgCosmosBackgroundImageFixed 真偽値 true $wgCosmosBackgroundImage set; trueの場合、背景画像はposition: fixed;に設定されます。
$wgCosmosLinkColor 文字列; 色名または 16 進コード '#0645ad' リンクの色を変更します。
$wgCosmosContentOpacityLevel 整数 100 $wgCosmosContentBackgroundColor set; コンテンツエリアの背景の不透明度をパーセントで設定します。パーセント記号(%)は使用しません。
$wgCosmosRailDisabledNamespaces 配列 [ NS_SPECIAL, NS_MEDIAWIKI, NS_MEDIAWIKI_TALK ] List of namespace constants or IDs to always hide the rail in.
$wgCosmosRailDisabledPages 配列 [ 'mainpage' ] List of page titles or 'mainpage' to always hide the rail in. Works exactly like __NORAIL__ magic word.
$wgCosmosEnableWantedPages 真偽値 true Whether or not to enable the WantedPages feature of the create page dialog.
$wgCosmosFetchWantedPagesFromCache 真偽値 false Whether or not to fetch the wanted pages shown within the create page dialog from cache. If enabled you will need to run php updateSpecialPages.php --only=WantedPages in order to update the wanted pages. It is recommended to set this to true on large wikis.
$wgCosmosWantedPagesMaxTitlesCount 整数 6 Set to the max number of wanted pages to display in the create page dialog, if wanted pages are enabled.
$wgCosmosWantedPagesFetchedNamespaces 配列 [ NS_MAIN ] Set to an array of namespaces to fetch wanted pages from, if wanted pages are enabled for the create page dialog.
連想配列
オプション 既定値 説明文
$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. Also see other configs for rail.

拡張機能の設定

ソーシャルプロフィール

これらの設定を使用するためには、SocialProfile がインストールされている必要があります。

オプション 既定値 必要なもの 説明文
$wgCosmosSocialProfileAllowBio 真偽値 true Allows users to add a bio to display on their user pages, through Special:MyPage/bio.
$wgCosmosSocialProfileFollowBioRedirects 真偽値 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 真偽値 true SocialProfileプロフィールページのタブの最新バージョンを有効にします。
$wgCosmosSocialProfileRoundAvatar 真偽値 true SocialProfileのプロフィールページでアバターを丸くする。
$wgCosmosSocialProfileShowEditCount 真偽値 true SocialProfileのプロフィールページで、ユーザー名の下に、そのユーザーの編集回数と登録日を表示します。
$wgCosmosSocialProfileShowGroupTags 真偽値 true $wgCosmosNumberofGroupTags set and more than zero; $wgCosmosProfileTagGroups set with at least one usergroup in the array Enables usergroup tags to appear next to user's username on SocialProfile profile pages.
$wgCosmosSocialProfileTagGroups 配列 [ 'bureaucrat', 'bot', 'sysop', 'interface-admin' ] $wgCosmosSocialProfileNumberofGroupTags set and more then zero; $wgCosmosSocialProfileShowGroupTags set to true Array of usergroups to show on SocialProfile pages if the user has them.
$wgCosmosSocialProfileNumberofGroupTags 整数 2 $wgCosmosSocialProfileTagGroups set with at least one usergroup in the array; $wgCosmosSocialProfileShowGroupTags set to true ユーザーのSocialProfileページに表示するグループタグの最大数を設定します(持っている場合)。
$wgCosmosUseSocialProfileAvatar 真偽値 true トップバナー(パーソナルツールのドロップダウンがあるバナー)のユーザー名の隣にあるアバターとしてSocialProfileのアバターを使用します。ユーザーがアバターを持っていない場合、これが設定されていると、デフォルトのSocialProfileアバターが使用されます。

ポータブルインフォボックス

これらの構成設定を使用するには、PortableInfobox がインストールされていることが必要です。

オプション 既定値 必要なもの 説明文
$wgCosmosEnablePortableInfoboxEuropaTheme 真偽値 true $wgCosmosButtonBackgroundColor set; Fandom の移植版 infobox 拡張機能の Europa テーマを移植版拡張機能で有効にします。

Usage

インターフェイス

MediaWiki:Cosmos-tagline
wikiヘッダ内のサイト名テキストを修正します。デフォルトはMediaWiki:Sitenameの値です。
MediaWiki:Cosmos-navigation
この外装のサイト ナビゲーションを変更します。既定は MediaWiki:Sidebar ですが、最良の結果のために MediaWiki:Sidebar を MediaWiki:Cosmos-navigation にコピーして Cosmos ナビゲーション フォーマットに従うことが推奨されています。このナビゲーションは、最大 3 階層まで可能で、いくつかの変数を使用できます。
  • {$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}

Parser functions

Cosmos provides a couple parser functions:

  • {{#ADDITIONALBODYCLASS}}
    • Description: Allows to add additional body class to particular pages to allow for further per-page customisation with CSS. Available as of version 6.2.0.
    • Usage: {{#ADDITIONALBODYCLASS:class-name}}
  • __NORAIL__
    • Description: provides a magic word to hide the rail on particular pages. Available as of version 6.0.0.
    • Usage: Put __NORAIL__ at the top of the page you want to hide the rail on.

注記

  • On large wikis, it is recommended to set either $wgCosmosEnableWantedPages = false; or $wgCosmosFetchWantedPagesFromCache = true; (both available since version 6.2.0), otherwise it can have significant performance impact.
  • As of version 6.2.0, MediaWiki:Cosmos-navigation is cached to provide performance improvements and not fetch this on every page load. This cache is reset when any interface message is updated.
  • 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 setting $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).
  • Special:AddVideo へのリンクは、Video 拡張機能が有効で、必要な権限 (addvideo) を持っている場合に表示されます。
  • Cosmosは既定でサイトノーティスにCookieを使用しています。DismissableSiteNotice 拡張機能が有効であれば、Cosmosは代わりにその拡張機能に変換します。
  • CosmosはEcho通知に対応しています。Echo 拡張機能が有効で、ユーザーがログインしている場合、Cosmosはパーソナルツールメニューの横に通知アイコンを表示します。
  • Cosmosには、ポップアップで簡単に記事を作成できるcreate articleメソッドがあります。
    • Will not appear if user does not have both the edit and createpage rights.
  • Cosmos supports the mobile responsiveness preference provided by MediaWiki core.
  • Cosmos は VisualEditor で動作確認されています。
  • メインページ、ユーザーがログインしているかどうか、$wgCosmosContentBackgroundColorが明るいテーマか暗いテーマか(theme-darktheme-lightクラス)に対応するボディクラスがあります。

計画中の機能

  • All the formerly planned features have now been implemented. If you wish to request a feature, please do so on the talk page of this skin.