Commit 76fc1e86 authored by thaider's avatar thaider
Browse files

Merge branch 'master' into development

parents 0d6d564d d019e01b
# Tweeki, a Bootstrap based skin for MediaWiki
Tweeki is a skin for **[MediaWiki](http://mediawiki.org/)** (1.31+) based on Twitter's
**[Bootstrap](http://getbootstrap.com/)** (v3.3.7). It tries to implement as much of
**[Bootstrap](http://getbootstrap.com/)** (v3.4.1). It tries to implement as much of
Bootstrap's functionality as possible, allowing to use it very easily and with very
reduced markup, and features many configuration options.
......
......@@ -179,3 +179,26 @@ body.mw-hide-empty-elt .mw-empty-elt {
.mw-content-ltr .mw-content-rtl .mw-editsection {
margin-right: 1em;
}
/* Display editsection links smaller and next to headings */
.mw-editsection,
.mw-editsection-like {
font-size: small;
font-weight: normal;
margin-left: 1em;
vertical-align: baseline;
/* Reset line-height; headings tend to have it set to larger values */
line-height: 1em;
}
/* Correct directionality when page dir is different from site/user dir */
/* @noflip */
.mw-content-ltr .mw-editsection,
.mw-content-rtl .mw-content-ltr .mw-editsection {
margin-left: 1em;
}
/* @noflip */
.mw-content-rtl .mw-editsection,
.mw-content-ltr .mw-content-rtl .mw-editsection {
margin-right: 1em;
}
......@@ -184,6 +184,7 @@ class TweekiHooks {
*/
static function setHiddenElements( Parser $parser ) {
global $wgTweekiSkinHideAll, $wgTweekiSkinHideable;
$parser->getOutput()->updateCacheExpiry(0);
for ( $i = 1; $i < func_num_args(); $i++ ) {
if ( in_array ( func_get_arg( $i ), $wgTweekiSkinHideable ) ) {
......@@ -201,6 +202,7 @@ class TweekiHooks {
*/
static function setHiddenElementsGroups( Parser $parser ) {
global $wgTweekiSkinHideAll, $wgTweekiSkinHideable;
$parser->getOutput()->updateCacheExpiry(0);
$groups_except = explode( ',', func_get_arg( 1 ) );
$groups_user = $parser->getUser()->getEffectiveGroups();
......@@ -221,6 +223,8 @@ class TweekiHooks {
* @return string
*/
static function addBodyclass( Parser $parser ) {
$parser->getOutput()->updateCacheExpiry(0);
for ( $i = 1; $i < func_num_args(); $i++ ) {
$GLOBALS['wgTweekiSkinAdditionalBodyClasses'][] = func_get_arg( $i );
}
......@@ -954,7 +958,6 @@ class TweekiHooks {
$text = $icon . ( ( $icon != '' ) ? ' ' : '' ) . $text;
}
$links['editsection']['text'] = $text;
$links['editsection']['attribs']['class'] = $class;
return true;
......@@ -1015,13 +1018,4 @@ class TweekiHooks {
}
return true;
}
public static function onOutputPageBodyAttributes( $out, $sk, &$bodyAttrs ) {
if ( isset( $bodyAttrs['class'] ) && strlen( $bodyAttrs['class'] ) > 0 ) {
$bodyAttrs['class'] .= ' ' . implode( ' ', SkinTweeki::$bodyClasses );
} else {
$bodyAttrs['class'] = implode( ' ', SkinTweeki::$bodyClasses );
}
}
}
......@@ -39,8 +39,7 @@
"MagicWordMagicWords": "TweekiHooks::onMagicWordMagicWords",
"MagicWordwgVariableIDs": "TweekiHooks::onMagicWordwgVariableIDs",
"InternalParseBeforeLinks": "TweekiHooks::onInternalParseBeforeLinks",
"OutputPageBeforeHTML": "TweekiHooks::onOutputPageBeforeHTML",
"OutputPageBodyAttributes": "TweekiHooks::onOutputPageBodyAttributes"
"OutputPageBeforeHTML": "TweekiHooks::onOutputPageBeforeHTML"
},
"ResourceModules": {
"skins.tweeki.messages": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment