Do topbar menu 'properly', and add stripes to tables

This commit is contained in:
D. Rimron-Soutter
2025-12-30 18:24:33 +00:00
parent bccac166e7
commit a59ffec9bf
5 changed files with 24440 additions and 19 deletions

View File

@@ -380,23 +380,9 @@ class NextBestNetworkTemplate extends BaseTemplate {
if(preg_match( '/specialpages|whatlinkshere/', $key )) {
$divideditems[] = [];
}
unset($item['icon']);
$divideditems[$key] = $item;
}
// Add page history link at bottom
$views = $this->data['view_urls'];
if( isset( $views['history'] ) ) {
if (
array_key_exists( 'attributes', $views['history'] ) && false !== strpos( $views['history']['attributes'], 'selected' )
|| array_key_exists( 'class', $views['history'] ) && false !== strpos( $views['history']['class'], 'selected' )
) {
$divideditems['history'] = array_shift( $this->data['namespace_urls'] );
} else {
$divideditems['history'] = $views['history'];
}
}
return [[
'href' => '#',
'html' => $html,
@@ -413,18 +399,40 @@ class NextBestNetworkTemplate extends BaseTemplate {
if(!isset( $item['text'] ) ) {
$item['text'] = wfMessage( isset( $item['msg'] ) ? $item['msg'] : $key )->text();
}
// Remove icons
if(isset( $item['icon'] ) ) {
unset( $item['icon'] );
}
if(preg_match( '/specialpages|whatlinkshere/', $key )) {
$divideditems[] = [];
}
$divideditems[$key] = $item;
}
// Special section, just for our historians
$divideditems[] = [];
$divideditems['recent'] = [
'text' => wfMessage( 'recentchanges' )->plain(),
'href' => Title::newFromText( 'Special:RecentChanges' )->getLocalURL(),
'id' => 't-recentchanges',
];
return [[
// Add page history link at bottom
$views = $this->data['view_urls'];
if( isset( $views['history'] ) ) {
if (
array_key_exists( 'attributes', $views['history'] ) && false !== strpos( $views['history']['attributes'], 'selected' )
|| array_key_exists( 'class', $views['history'] ) && false !== strpos( $views['history']['class'], 'selected' )
) {
$divideditems['history'] = array_shift( $this->data['namespace_urls'] );
} else {
$divideditems['history'] = $views['history'];
}
}
return [[
'href' => '#',
'html' => $html,
'id' => 't-tools',