Separate first portal in sidebar from rest
This allows us to insert HTML underneath the first portal or wrap the portal in a containing element in future if we want to target additional CSS to it Change-Id: Ied28d95407b8d59fc819bb07a2cce3242bd93088
This commit is contained in:
parent
af4cbc2f57
commit
59747a58c8
|
@ -272,8 +272,10 @@ class VectorTemplate extends BaseTemplate {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'array-portals' => $props,
|
||||
'array-portals-rest' => array_slice( $props, 1 ),
|
||||
'array-portals-first' => $props[0] ?? null,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
<div id="p-logo" role="banner">
|
||||
<a {{{html-logo-attributes}}}></a>
|
||||
</div>
|
||||
{{#array-portals}}
|
||||
{{#array-portals-first}}
|
||||
{{>Portal}}
|
||||
{{/array-portals}}
|
||||
{{/array-portals-first}}
|
||||
{{#array-portals-rest}}
|
||||
{{>Portal}}
|
||||
{{/array-portals-rest}}
|
||||
</div>
|
||||
|
|
|
@ -14,12 +14,12 @@ export const SIDEBAR_TEMPLATE_PARTIALS = {
|
|||
|
||||
export const SIDEBAR_DATA = {
|
||||
withNoPortals: {
|
||||
'array-portals': [],
|
||||
'array-portals-rest': [],
|
||||
'html-logo-attributes': HTML_LOGO_ATTRIBUTES
|
||||
},
|
||||
withPortals: {
|
||||
'array-portals': [
|
||||
PORTALS.navigation,
|
||||
'array-portals-first': PORTALS.navigation,
|
||||
'array-portals-rest': [
|
||||
PORTALS.toolbox,
|
||||
PORTALS.otherProjects,
|
||||
PORTALS.langlinks
|
||||
|
@ -27,7 +27,7 @@ export const SIDEBAR_DATA = {
|
|||
'html-logo-attributes': HTML_LOGO_ATTRIBUTES
|
||||
},
|
||||
thirdParty: {
|
||||
'array-portals': [
|
||||
'array-portals-rest': [
|
||||
PORTALS.toolbox,
|
||||
PORTALS.navigation,
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue