mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-14 19:26:42 +00:00
d4903b8e57
Follow up to I3484a790ce8ebadf21054ac1d222d5632b2dc5a4 __Template__ The template is not particularly useful - it is only ever used once in this context and features a static ID which means it can never be reused. It is also tied to the #vector-toc-collapsed-checkbox element. In current form it doesn't make sense to have this template. Maybe in future, I could see an argument for a PinnableTableOfContents component that wrapped the checkbox and nav element, and generalized the IDs but currently there's no pressing need or value for that. __Layouts__ The existing Pinned and Unpinned stylesheets are concerned with how the table of contents is layed out holistically with regards to other components and features enabled on the page. I think these should therefore be organized as such. The way I reason with this, is these styles would be irrelevant in a component library if the component was rendered in isolation. Bug: T328719 Change-Id: I9ff0e0eeb35f215a8cae5950d08dc1277b662a71
90 lines
3.9 KiB
Plaintext
90 lines
3.9 KiB
Plaintext
{{!
|
|
string|null html-site-notice the contents of a banner defined in MediaWiki:Sitenotice.
|
|
Also used by CentralNotice to inject banners into Vector.
|
|
Indicator[] array-indicators wiki-defined badges such as "good article",
|
|
"featured article". An empty array if none are defined.
|
|
string html-title
|
|
bool is-article
|
|
string msg-tagline
|
|
string html-subtitle
|
|
string html-undelete-link
|
|
string html-newtalk
|
|
string msg-vector-jumptonavigation
|
|
string msg-vector-jumptosearch
|
|
string msg-vector-jumptocontent
|
|
string html-body-content
|
|
string html-categories
|
|
string html-after-content
|
|
LogoOptions data-logos
|
|
object data-portlets
|
|
MenuDefinition data-portlets.data-personal
|
|
MenuDefinition data-portlets.data-namespaces
|
|
MenuDefinition data-portlets.data-variants
|
|
MenuDefinition data-portlets.data-views
|
|
MenuDefinition data-portlets.data-actions
|
|
object data-search-box. See SearchBox.mustache for documentation.
|
|
boolean is-main-menu-visible For users that want to see the sidebar on initial render, this should be
|
|
true.
|
|
string msg-vector-action-toggle-sidebar The label used by the sidebar button.
|
|
string msg-vector-main-menu-tooltip The title attribute for the main menu icon.
|
|
object data-main-menu. See MainMenu.mustache for documentation.
|
|
object data-footer for footer template partial. see Footer.mustache for documentation.
|
|
}}
|
|
<div class="mw-page-container">
|
|
<a class="mw-jump-link" href="#bodyContent">{{msg-vector-jumptocontent}}</a>
|
|
<div class="mw-page-container-inner">
|
|
<input
|
|
type="checkbox"
|
|
id="mw-sidebar-checkbox"
|
|
class="mw-checkbox-hack-checkbox"
|
|
{{#is-main-menu-visible}}checked{{/is-main-menu-visible}}>
|
|
{{>Header}}
|
|
{{>MainMenuPinned}}
|
|
<div class="vector-sitenotice-container">
|
|
<div id="siteNotice">{{{html-site-notice}}}</div>
|
|
</div>
|
|
{{#data-toc}}
|
|
<input type="checkbox" id="vector-toc-collapsed-checkbox" class="mw-checkbox-hack-checkbox">
|
|
<nav id="mw-panel-toc" role="navigation" aria-label="{{ msg-vector-toc-label }}" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark">
|
|
{{! T313060 Additional container div needed to prevent the sticky element from being siblings with the footer }}
|
|
{{#data-toc-pinnable-container}}
|
|
{{>PinnableContainer/Pinned/Open}}
|
|
{{#is-pinned}}
|
|
{{#data-toc}}{{>TableOfContents}}{{/data-toc}}
|
|
{{/is-pinned}}
|
|
{{>PinnableContainer/Close}}
|
|
{{/data-toc-pinnable-container}}
|
|
</nav>
|
|
{{/data-toc}}
|
|
<div class="mw-content-container">
|
|
{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }}
|
|
<main id="content" class="mw-body" role="main">
|
|
{{>PageTitlebar}}
|
|
{{>PageToolbar}}
|
|
{{#is-page-tools-enabled}}{{>ColumnEnd}}{{/is-page-tools-enabled}}
|
|
<div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container>
|
|
{{>BeforeContent}}
|
|
{{! the #contentSub element is currently used by editors, do not hide or remove it
|
|
until https://phabricator.wikimedia.org/T316830 has been addressed}}
|
|
<div id="contentSub"{{{html-user-language-attributes}}}>{{{html-subtitle}}}</div>
|
|
{{#html-undelete-link}}<div id="contentSub2">{{{.}}}</div>{{/html-undelete-link}}
|
|
{{{html-user-message}}}
|
|
{{{html-body-content}}}
|
|
{{{html-categories}}}
|
|
{{#is-page-tools-enabled}}{{#is-language-in-content-bottom}}
|
|
{{#data-lang-btn}}{{>LanguageDropdown}}{{/data-lang-btn}}
|
|
{{/is-language-in-content-bottom}}{{/is-page-tools-enabled}}
|
|
</div>
|
|
{{^is-page-tools-enabled}}{{#is-language-in-content-bottom}}
|
|
{{#data-lang-btn}}{{>LanguageDropdown}}{{/data-lang-btn}}
|
|
{{/is-language-in-content-bottom}}{{/is-page-tools-enabled}}
|
|
</main>
|
|
{{{html-after-content}}}
|
|
</div>
|
|
<div class="mw-footer-container">
|
|
{{#data-footer}}{{>Footer}}{{/data-footer}}
|
|
</div>
|
|
</div> {{! END mw-page-container-inner }}
|
|
</div> {{! END mw-page-container }}
|
|
{{#data-vector-sticky-header}}{{>StickyHeader}}{{/data-vector-sticky-header}}
|