mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Skin: Change to mustache-backed Skin.Vector (temporary commit) [#797]
This commit is contained in:
@@ -140,10 +140,15 @@ app.wikis.get('~{wiki_key}') {
|
||||
app.wikis.get('~{wiki_key}').html.portal {
|
||||
div_personal =
|
||||
<:["
|
||||
<div id="p-personal" class="">
|
||||
<h3>~{<>msgs.get('personaltools');<>}</h3>
|
||||
<nav id="p-personal" class="vector-menu" aria-labelledby="p-personal-label" role="navigation"
|
||||
>
|
||||
<h3 id="p-personal-label">
|
||||
<span>~{<>app.user.msgs.get('personaltools');<>}</span>
|
||||
</h3>
|
||||
<div class="body vector-menu-content">
|
||||
~{portal_indicators_pagesource}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
"]:>
|
||||
;
|
||||
div_ns =
|
||||
@@ -228,13 +233,16 @@ app.wikis.get('~{wiki_key}').html.portal {
|
||||
;
|
||||
div_wikis =
|
||||
<:["
|
||||
<div id="xowa-portal-wikis" class="portal">
|
||||
<h3>~{toggle_btn}</h3>
|
||||
<div class="body">
|
||||
<nav id="xowa-portal-wikis" class="vector-menu vector-menu-portal portal" aria-labelledby="xowa-portal-wikis" role="navigation"
|
||||
>
|
||||
<h3 id="p-wiki">
|
||||
<span>~{toggle_btn}</span>
|
||||
</h3>
|
||||
<div class="body vector-menu-content">
|
||||
<ul~{toggle_hdr}>~{<>app.gui.html.portal.wikis.itms_as_html;<>}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
"]:>
|
||||
;
|
||||
}
|
||||
@@ -472,9 +480,14 @@ app.wikis.scripts.set
|
||||
app.wikis.get('~{wiki_key}').html.portal
|
||||
.div_personal_(
|
||||
<:["
|
||||
<div id="p-personal" class="">
|
||||
<h3>~{<>app.user.msgs.get('personaltools');<>}</h3>
|
||||
</div>
|
||||
<nav id="p-personal" class="vector-menu" aria-labelledby="p-personal-label" role="navigation"
|
||||
>
|
||||
<h3 id="p-personal-label">
|
||||
<span>~{<>app.user.msgs.get('personaltools');<>}</span>
|
||||
</h3>
|
||||
<div class="body vector-menu-content">
|
||||
</div>
|
||||
</nav>
|
||||
"]:>
|
||||
)
|
||||
;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -104,6 +104,18 @@ if (!window.xowa) {
|
||||
},
|
||||
remove: function () {},
|
||||
fire: function () {}
|
||||
} : name === 'wikipage.collapsibleContent' ? {
|
||||
add: function (f) {
|
||||
//fc = f;
|
||||
f(mw.collapsibleContent);
|
||||
// f(window.jQuery ? $collapsible.find( '> .mw-collapsible-content' ) : null);
|
||||
},
|
||||
remove: function () {},
|
||||
fire: function (t) {
|
||||
// different order!!!! wrong order HACK
|
||||
mw.collapsibleContent = t;
|
||||
//fc(t);
|
||||
}
|
||||
} : {
|
||||
add: function () {},
|
||||
remove: function () {},
|
||||
|
||||
22
res/bin/any/xowa/xtns/Skin-Vector/templates/Menu.mustache
Normal file
22
res/bin/any/xowa/xtns/Skin-Vector/templates/Menu.mustache
Normal file
@@ -0,0 +1,22 @@
|
||||
{{!
|
||||
See @typedef MenuDefinition
|
||||
}}
|
||||
{{! `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. -->
|
||||
<nav id="{{id}}" {{#class}}class="{{.}}"{{/class}} aria-labelledby="{{label-id}}" role="navigation" {{{html-tooltip}}}
|
||||
{{{html-user-language-attributes}}}>
|
||||
{{#is-dropdown}}
|
||||
<input type="checkbox" class="vector-menu-checkbox vectorMenuCheckbox" aria-labelledby="{{label-id}}" />
|
||||
{{/is-dropdown}}
|
||||
<h3 id="{{label-id}}">
|
||||
<span>{{label}}</span>
|
||||
</h3>
|
||||
{{! `body` class for backwards compatibility but let editors know not to use
|
||||
it via HTML comment below: }}
|
||||
<!-- Please do not use the .body class, it is deprecated. -->
|
||||
<div class="body vector-menu-content">
|
||||
<!-- Please do not use the .menu class, it is deprecated. -->
|
||||
<ul class="{{list-classes}}">{{{html-items}}}</ul>
|
||||
{{{html-after-portal}}}
|
||||
</div>
|
||||
</nav>
|
||||
@@ -0,0 +1,16 @@
|
||||
<div id="mw-navigation">
|
||||
<h2>{{msg-navigation-heading}}</h2>
|
||||
<div id="mw-head">
|
||||
{{#data-personal-menu}}{{>Menu}}{{/data-personal-menu}}
|
||||
<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>
|
||||
</div>
|
||||
{{#data-sidebar}}{{>legacy/Sidebar}}{{/data-sidebar}}
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
{{!
|
||||
See @typedef SidebarData
|
||||
string html-logo-attributes for site logo. Must be used inside tag e.g. `class="logo" lang="en-gb"`
|
||||
}}
|
||||
|
||||
<div id="mw-panel">
|
||||
<div id="p-logo" role="banner">
|
||||
<a {{{html-logo-attributes}}}></a>
|
||||
</div>
|
||||
{{#data-portals-first}}{{>Menu}}{{/data-portals-first}}
|
||||
{{#array-portals-rest}}{{>Menu}}{{/array-portals-rest}}
|
||||
{{#data-portals-languages}}{{>Menu}}{{/data-portals-languages}}
|
||||
</div>
|
||||
@@ -0,0 +1,69 @@
|
||||
{{!
|
||||
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 page-langcode the content language of the article. Assumed to be escaped HTML.
|
||||
string html-title
|
||||
bool page-isarticle
|
||||
string msg-tagline
|
||||
string html-subtitle
|
||||
string html-undelete-link
|
||||
string html-newtalk
|
||||
string msg-vector-jumptonavigation
|
||||
string msg-vector-jumptosearch
|
||||
string html-body-content
|
||||
string html-categories
|
||||
string html-after-content
|
||||
string msg-navigation-heading heading for entire navigation that is
|
||||
usually hidden to screen readers
|
||||
MenuDefinition data-personal-menu
|
||||
MenuDefinition data-namespace-tabs
|
||||
MenuDefinition data-variants
|
||||
MenuDefinition data-page-actions
|
||||
MenuDefinition data-page-actions-more
|
||||
object data-search-box. See SearchBox.mustache for documentation.
|
||||
object data-sidebar. See Sidebar.mustache for documentation.
|
||||
object data-footer for footer template partial. see Footer.mustache for documentation.
|
||||
}}
|
||||
<div id="mw-page-base" class="noprint"></div>
|
||||
<div id="mw-head-base" class="noprint"></div>
|
||||
<div id="content" class="mw-body" role="main">
|
||||
<a id="top"></a>
|
||||
<div id="siteNotice" class="mw-body-content">{{{html-site-notice}}}</div>
|
||||
{{>Indicators}}
|
||||
<h1 id="firstHeading" class="firstHeading" lang="{{page-langcode}}">{{{html-title}}}</h1>
|
||||
<div id="bodyContent" class="mw-body-content">
|
||||
{{#page-isarticle}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/page-isarticle}}
|
||||
<div id="contentSub"{{{html-user-language-attributes}}}>{{{html-subtitle}}}</div>
|
||||
<div id="contentSub2">{{{html-undelete-link}}}</div>
|
||||
{{{html-newtalk}}}
|
||||
{{!
|
||||
Keep this empty `div` for compatibility with gadgets and user scripts
|
||||
using this place to insert extra elements before.
|
||||
}}
|
||||
<div id="jump-to-nav"></div>
|
||||
<a class="mw-jump-link" href="#mw-head">{{msg-vector-jumptonavigation}}</a>
|
||||
<a class="mw-jump-link" href="#searchInput">{{msg-vector-jumptosearch}}</a>
|
||||
{{{html-body-content}}}
|
||||
{{{html-categories}}}
|
||||
</div>
|
||||
</div>
|
||||
{{{html-after-content}}}
|
||||
<div id="mw-navigation">
|
||||
<h2>{{msg-navigation-heading}}</h2>
|
||||
<div id="mw-head">
|
||||
{{#data-personal-menu}}{{>Menu}}{{/data-personal-menu}}
|
||||
<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>
|
||||
</div>
|
||||
{{#data-sidebar}}{{>legacy/Sidebar}}{{/data-sidebar}}
|
||||
</div>
|
||||
{{#data-footer}}{{>Footer}}{{/data-footer}}
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="ext-wpb-pagebanner pre-content">
|
||||
<div class="ext-wpb-pagebanner">
|
||||
<div class="{{#isPanorama}}wpb-banner-image-panorama {{/isPanorama}}wpb-topbanner{{extraClass}}">
|
||||
{{#isHeadingOverrideEnabled}}<h1 class="wpb-name">{{title}}</h1>{{/isHeadingOverrideEnabled}}
|
||||
<a class="image" dir="ltr" title="{{tooltip}}" href="{{bannerfile}}" xowa_title="{{file_ttl}}"><img{{{img_id_atr}}}{{{img_xottl}}}{{{img_xoimg}}} src="{{banner}}" srcset="{{srcset}}" class="wpb-banner-image"{{#hasPosition}} data-pos-x="{{data-pos-x}}" data-pos-y="{{data-pos-y}}" {{/hasPosition}} style="max-width:{{maxWidth}}px"></a>
|
||||
<a class="image" dir="ltr" title="{{tooltip}}" href="{{bannerfile}}" xowa_title="{{file_ttl}}"><img{{{img_id_atr}}}{{{img_xottl}}}{{{img_xoimg}}} src="{{banner}}" srcset="{{srcset}}" class="wpb-banner-image"{{#hasPosition}} data-pos-x="{{data-pos-x}}" data-pos-y="{{data-pos-y}}"{{/hasPosition}}></a>
|
||||
{{#hasIcons}}
|
||||
<div class="wpb-iconbox">
|
||||
{{#icons}}
|
||||
|
||||
Reference in New Issue
Block a user