Skip to content

Commit

Permalink
Add custom styling for footer icons (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKostka authored Dec 12, 2024
1 parent b31139e commit 144e8c6
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dist-persist/wbstack/src/Settings/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,21 @@
],
];

// Custom CSS styling
$styles = [];
if ( version_compare( MW_VERSION, '1.43', '<' ) ) {
array_push( $styles, 'footer-badges.css' );
}
$wgResourceModules[ 'wbstack.styling' ] = array(
'styles' => $styles,
'localBasePath' => "$IP/wbstack/src/Styling",
'remoteBasePath' => "$wgScriptPath/wbstack/src/Styling"
);
$wgHooks[ 'BeforePageDisplay' ][] = 'onBeforePageDisplay';
function onBeforePageDisplay( &$out, &$skin ) {
$out->addModuleStyles( [ 'wbstack.styling' ] );
}

// Language
// TODO this should be settings from the main platform
$wgLanguageCode = "en";
Expand Down
14 changes: 14 additions & 0 deletions dist-persist/wbstack/src/Styling/footer-badges.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#footer-poweredbyico a {
margin-left: 0.5em;
margin-top: 0.5em;
padding-left: 8px;
padding-right: 8px;
background-color: #f8f9fa;
border-color: #a2a9b1;
border-radius: 2px;
border-width: 1px;
border-style: solid;
min-height: 44px;
display: inline-flex;
align-items: center;
}
15 changes: 15 additions & 0 deletions dist/wbstack/src/Settings/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,21 @@
],
];

// Custom CSS styling
$styles = [];
if ( version_compare( MW_VERSION, '1.43', '<' ) ) {
array_push( $styles, 'footer-badges.css' );
}
$wgResourceModules[ 'wbstack.styling' ] = array(
'styles' => $styles,
'localBasePath' => "$IP/wbstack/src/Styling",
'remoteBasePath' => "$wgScriptPath/wbstack/src/Styling"
);
$wgHooks[ 'BeforePageDisplay' ][] = 'onBeforePageDisplay';
function onBeforePageDisplay( &$out, &$skin ) {
$out->addModuleStyles( [ 'wbstack.styling' ] );
}

// Language
// TODO this should be settings from the main platform
$wgLanguageCode = "en";
Expand Down
14 changes: 14 additions & 0 deletions dist/wbstack/src/Styling/footer-badges.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#footer-poweredbyico a {
margin-left: 0.5em;
margin-top: 0.5em;
padding-left: 8px;
padding-right: 8px;
background-color: #f8f9fa;
border-color: #a2a9b1;
border-radius: 2px;
border-width: 1px;
border-style: solid;
min-height: 44px;
display: inline-flex;
align-items: center;
}

0 comments on commit 144e8c6

Please sign in to comment.