Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CSU
tweeki
Commits
df6c250d
Commit
df6c250d
authored
Jul 28, 2020
by
Tobias Haider
Browse files
Merge branch 'master' into development
parents
10150663
dfef93a6
Changes
3
Show whitespace changes
Inline
Side-by-side
includes/Hooks.php
View file @
df6c250d
...
...
@@ -999,4 +999,12 @@ 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
);
}
}
}
includes/SkinTweeki.php
View file @
df6c250d
...
...
@@ -42,7 +42,7 @@ class SkinTweeki extends SkinTemplate {
->
makeConfig
(
'tweeki'
);
}
p
rotected
static
$bodyClasses
=
array
(
'tweeki-animateLayout'
);
p
ublic
static
$bodyClasses
=
array
(
'tweeki-animateLayout'
);
/**
...
...
@@ -122,20 +122,6 @@ class SkinTweeki extends SkinTemplate {
$out
->
addModuleStyles
(
$styles
);
}
/**
* Adds classes to the body element.
*
* @param $out OutputPage object
* @param &$bodyAttrs Array of attributes that will be set on the body element
*/
function
addToBodyAttributes
(
$out
,
&
$bodyAttrs
)
{
if
(
isset
(
$bodyAttrs
[
'class'
]
)
&&
strlen
(
$bodyAttrs
[
'class'
]
)
>
0
)
{
$bodyAttrs
[
'class'
]
.
=
' '
.
implode
(
' '
,
static
::
$bodyClasses
);
}
else
{
$bodyAttrs
[
'class'
]
=
implode
(
' '
,
static
::
$bodyClasses
);
}
}
/**
* Override to pass our Config instance to it
* @param string $classname
...
...
skin.json
View file @
df6c250d
...
...
@@ -38,7 +38,8 @@
"MagicWordMagicWords"
:
"TweekiHooks::onMagicWordMagicWords"
,
"MagicWordwgVariableIDs"
:
"TweekiHooks::onMagicWordwgVariableIDs"
,
"InternalParseBeforeLinks"
:
"TweekiHooks::onInternalParseBeforeLinks"
,
"OutputPageBeforeHTML"
:
"TweekiHooks::onOutputPageBeforeHTML"
"OutputPageBeforeHTML"
:
"TweekiHooks::onOutputPageBeforeHTML"
,
"OutputPageBodyAttributes"
:
"TweekiHooks::onOutputPageBodyAttributes"
},
"ResourceModules"
:
{
"skins.tweeki.messages"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment