diff --git a/dist-persist/wbstack/src/Settings/LocalSettings.php b/dist-persist/wbstack/src/Settings/LocalSettings.php index 7069b099d..ee439028e 100644 --- a/dist-persist/wbstack/src/Settings/LocalSettings.php +++ b/dist-persist/wbstack/src/Settings/LocalSettings.php @@ -227,21 +227,29 @@ $wgHooks['SkinAddFooterLinks'][] = function ( Skin $skin, string $key, array &$footerlinks ) { if ( $key === 'places' ) { - $footerlinks['report'] = Html::element( - 'a', - [ - 'href' => 'https://wikibase.cloud/complaint', - 'target' => '_blank', - 'rel' => 'noopener noreferrer' - ], - 'Report illegal content' - ); + $addFooterLink = function ( string $label, string $url ) use ( &$footerlinks ) { + $key = strtolower( str_replace( ' ', '-', $label ) ); + $footerlinks[ $key ] = Html::element( + 'a', + [ + 'href' => $url, + 'target' => '_blank', + 'rel' => 'noopener noreferrer' + ], + $label + ); + }; + // Display order and styling for these links are configured in "../Styling/footer-links.css" + $addFooterLink( 'Copyrights', '/wiki/Project:Copyrights' ); + $addFooterLink( 'Wikibase Cloud Privacy Policy', 'https://www.wikibase.cloud/privacy-policy' ); + $addFooterLink( 'DSA Information', 'https://www.wikibase.cloud/dsa-info' ); + $addFooterLink( 'Report illegal content', 'https://wikibase.cloud/complaint' ); } }; // Custom CSS styling $wgResourceModules[ 'wbstack.styling' ] = array( - 'styles' => [ 'footer-badges.css' ], + 'styles' => [ 'footer-badges.css', 'footer-links.css' ], 'localBasePath' => "$IP/wbstack/src/Styling", 'remoteBasePath' => "$wgScriptPath/wbstack/src/Styling" ); diff --git a/dist-persist/wbstack/src/Styling/footer-links.css b/dist-persist/wbstack/src/Styling/footer-links.css new file mode 100644 index 000000000..e0db3b5a7 --- /dev/null +++ b/dist-persist/wbstack/src/Styling/footer-links.css @@ -0,0 +1,43 @@ +#footer-places { + display: flex; + flex-wrap: wrap; +} + +#footer-places-privacy { + order: 1; +} + +#footer-places-copyrights { + order: 2; +} + +#footer-places-about { + order: 3; +} + +#footer-places-disclaimers { + order: 4; +} + +#footer-places-mobileview { + order: 5; +} + +#footer-places::after { + order: 6; + content: ""; + flex-basis: 100%; + height: 0; +} + +#footer-places-wikibase-cloud-privacy-policy { + order: 7; +} + +#footer-places-dsa-information { + order: 8; +} + +#footer-places-report-illegal-content { + order: 9; +} diff --git a/dist/wbstack/src/Settings/LocalSettings.php b/dist/wbstack/src/Settings/LocalSettings.php index 7069b099d..ee439028e 100644 --- a/dist/wbstack/src/Settings/LocalSettings.php +++ b/dist/wbstack/src/Settings/LocalSettings.php @@ -227,21 +227,29 @@ $wgHooks['SkinAddFooterLinks'][] = function ( Skin $skin, string $key, array &$footerlinks ) { if ( $key === 'places' ) { - $footerlinks['report'] = Html::element( - 'a', - [ - 'href' => 'https://wikibase.cloud/complaint', - 'target' => '_blank', - 'rel' => 'noopener noreferrer' - ], - 'Report illegal content' - ); + $addFooterLink = function ( string $label, string $url ) use ( &$footerlinks ) { + $key = strtolower( str_replace( ' ', '-', $label ) ); + $footerlinks[ $key ] = Html::element( + 'a', + [ + 'href' => $url, + 'target' => '_blank', + 'rel' => 'noopener noreferrer' + ], + $label + ); + }; + // Display order and styling for these links are configured in "../Styling/footer-links.css" + $addFooterLink( 'Copyrights', '/wiki/Project:Copyrights' ); + $addFooterLink( 'Wikibase Cloud Privacy Policy', 'https://www.wikibase.cloud/privacy-policy' ); + $addFooterLink( 'DSA Information', 'https://www.wikibase.cloud/dsa-info' ); + $addFooterLink( 'Report illegal content', 'https://wikibase.cloud/complaint' ); } }; // Custom CSS styling $wgResourceModules[ 'wbstack.styling' ] = array( - 'styles' => [ 'footer-badges.css' ], + 'styles' => [ 'footer-badges.css', 'footer-links.css' ], 'localBasePath' => "$IP/wbstack/src/Styling", 'remoteBasePath' => "$wgScriptPath/wbstack/src/Styling" ); diff --git a/dist/wbstack/src/Styling/footer-links.css b/dist/wbstack/src/Styling/footer-links.css new file mode 100644 index 000000000..e0db3b5a7 --- /dev/null +++ b/dist/wbstack/src/Styling/footer-links.css @@ -0,0 +1,43 @@ +#footer-places { + display: flex; + flex-wrap: wrap; +} + +#footer-places-privacy { + order: 1; +} + +#footer-places-copyrights { + order: 2; +} + +#footer-places-about { + order: 3; +} + +#footer-places-disclaimers { + order: 4; +} + +#footer-places-mobileview { + order: 5; +} + +#footer-places::after { + order: 6; + content: ""; + flex-basis: 100%; + height: 0; +} + +#footer-places-wikibase-cloud-privacy-policy { + order: 7; +} + +#footer-places-dsa-information { + order: 8; +} + +#footer-places-report-illegal-content { + order: 9; +}