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

@@ -12,7 +12,7 @@
"nextbestnetwork-navbar-left": "FAQ",
"nextbestnetwork-navbar-left-wrapper": "li",
"nextbestnetwork-navbar-left-wrapperclass": "nav",
"nextbestnetwork-navbar-right": "TOOLBOX,PERSONAL,SEARCH",
"nextbestnetwork-navbar-right": "TOOLBOX-EXT,PERSONAL,SEARCH",
"nextbestnetwork-navbar-right-wrapper": "li",
"nextbestnetwork-navbar-right-wrapperclass": "nav",
"nextbestnetwork-navbar-right-dropdownclass": "dropdown-menu-end",

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,17 +399,39 @@ 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',
];
// 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,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -16,6 +16,9 @@
html[data-bs-theme="dark"] body .wikitable,
html[data-bs-theme="dark"] body .formtable {
@extend .table;
@extend .table-striped;
--bs-table-color: var(--bs-body-color);
--bs-table-bg: var(--bs-body-bg);
--bs-table-border-color: rgba(255, 255, 255, 0.12);