From: Marcel Werk Date: Thu, 18 Aug 2016 18:10:06 +0000 (+0200) Subject: Improved styling of user mentions X-Git-Tag: 3.0.0_Beta_1~682 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1263f7b98a21c91ab906bd55433ab60f2eb33ffa;p=GitHub%2FWoltLab%2FWCF.git Improved styling of user mentions --- diff --git a/com.woltlab.wcf/templates/userBBCodeTag.tpl b/com.woltlab.wcf/templates/userBBCodeTag.tpl index 540243b6c1..7cd4355def 100644 --- a/com.woltlab.wcf/templates/userBBCodeTag.tpl +++ b/com.woltlab.wcf/templates/userBBCodeTag.tpl @@ -1,7 +1,6 @@ {if $userProfile === null} {* user no longer exists, use plain output rather than using a broken link *} - @{$username} + {$username} {else} - {* non-breaking space below to prevent wrapping of user avatar and username *} - {@$userProfile->getAvatar()->getImageTag(16)} {$userProfile->username} + {$userProfile->username} {/if} diff --git a/wcfsetup/install/files/lib/system/bbcode/UserBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/UserBBCode.class.php index d8bc47be60..7b00ec22d9 100644 --- a/wcfsetup/install/files/lib/system/bbcode/UserBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/UserBBCode.class.php @@ -25,9 +25,6 @@ class UserBBCode extends AbstractBBCode { /** @var UserProfile $userProfile */ $userProfile = MessageEmbeddedObjectManager::getInstance()->getObject('com.woltlab.wcf.user', $userID); - if ($userProfile === null) { - return '@'.$content; - } return WCF::getTPL()->fetch('userBBCodeTag', 'wcf', [ 'username' => $content, diff --git a/wcfsetup/install/files/style/bbcode/userMention.scss b/wcfsetup/install/files/style/bbcode/userMention.scss new file mode 100644 index 0000000000..7c9ff03225 --- /dev/null +++ b/wcfsetup/install/files/style/bbcode/userMention.scss @@ -0,0 +1,9 @@ +.userMention { + background-color: $wcfSidebarBackground; + border-radius: 2px; + padding: 2px 5px; + + &::before { + content: '@'; + } +}