From: Marcel Werk Date: Sun, 21 Aug 2016 09:04:57 +0000 (+0200) Subject: Improved user profile header X-Git-Tag: 3.0.0_Beta_1~630 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=07c80400f753e797fff122f1181ae3ab54e0340c;p=GitHub%2FWoltLab%2FWCF.git Improved user profile header * Added online badge * Fixed some mobile issues --- diff --git a/com.woltlab.wcf/templates/user.tpl b/com.woltlab.wcf/templates/user.tpl index 4f1000671f..febc0cf60d 100644 --- a/com.woltlab.wcf/templates/user.tpl +++ b/com.woltlab.wcf/templates/user.tpl @@ -146,6 +146,7 @@ {else} {@$user->getAvatar()->getImageTag(128)} {/if} + {if $user->isOnline()}{lang}wcf.user.online{/lang}{/if}
diff --git a/wcfsetup/install/files/style/layout/content.scss b/wcfsetup/install/files/style/layout/content.scss index f87bac3ab4..62f112c31e 100644 --- a/wcfsetup/install/files/style/layout/content.scss +++ b/wcfsetup/install/files/style/layout/content.scss @@ -57,7 +57,7 @@ color: $wcfContentDimmedText; } - @include screen-md-down { + @include screen-sm-down { .contentHeaderIcon { display: none; } diff --git a/wcfsetup/install/files/style/ui/userProfile.scss b/wcfsetup/install/files/style/ui/userProfile.scss index 30c1c31ec4..c08a551fe8 100644 --- a/wcfsetup/install/files/style/ui/userProfile.scss +++ b/wcfsetup/install/files/style/ui/userProfile.scss @@ -1,4 +1,40 @@ .userProfileUser { + .contentHeaderIcon { + position: relative; + + a { + display: block; + } + + .badgeOnline { + left: 0; + pointer-events: none; + position: absolute; + + @include screen-md-up { + bottom: 0; + } + + @include screen-sm-down { + color: transparent; + padding: 0; + top: 0; + width: 0; + + &::before { + background-color: inherit; + border: 1px solid rgba(255, 255, 255, 1); + border-radius: 50%; + content: ""; + height: 16px; + left: 34px; /* 48px (avatar) - 16px (width) - 2px (border-left + border-right) */ + position: absolute; + width: 16px; + } + } + } + } + .contentHeaderIcon a { display: block; } @@ -7,7 +43,7 @@ margin-top: 20px; } - @include screen-md-down { + @include screen-sm-down { display: flex; flex-wrap: wrap; @@ -26,7 +62,9 @@ flex: 0 0 calc(100% - 58px); max-width: calc(100% - 58px); } - + } + + @include screen-xs { .contentHeaderNavigation { flex: 0 0 100%;