Removed unused bottom bar

This commit is contained in:
alistair3149 2020-06-07 02:07:30 -04:00
parent e6f2a895bf
commit bc15fd916e
No known key found for this signature in database
GPG key ID: 94D081060FD3DD9C
12 changed files with 211 additions and 147 deletions

View file

@ -95,8 +95,6 @@ class CitizenTemplate extends BaseTemplate {
'msg-citizen-footer-tagline' => $this->getMsg( 'citizen-footer-tagline' )->text(),
'array-footer-icons' => $this->getFooterIconsRow(),
],
'data-bottombar' => $this->buildBottombar(),
];
// Prepare and output the HTML response
@ -351,26 +349,6 @@ class CitizenTemplate extends BaseTemplate {
return $props;
}
/**
* Render the bottom bar
* TODO: Convert button text to i18n message.
* TODO: Refactor the bottom bar to be customizable
* @return array
*/
private function buildBottombar() : array {
$config = $this->config;
$buttonEnabled = $config->get( 'CitizenEnableButton' );
if ( $buttonEnabled === false ) {
return '';
}
$props = [
'html-citizen-bottombar-button-href' => $config->get( 'CitizenButtonLink' ),
'html-citizen-bottombar-button-title' => $config->get( 'CitizenButtonTitle' ),
'html-citizen-bottombar-button-text' => $config->get( 'CitizenButtonText' ),
];
return $props;
}
/**
* Get last modified message
* @return string html

View file

@ -1,13 +0,0 @@
{{!
string html-citizen-bottombar-button-href URL of the button
string html-citizen-bottombar-button-title tooltip of the button
string html-citizen-bottombar-button-text text of the button
}}
<aside class="mw-bottombar">
<nav class="mw-bottombar-buttons">
<div class="citizen-ui-icon" id="citizen-ui-button">
<a href="{{html-citizen-bottombar-button-href}}" title="{{html-citizen-bottombar-button-title}}" rel="noopener noreferrer" target="_blank">{{{html-citizen-bottombar-button-text}}}</a>
</div>
</nav>
</aside>

View file

@ -65,5 +65,4 @@
<aside class="mw-sidebar-sitename">
<a class="mw-wiki-title" {{{html-mainpage-attributes}}}>{{{msg-sitetitle}}}</a>
</aside>
{{#data-bottombar}}{{>Bottombar}}{{/data-bottombar}}
{{{html-printtail}}}

View file

@ -0,0 +1,184 @@
//
// Citizen - Footer styles
// https://starcitizen.tools
//
.last-modified-bar {
background: @color-footer-background-60;
&-content {
margin: 0 auto;
padding: 12px @margin-side;
max-width: @footer-width;
display: flex;
align-items: center;
}
&-icon {
margin-right: @icon-padding;
width: 20px;
height: 20px;
background-repeat: no-repeat;
background-position: center;
opacity: @opacity-icon;
}
&-text {
a {
margin-right: 5px;
}
}
}
.mw-footer {
z-index: 8; // High enough so it covers the floating UI
clear: both;
position: relative;
direction: ltr;
margin-top: @margin-side * 2;
color: @color-footer-text;
background: @color-footer-background-50;
font-size: @ui-menu-text;
line-height: @footer-line-height;
a {
color: @color-footer-link;
&:hover,
&:active,
&:focus {
color: @color-footer-link-active;
text-decoration: none;
}
}
ul {
margin: 0;
display: flex;
flex-wrap: wrap;
}
li {
list-style: none;
}
}
#footer {
&-content {
margin: 0 auto;
padding: 0 @margin-side;
max-width: @footer-width;
display: flex;
flex-direction: column;
}
&-bottom {
margin-top: @margin-side * 1.5;
background-color: @color-footer-background-40;
&-content {
margin: 0 auto;
padding: @margin-side / 2 @margin-side;
max-width: @footer-width;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
}
&-sitetitle {
margin: @margin-side * 2.5 0 @margin-side / 2 0;
color: @base-90;
font-size: 20px;
}
&-desc {
margin: @margin-side / 2 0;
}
&-places {
margin: 0 -@margin-side !important;
display: flex;
flex-wrap: wrap;
li a {
padding: @margin-side / 2 @margin-side;
display: block;
}
}
&-info {
margin-top: @margin-side / 2;
opacity: 0.5;
font-size: 12px;
li {
margin: @margin-side / 2 0;
}
}
&-tagline {
padding: @margin-side / 2 0;
}
&-icons {
margin: 0 -@margin-side / 2;
display: flex;
a {
padding: @margin-side * 0.75 @margin-side / 2;
height: 50px; // CSS hack to force SVG icon to appear
display: flex;
justify-content: center;
align-items: center;
opacity: 0.5;
transition: @transition-opacity;
img {
display: none; // Hack to hide original icons
}
&:before {
content: '';
.resource-loader-icon;
display: block;
background-size: contain;
}
&:hover {
opacity: 0.7;
}
// Icon styles
&[ href*='starcitizen.tools' ] {
width: 50px;
}
&[ href*='robertsspaceindustries' ] {
width: 50px;
}
&[ href*='gdpr' ] {
width: 50px;
}
&[ href*='wikiapiary' ] {
width: 95px;
margin-bottom: -3px; //dirty fix
}
&[ href*='mediawiki' ] {
width: 95px;
}
&[ href*='miraheze' ] {
width: 95px;
}
&[ href*='by-sa' ] {
width: 110px;
}
}
}
}

View file

@ -48,20 +48,6 @@
}
}
// CSS checkbox hack
// Technically shouldn't be here but it is only used in header
.mw-checkbox-hack {
width: @icon-box-size + @margin-side + @icon-padding;
height: @header-height;
position: absolute;
z-index: 8;
margin: 0;
display: block;
opacity: 0;
cursor: pointer;
-webkit-touch-callout: none;
}
@media ( prefers-color-scheme: dark ) {
#mw-header {
&-background {

View file

@ -1,5 +1,5 @@
/*
* Citizen - Navigation Styles
* Citizen - Sidebar styles
* https://starcitizen.tools
*/

View file

@ -1,58 +0,0 @@
//
// Citizen - Bottombar Styles
// https://starcitizen.tools
//
.mw-bottombar {
position: fixed;
bottom: 0;
display: flex;
justify-content: space-between;
transform: translate( 0, @header-height + @margin-side );
transition: @transition-transform;
&-buttons {
display: flex;
margin: @margin-side;
background-color: #7289da; // Discord color
border-radius: 100%;
.boxshadow(4);
transition: @transition-transform-quick, @transition-box-shadow-quick;
.citizen-ui-icon {
> a {
width: @header-height;
height: @header-height;
display: flex;
align-items: center;
justify-content: center;
text-indent: -1000px; // Hide text
&:after {
display: block;
.resource-loader-menu-icon;
transition: @transition-opacity;
opacity: 1;
position: relative; // temp override
}
&:hover {
&:after {
opacity: 0.7;
}
}
}
}
}
}
// Movable navigation bar
.nav-up ~ .mw-bottombar {
transform: none;
}
@media only screen and ( max-width: @screen0 ) {
.mw-bottombar {
display: none;
}
}

View file

@ -5,6 +5,29 @@
@import 'mediawiki.mixins';
/*
* Hacks
* TODO: Find a place to put them
*/
// Hide RSS icon
a.feedlink {
background: none !important;
}
// CSS checkbox hack
.mw-checkbox-hack {
width: @icon-box-size + @margin-side + @icon-padding;
height: @header-height;
position: absolute;
z-index: 8;
margin: 0;
display: block;
opacity: 0;
cursor: pointer;
-webkit-touch-callout: none;
}
/*
* Framework
*/

View file

@ -1,5 +1,5 @@
//
// Citizen - Footer Styles
// Citizen - Footer styles
// https://starcitizen.tools
//

View file

@ -1 +0,0 @@
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 245 240" xml:space="preserve"><style>.st0{fill:#fff}</style><path class="st0" d="M104.4 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1.1-6.1-4.5-11.1-10.2-11.1zm36.5 0c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1s-4.5-11.1-10.2-11.1z"/><path class="st0" d="M189.5 20h-134C44.2 20 35 29.2 35 40.6v135.2c0 11.4 9.2 20.6 20.5 20.6h113.4l-5.3-18.5 12.8 11.9 12.1 11.2 21.5 19V40.6c0-11.4-9.2-20.6-20.5-20.6zm-38.6 130.6s-3.6-4.3-6.6-8.1c13.1-3.7 18.1-11.9 18.1-11.9-4.1 2.7-8 4.6-11.5 5.9-5 2.1-9.8 3.5-14.5 4.3-9.6 1.8-18.4 1.3-25.9-.1-5.7-1.1-10.6-2.7-14.7-4.3-2.3-.9-4.8-2-7.3-3.4-.3-.2-.6-.3-.9-.5-.2-.1-.3-.2-.4-.3-1.8-1-2.8-1.7-2.8-1.7s4.8 8 17.5 11.8c-3 3.8-6.7 8.3-6.7 8.3-22.1-.7-30.5-15.2-30.5-15.2 0-32.2 14.4-58.3 14.4-58.3 14.4-10.8 28.1-10.5 28.1-10.5l1 1.2c-18 5.2-26.3 13.1-26.3 13.1s2.2-1.2 5.9-2.9c10.7-4.7 19.2-6 22.7-6.3.6-.1 1.1-.2 1.7-.2 6.1-.8 13-1 20.2-.2 9.5 1.1 19.7 3.9 30.1 9.6 0 0-7.9-7.5-24.9-12.7l1.4-1.6s13.7-.3 28.1 10.5c0 0 14.4 26.1 14.4 58.3 0 0-8.5 14.5-30.6 15.2z"/></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -3,15 +3,14 @@
@import 'variables.less';
@import 'mixins.less';
@import 'components/common.less';
@import 'components/navigation.less';
@import 'components/wikitable.less';
@import 'components/page-tools.less';
@import 'components/search.less';
@import 'components/footer.less';
@import 'components/bottombar.less';
@import 'components/scrollbar.less';
@import 'components/darkmode.less';
@import 'components/reducemotion.less';
@import 'components/Header.less';
@import 'components/Drawer.less';
@import 'components/Searchbox.less';
@import 'components/Sidebar.less';
@import 'components/Footer.less';

View file

@ -135,30 +135,6 @@
"descriptionmsg": "citizen-config-maxsearchresults",
"public": true
},
"EnableButton": {
"value": false,
"description": "Enable or disable the floating action button on the bottom left",
"descriptionmsg": "citizen-config-enablebutton",
"public": true
},
"ButtonLink": {
"value": "",
"description": "The URL of the FAB button",
"descriptionmsg": "citizen-config-buttonlink",
"public": true
},
"ButtonTitle": {
"value": "",
"description": "The title of the link element on the FAB",
"descriptionmsg": "citizen-config-buttontitle",
"public": true
},
"ButtonText": {
"value": "",
"description": "The text of the FAB",
"descriptionmsg": "citizen-config-buttontext",
"public": true
},
"ShowPageTools": {
"value": true,
"description": "Page tools visibility condition",
@ -226,15 +202,6 @@
"resources/scripts/lazyload.js"
]
},
"skins.citizen.icons": {
"class": "ResourceLoaderImageModule",
"selector": "#citizen-ui-{name} > *:after",
"defaultColor": "#000",
"useDataURI": false,
"images": {
"button": "resources/images/icons/discord.svg"
}
},
"skins.citizen.icons.ca": {
"class": "ResourceLoaderImageModule",
"selector": "#ca-{name} > *:after",