2020-02-17 19:49:43 +00:00
|
|
|
{{!
|
2020-04-08 21:40:56 +00:00
|
|
|
string html-headelement a string of attribute HTML that begins with `<html>` and ends with
|
|
|
|
`</head>` and contains `meta` tags and ResourceLoader internals.
|
|
|
|
string|null html-sitenotice the contents of a banner defined in MediaWiki:Sitenotice.
|
|
|
|
Also used by CentralNotice to inject banners into Vector.
|
2020-06-03 19:41:59 +00:00
|
|
|
Indicator[] data-indicators wiki-defined badges such as "good article",
|
|
|
|
"featured article". An empty array if none are defined.
|
2020-04-08 21:40:56 +00:00
|
|
|
string page-langcode the content language of the article. Assumed to be escaped HTML.
|
|
|
|
string html-title
|
|
|
|
string html-prebodyhtml
|
|
|
|
bool page-isarticle
|
|
|
|
string msg-tagline
|
|
|
|
string html-subtitle
|
|
|
|
string html-undelete
|
|
|
|
string html-newtalk
|
2020-06-01 19:28:51 +00:00
|
|
|
string msg-vector-jumptonavigation
|
|
|
|
string msg-vector-jumptosearch
|
2020-04-08 21:40:56 +00:00
|
|
|
string html-bodycontent
|
|
|
|
string html-printfooter
|
|
|
|
string html-catlinks
|
|
|
|
string html-debuglog
|
|
|
|
string html-dataAfterContent
|
|
|
|
string html-navigation-heading heading for entire navigation that is usually hidden to screen
|
|
|
|
readers
|
[modern] A new version of Vector with a new logo
Changes to support feature:
* ResourceLoaderSkinModule logo features are dropped
* New layout provided given the fork in layout between legacy and new.
* Legacy sidebar styles now pulled out
* breakpoint styles are not carried over from legacy Vector
The new Vector layout for now has one breakpoint.
Changes to storybook:
* The storybook script now pulls down image assets so that the logos can
be shown in storybook. The script is adjusted to make use of a static folder to
serve these images.
Note:
* The legacy mode is not touched as part of this patchset.
* The personal menu is unaffected by this patch and is out of scope.
* The alignment issue is noted, but will be solved at a later date.
* Changes to portal are out of scope.
* Adding storybook for modern descoped, given its not possible to load
both legacy layout and modern layout inside a storybook at current time.
Sample config:
$wgLogos = [
'icon' => 'https://di-logo-sandbox.firebaseapp.com/img/globe.png',
'tagline' => [
'src' => 'https://di-logo-sandbox.firebaseapp.com/img/tagline/en-tagline-117-13.svg',
'width' => 117,
'height' => 13,
],
'1x' => 'https://en.wikipedia.org/static/images/project-logos/enwiki.png',
'wordmark' => [
'src' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
'width' => 116,
'height' => 18,
],
];
Coauthor: Aron Manning
Bug: T246170
Change-Id: Ibc4b055150761388a6b78f9127da342c451ce0e7
2020-03-09 05:51:00 +00:00
|
|
|
LogoOptions data-logos
|
2020-05-05 23:26:35 +00:00
|
|
|
MenuDefinition data-personal-menu
|
2020-05-06 17:15:50 +00:00
|
|
|
MenuDefinition data-namespace-tabs
|
2020-05-06 00:00:56 +00:00
|
|
|
MenuDefinition data-variants
|
2020-05-06 17:15:50 +00:00
|
|
|
MenuDefinition data-page-actions
|
2020-05-06 00:00:56 +00:00
|
|
|
MenuDefinition data-page-actions-more
|
2020-04-08 21:40:56 +00:00
|
|
|
object data-search-box. See SearchBox.mustache for documentation.
|
2020-06-23 02:43:28 +00:00
|
|
|
boolean sidebar-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.
|
2020-04-08 21:40:56 +00:00
|
|
|
object data-sidebar. See Sidebar.mustache for documentation.
|
|
|
|
object data-footer for footer template partial. see Footer.mustache for documentation.
|
|
|
|
string html-printtail HTML to render at the end of the page contained necessary script tags for
|
|
|
|
ResourceLoader terminated with `</body></html>`.
|
2020-02-17 19:49:43 +00:00
|
|
|
}}
|
|
|
|
|
2019-02-26 18:44:10 +00:00
|
|
|
{{{html-headelement}}}
|
2020-04-28 01:44:16 +00:00
|
|
|
|
Implement Page, Workspace, Content, and Article Toolbar Containers
This patch closely follows the desired guidelines/desired
styles Alex Hollender has put forth in his prototype, but uses
multiple containers to achieve this look since our DOM order/structure
is different than the DOM structure in the prototype. The following
containers are used, but unlike his prototype, they are sometimes used
more than once:
* Page Container: Contains every other container and limits the overall
max-width of the white part of the page.
* Workspace Container: Contains the sidebar and content container. The
sidebar is displaced ~30 pixels to the start (left) of the workspace
container at all times.
* Content Container: Contains the content. The max-width of this changes
depending on whether you are on a special page/history page vs. other
pages.
* Article Toolbar Container: Contains the article toolbar. The max-width
of this is always the same as the max-width of the article content as we
don't want the toolbar to move when going from the article page to the
history/special page.
Changes to be aware:
* To test locally, `$wgVectorLayoutMaxWidth = true;`. This design is
temporarily feature flagged and defaults to being "off".
* Note that layout-max-width.less is a temporary file made to meet the
feature flag requirement of T246420 (intended to derisk the deployment).
After the deploy, we should merge most if not all of the rules into
layout.less where the max-width design will become the default.
* Per Jon's code review comment, I have relaxed the indenting of
skin.mustache to make the diff easier to reason about. If desired, the
correct indenting can be achieved in a (much less risky) follow-up
commit.
Bug: T246420
Bug: T153043
Change-Id: Ie49f629bc705850c6996164a516957476c034048
2020-06-23 18:02:32 +00:00
|
|
|
<div class="mw-page-container">
|
|
|
|
<div class="mw-page-container-inner">
|
|
|
|
|
2020-04-28 01:44:16 +00:00
|
|
|
<div id="mw-page-base" class="mw-header-placeholder noprint"></div>
|
2020-06-23 02:43:28 +00:00
|
|
|
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
id="mw-sidebar-checkbox"
|
|
|
|
class="mw-checkbox-hack-checkbox"
|
2020-06-23 16:21:25 +00:00
|
|
|
{{#sidebar-visible}}checked{{/sidebar-visible}}>
|
2020-06-23 02:43:28 +00:00
|
|
|
|
Implement Page, Workspace, Content, and Article Toolbar Containers
This patch closely follows the desired guidelines/desired
styles Alex Hollender has put forth in his prototype, but uses
multiple containers to achieve this look since our DOM order/structure
is different than the DOM structure in the prototype. The following
containers are used, but unlike his prototype, they are sometimes used
more than once:
* Page Container: Contains every other container and limits the overall
max-width of the white part of the page.
* Workspace Container: Contains the sidebar and content container. The
sidebar is displaced ~30 pixels to the start (left) of the workspace
container at all times.
* Content Container: Contains the content. The max-width of this changes
depending on whether you are on a special page/history page vs. other
pages.
* Article Toolbar Container: Contains the article toolbar. The max-width
of this is always the same as the max-width of the article content as we
don't want the toolbar to move when going from the article page to the
history/special page.
Changes to be aware:
* To test locally, `$wgVectorLayoutMaxWidth = true;`. This design is
temporarily feature flagged and defaults to being "off".
* Note that layout-max-width.less is a temporary file made to meet the
feature flag requirement of T246420 (intended to derisk the deployment).
After the deploy, we should merge most if not all of the rules into
layout.less where the max-width design will become the default.
* Per Jon's code review comment, I have relaxed the indenting of
skin.mustache to make the diff easier to reason about. If desired, the
correct indenting can be achieved in a (much less risky) follow-up
commit.
Bug: T246420
Bug: T153043
Change-Id: Ie49f629bc705850c6996164a516957476c034048
2020-06-23 18:02:32 +00:00
|
|
|
<div class="mw-workspace-container">
|
|
|
|
<div class="mw-content-container">
|
2020-05-13 22:46:23 +00:00
|
|
|
{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }}
|
|
|
|
<!-- Please do not use role attribute as CSS selector, it is deprecated. -->
|
|
|
|
<main id="content" class="mw-body" role="main">
|
2019-02-26 18:44:10 +00:00
|
|
|
<a id="top"></a>
|
2020-04-08 21:40:56 +00:00
|
|
|
{{#html-sitenotice}}
|
|
|
|
<div id="siteNotice" class="mw-body-content">{{{html-sitenotice}}}</div>
|
|
|
|
{{/html-sitenotice}}
|
2020-06-03 19:41:59 +00:00
|
|
|
{{>Indicators}}
|
2020-04-08 02:01:32 +00:00
|
|
|
<h1 id="firstHeading" class="firstHeading" lang="{{page-langcode}}">{{{html-title}}}</h1>
|
2019-02-26 18:44:10 +00:00
|
|
|
{{{html-prebodyhtml}}}
|
|
|
|
<div id="bodyContent" class="mw-body-content">
|
|
|
|
{{#page-isarticle}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/page-isarticle}}
|
|
|
|
<div id="contentSub"{{{html-userlangattributes}}}>{{{html-subtitle}}}</div>
|
|
|
|
{{#html-undelete}}<div id="contentSub2">{{{html-undelete}}}</div>{{/html-undelete}}
|
|
|
|
{{#html-newtalk}}<div class="usermessage">{{{html-newtalk}}}</div>{{/html-newtalk}}
|
|
|
|
{{!
|
2020-04-08 21:40:56 +00:00
|
|
|
Keep this empty `div` for compatibility with gadgets and user scripts
|
|
|
|
using this place to insert extra elements before.
|
2019-02-26 18:44:10 +00:00
|
|
|
}}
|
|
|
|
<div id="jump-to-nav"></div>
|
2020-06-23 16:21:25 +00:00
|
|
|
<a class="mw-jump-link" href="#mw-sidebar-button">{{msg-vector-jumptonavigation}}</a>
|
2020-06-24 04:44:17 +00:00
|
|
|
<a class="mw-jump-link" href="#searchInput">{{msg-vector-jumptosearch}}</a>
|
2019-02-26 18:44:10 +00:00
|
|
|
{{{html-bodycontent}}}
|
|
|
|
{{#html-printfooter}}
|
2020-04-08 21:40:56 +00:00
|
|
|
<div class="printfooter">{{{html-printfooter}}}</div>
|
2019-02-26 18:44:10 +00:00
|
|
|
{{/html-printfooter}}
|
|
|
|
{{{html-catlinks}}}
|
|
|
|
{{{html-debuglog}}}
|
|
|
|
</div>
|
2020-05-13 22:46:23 +00:00
|
|
|
</main>
|
2019-06-20 17:55:55 +00:00
|
|
|
{{{html-dataAfterContent}}}
|
Implement Page, Workspace, Content, and Article Toolbar Containers
This patch closely follows the desired guidelines/desired
styles Alex Hollender has put forth in his prototype, but uses
multiple containers to achieve this look since our DOM order/structure
is different than the DOM structure in the prototype. The following
containers are used, but unlike his prototype, they are sometimes used
more than once:
* Page Container: Contains every other container and limits the overall
max-width of the white part of the page.
* Workspace Container: Contains the sidebar and content container. The
sidebar is displaced ~30 pixels to the start (left) of the workspace
container at all times.
* Content Container: Contains the content. The max-width of this changes
depending on whether you are on a special page/history page vs. other
pages.
* Article Toolbar Container: Contains the article toolbar. The max-width
of this is always the same as the max-width of the article content as we
don't want the toolbar to move when going from the article page to the
history/special page.
Changes to be aware:
* To test locally, `$wgVectorLayoutMaxWidth = true;`. This design is
temporarily feature flagged and defaults to being "off".
* Note that layout-max-width.less is a temporary file made to meet the
feature flag requirement of T246420 (intended to derisk the deployment).
After the deploy, we should merge most if not all of the rules into
layout.less where the max-width design will become the default.
* Per Jon's code review comment, I have relaxed the indenting of
skin.mustache to make the diff easier to reason about. If desired, the
correct indenting can be achieved in a (much less risky) follow-up
commit.
Bug: T246420
Bug: T153043
Change-Id: Ie49f629bc705850c6996164a516957476c034048
2020-06-23 18:02:32 +00:00
|
|
|
</div> {{! END mw-content-container }}
|
|
|
|
</div> {{! END mw-workspace-container }}
|
2020-04-28 01:44:16 +00:00
|
|
|
|
|
|
|
<header class="mw-header">
|
2020-06-23 02:43:28 +00:00
|
|
|
<label
|
|
|
|
id="mw-sidebar-button"
|
|
|
|
class="mw-checkbox-hack-button mw-ui-icon mw-ui-icon-element"
|
|
|
|
for="mw-sidebar-checkbox"
|
2020-06-25 00:47:57 +00:00
|
|
|
role="button"
|
|
|
|
aria-controls="mw-panel"
|
|
|
|
data-event-name="ui.sidebar"
|
|
|
|
tabindex="0">
|
2020-06-23 02:43:28 +00:00
|
|
|
{{msg-vector-action-toggle-sidebar}}
|
|
|
|
</label>
|
Implement Page, Workspace, Content, and Article Toolbar Containers
This patch closely follows the desired guidelines/desired
styles Alex Hollender has put forth in his prototype, but uses
multiple containers to achieve this look since our DOM order/structure
is different than the DOM structure in the prototype. The following
containers are used, but unlike his prototype, they are sometimes used
more than once:
* Page Container: Contains every other container and limits the overall
max-width of the white part of the page.
* Workspace Container: Contains the sidebar and content container. The
sidebar is displaced ~30 pixels to the start (left) of the workspace
container at all times.
* Content Container: Contains the content. The max-width of this changes
depending on whether you are on a special page/history page vs. other
pages.
* Article Toolbar Container: Contains the article toolbar. The max-width
of this is always the same as the max-width of the article content as we
don't want the toolbar to move when going from the article page to the
history/special page.
Changes to be aware:
* To test locally, `$wgVectorLayoutMaxWidth = true;`. This design is
temporarily feature flagged and defaults to being "off".
* Note that layout-max-width.less is a temporary file made to meet the
feature flag requirement of T246420 (intended to derisk the deployment).
After the deploy, we should merge most if not all of the rules into
layout.less where the max-width design will become the default.
* Per Jon's code review comment, I have relaxed the indenting of
skin.mustache to make the diff easier to reason about. If desired, the
correct indenting can be achieved in a (much less risky) follow-up
commit.
Bug: T246420
Bug: T153043
Change-Id: Ie49f629bc705850c6996164a516957476c034048
2020-06-23 18:02:32 +00:00
|
|
|
<div class="mw-workspace-container mw-sidebar-container">
|
|
|
|
{{#data-sidebar}}{{>Sidebar}}{{/data-sidebar}}
|
|
|
|
</div>
|
2020-06-23 02:43:28 +00:00
|
|
|
{{>Logo}}
|
2020-04-28 01:44:16 +00:00
|
|
|
</header>
|
|
|
|
|
2020-03-25 20:57:46 +00:00
|
|
|
<div id="mw-navigation">
|
2020-04-08 21:40:56 +00:00
|
|
|
<h2>{{{html-navigation-heading}}}</h2>
|
|
|
|
<div id="mw-head">
|
2020-05-05 23:26:35 +00:00
|
|
|
{{#data-personal-menu}}{{>Menu}}{{/data-personal-menu}}
|
Implement Page, Workspace, Content, and Article Toolbar Containers
This patch closely follows the desired guidelines/desired
styles Alex Hollender has put forth in his prototype, but uses
multiple containers to achieve this look since our DOM order/structure
is different than the DOM structure in the prototype. The following
containers are used, but unlike his prototype, they are sometimes used
more than once:
* Page Container: Contains every other container and limits the overall
max-width of the white part of the page.
* Workspace Container: Contains the sidebar and content container. The
sidebar is displaced ~30 pixels to the start (left) of the workspace
container at all times.
* Content Container: Contains the content. The max-width of this changes
depending on whether you are on a special page/history page vs. other
pages.
* Article Toolbar Container: Contains the article toolbar. The max-width
of this is always the same as the max-width of the article content as we
don't want the toolbar to move when going from the article page to the
history/special page.
Changes to be aware:
* To test locally, `$wgVectorLayoutMaxWidth = true;`. This design is
temporarily feature flagged and defaults to being "off".
* Note that layout-max-width.less is a temporary file made to meet the
feature flag requirement of T246420 (intended to derisk the deployment).
After the deploy, we should merge most if not all of the rules into
layout.less where the max-width design will become the default.
* Per Jon's code review comment, I have relaxed the indenting of
skin.mustache to make the diff easier to reason about. If desired, the
correct indenting can be achieved in a (much less risky) follow-up
commit.
Bug: T246420
Bug: T153043
Change-Id: Ie49f629bc705850c6996164a516957476c034048
2020-06-23 18:02:32 +00:00
|
|
|
<div class="mw-content-container mw-article-toolbar-container">
|
|
|
|
<div id="left-navigation">
|
|
|
|
{{#data-namespace-tabs}}{{>Menu}}{{/data-namespace-tabs}}
|
|
|
|
{{#data-variants}}{{>Menu}}{{/data-variants}}
|
|
|
|
</div>
|
|
|
|
<div id="right-navigation">
|
|
|
|
{{#data-page-actions}}{{>Menu}}{{/data-page-actions}}
|
|
|
|
{{#data-page-actions-more}}{{>Menu}}{{/data-page-actions-more}}
|
|
|
|
{{#data-search-box}}{{>SearchBox}}{{/data-search-box}}
|
|
|
|
</div>
|
2020-04-08 21:40:56 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-25 20:57:46 +00:00
|
|
|
</div>
|
Implement Page, Workspace, Content, and Article Toolbar Containers
This patch closely follows the desired guidelines/desired
styles Alex Hollender has put forth in his prototype, but uses
multiple containers to achieve this look since our DOM order/structure
is different than the DOM structure in the prototype. The following
containers are used, but unlike his prototype, they are sometimes used
more than once:
* Page Container: Contains every other container and limits the overall
max-width of the white part of the page.
* Workspace Container: Contains the sidebar and content container. The
sidebar is displaced ~30 pixels to the start (left) of the workspace
container at all times.
* Content Container: Contains the content. The max-width of this changes
depending on whether you are on a special page/history page vs. other
pages.
* Article Toolbar Container: Contains the article toolbar. The max-width
of this is always the same as the max-width of the article content as we
don't want the toolbar to move when going from the article page to the
history/special page.
Changes to be aware:
* To test locally, `$wgVectorLayoutMaxWidth = true;`. This design is
temporarily feature flagged and defaults to being "off".
* Note that layout-max-width.less is a temporary file made to meet the
feature flag requirement of T246420 (intended to derisk the deployment).
After the deploy, we should merge most if not all of the rules into
layout.less where the max-width design will become the default.
* Per Jon's code review comment, I have relaxed the indenting of
skin.mustache to make the diff easier to reason about. If desired, the
correct indenting can be achieved in a (much less risky) follow-up
commit.
Bug: T246420
Bug: T153043
Change-Id: Ie49f629bc705850c6996164a516957476c034048
2020-06-23 18:02:32 +00:00
|
|
|
|
|
|
|
<div class="mw-workspace-container mw-footer-container">
|
|
|
|
{{#data-footer}}{{>Footer}}{{/data-footer}}
|
|
|
|
</div>
|
|
|
|
</div> {{! END mw-page-container-inner }}
|
|
|
|
</div> {{! END mw-page-container }}
|
2019-02-26 18:44:10 +00:00
|
|
|
{{{html-printtail}}}
|