Merge pull request #13 from flarum/mk/2033-hide-mentions-spoilers

Hide mentions in inline spoilers
This commit is contained in:
Daniël Klabbers 2020-03-03 14:08:45 +01:00 committed by GitHub
commit 17a9e1f0ab
2 changed files with 17 additions and 1 deletions

View File

@ -12,10 +12,12 @@ use s9e\TextFormatter\Configurator;
return [
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js'),
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/less/forum.less'),
(new Extend\Formatter)
->configure(function (Configurator $config) {
$config->Litedown;
$config->tags['ispoiler']->template = '<span class="spoiler" data-s9e-livepreview-ignore-attrs="style" onclick="removeAttribute(\'style\'); removeAttribute(\'class\')" style="background:#444;color:transparent"><xsl:apply-templates/></span>';
})
];

View File

@ -0,0 +1,14 @@
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
.PostMention, .UserMention {
.spoiler & {
background: #444;
color: transparent;
padding: 0;
}
}