Redesigned user profile page
authorAlexander Ebert <ebert@woltlab.com>
Wed, 16 Mar 2016 09:28:34 +0000 (10:28 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 16 Mar 2016 09:28:34 +0000 (10:28 +0100)
com.woltlab.wcf/templates/user.tpl
com.woltlab.wcf/templates/userHeader.tpl
wcfsetup/install/files/style/ui/userProfile.scss

index 3b491a32722632ad679cee2ccf77918d659ba539..80fd8ffcae9f7b7a24cd1bf2f583c44d18a94be2 100644 (file)
 {include file='userNotice'}
 
 {if !$user->isProtected()}
-       <div id="profileContent" class="section tabMenuContainer userProfile" data-active="{$__wcf->getUserProfileMenu()->getActiveMenuItem()->getIdentifier()}">
+       <div id="profileContent" class="section tabMenuContainer userProfileContent" data-active="{$__wcf->getUserProfileMenu()->getActiveMenuItem()->getIdentifier()}">
                <nav class="tabMenu">
                        <ul>
                                {foreach from=$__wcf->getUserProfileMenu()->getMenuItems() item=menuItem}
index 3ebb3696eda7d6be973751b58e986c268d7ceb8c..9a4b702c1f31e018aa1d3835adc68680f0b3a500 100644 (file)
@@ -1,8 +1,21 @@
-
 <div class="box userProfileHeader">
        <div class="boxContent">
-               <div class="layoutBoundary">
-                       <div class="box128">
+               <div class="userProfileCoverPhoto"></div>
+               
+               <div class="userProfileUser"{if $isAccessible}
+                       data-object-id="{@$user->userID}"
+                       {if $__wcf->session->getPermission('admin.user.canBanUser')}
+                               data-banned="{@$user->banned}"
+                       {/if}
+                       {if $__wcf->session->getPermission('admin.user.canDisableAvatar')}
+                               data-disable-avatar="{@$user->disableAvatar}"
+                       {/if}
+                       {if $__wcf->session->getPermission('admin.user.canDisableSignature')}
+                               data-disable-signature="{@$user->disableSignature}"
+                       {/if}
+                       {/if}>
+                       
+                       <div class="layoutBoundary">
                                <div class="userAvatar">
                                        {if $user->userID == $__wcf->user->userID}
                                                <a href="{link controller='AvatarEdit'}{/link}" class="jsTooltip" title="{lang}wcf.user.avatar.edit{/lang}">{@$user->getAvatar()->getImageTag(128)}</a>
                                                <span>{@$user->getAvatar()->getImageTag(128)}</span>
                                        {/if}
                                </div>
-                       
-                               <section class="userDetails"{if $isAccessible}
-                                       data-object-id="{@$user->userID}"
-                                       {if $__wcf->session->getPermission('admin.user.canBanUser')}
-                                               data-banned="{@$user->banned}"
-                                       {/if}
-                                       {if $__wcf->session->getPermission('admin.user.canDisableAvatar')}
-                                               data-disable-avatar="{@$user->disableAvatar}"
+                               
+                               <header class="contentHeader">
+                                       <h1 class="contentTitle">
+                                               {$user->username}{if $user->banned} <span class="icon icon16 fa-lock jsTooltip jsUserBanned" title="{lang}wcf.user.banned{/lang}"></span>{/if}
+                                       </h1>
+                                       {if MODULE_USER_RANK}
+                                               {if $user->getUserTitle()}
+                                                       <span class="badge userTitleBadge{if $user->getRank() && $user->getRank()->cssClassName} {@$user->getRank()->cssClassName}{/if}">{$user->getUserTitle()}</span>
+                                               {/if}
+                                               {if $user->getRank() && $user->getRank()->rankImage}
+                                                       <span class="userRankImage">{@$user->getRank()->getImage()}</span>
+                                               {/if}
                                        {/if}
-                                       {if $__wcf->session->getPermission('admin.user.canDisableSignature')}
-                                               data-disable-signature="{@$user->disableSignature}"
-                                       {/if}
-                                       {/if}>
-                                       <header class="contentHeader">
-                                               <h1 class="contentTitle">
-                                                       {$user->username}{if $user->banned} <span class="icon icon16 fa-lock jsTooltip jsUserBanned" title="{lang}wcf.user.banned{/lang}"></span>{/if}
-                                                       {if MODULE_USER_RANK}
-                                                               {if $user->getUserTitle()}
-                                                                       <span class="badge userTitleBadge{if $user->getRank() && $user->getRank()->cssClassName} {@$user->getRank()->cssClassName}{/if}">{$user->getUserTitle()}</span>
-                                                               {/if}
-                                                               {if $user->getRank() && $user->getRank()->rankImage}
-                                                                       <span class="userRankImage">{@$user->getRank()->getImage()}</span>
-                                                               {/if}
+                               </header>
+                               
+                               <div class="buttonGroupNavigation">
+                                       <ul id="profileButtonContainer" class="buttonGroup">
+                                               {hascontent}
+                                                       <li class="dropdown">
+                                                               <a href="#" class="button dropdownToggle jsTooltip" title="{lang}wcf.user.searchUserContent{/lang}"><span class="icon icon16 fa-search"></span> <span class="invisible">{lang}wcf.user.searchUserContent{/lang}</span></a>
+                                                               <ul class="dropdownMenu">
+                                                                       {content}
+                                                                       {event name='quickSearchItems'}
+                                                                       {/content}
+                                                               </ul>
+                                                       </li>
+                                               {/hascontent}
+                                               
+                                               {if $__wcf->session->getPermission('user.profile.canReportContent')}
+                                                       <li class="jsReportUser jsOnly" data-object-id="{@$user->userID}"><a href="#" title="{lang}wcf.user.profile.report{/lang}" class="button jsTooltip"><span class="icon icon16 fa-exclamation-triangle"></span> <span class="invisible">{lang}wcf.user.profile.report{/lang}</span></a></li>
+                                               {/if}
+                                               
+                                               {if $user->userID != $__wcf->user->userID}
+                                                       {if $user->isAccessible('canViewEmailAddress') || $__wcf->session->getPermission('admin.user.canEditMailAddress')}
+                                                               <li><a class="button jsTooltip" href="mailto:{@$user->getEncodedEmail()}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 fa-envelope-o"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>
+                                                       {elseif $user->isAccessible('canMail') && $__wcf->session->getPermission('user.profile.canMail')}
+                                                               <li><a class="button jsTooltip" href="{link controller='Mail' object=$user}{/link}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 fa-envelope-o"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>
                                                        {/if}
-                                               </h1>
-                                       </header>
-                                       
+                                               {/if}
+                                               
+                                               {event name='buttons'}
+                                               
+                                               {if $isAccessible && $__wcf->user->userID != $user->userID && ($__wcf->session->getPermission('admin.user.canBanUser') || $__wcf->session->getPermission('admin.user.canDisableAvatar') || $__wcf->session->getPermission('admin.user.canDisableSignature') || ($__wcf->session->getPermission('admin.general.canUseAcp') && $__wcf->session->getPermission('admin.user.canEditUser')){event name='moderationDropdownPermissions'})}
+                                                       <li class="dropdown">
+                                                               <a href="{link controller='UserEdit' object=$user isACP=true}{/link}" class="button jsTooltip jsUserInlineEditor" title="{lang}wcf.user.moderate{/lang}"><span class="icon icon16 fa-wrench"></span> <span class="invisible">{lang}wcf.user.moderate{/lang}</span></a>
+                                                               <ul class="dropdownMenu"></ul>
+                                                       </li>
+                                               {/if}
+                                       </ul>
+                               </div>
+                       </div>
+               </div>
+               <div class="userProfileDetails">
+                       <div class="layoutBoundary">
+                               <ul class="inlineList commaSeparated">
+                                       {if $user->isVisibleOption('gender') && $user->gender}<li>{lang}wcf.user.gender.{if $user->gender == 1}male{else}female{/if}{/lang}</li>{/if}
+                                       {if $user->isVisibleOption('birthday') && $user->getAge()}<li>{@$user->getAge()}</li>{/if}
+                                       {if $user->isVisibleOption('location') && $user->location}<li>{lang}wcf.user.membersList.location{/lang}</li>{/if}
+                                       {if $user->getOldUsername()}<li>{lang}wcf.user.profile.oldUsername{/lang}</li>{/if}
+                                       <li>{lang}wcf.user.membersList.registrationDate{/lang}</li>
+                                       {event name='userDataRow1'}
+                               </ul>
+                               
+                               {if $user->canViewOnlineStatus() && $user->getLastActivityTime()}
                                        <ul class="inlineList commaSeparated">
-                                               {if $user->isVisibleOption('gender') && $user->gender}<li>{lang}wcf.user.gender.{if $user->gender == 1}male{else}female{/if}{/lang}</li>{/if}
-                                               {if $user->isVisibleOption('birthday') && $user->getAge()}<li>{@$user->getAge()}</li>{/if}
-                                               {if $user->isVisibleOption('location') && $user->location}<li>{lang}wcf.user.membersList.location{/lang}</li>{/if}
-                                               {if $user->getOldUsername()}<li>{lang}wcf.user.profile.oldUsername{/lang}</li>{/if}
-                                               <li>{lang}wcf.user.membersList.registrationDate{/lang}</li>
-                                               {event name='userDataRow1'}
+                                               <li>{lang}wcf.user.usersOnline.lastActivity{/lang}: {@$user->getLastActivityTime()|time}</li>
+                                               {if $user->getCurrentLocation()}<li>{@$user->getCurrentLocation()}</li>{/if}
                                        </ul>
-                                       
-                                       {if $user->canViewOnlineStatus() && $user->getLastActivityTime()}
-                                               <ul class="inlineList commaSeparated">
-                                                       <li>{lang}wcf.user.usersOnline.lastActivity{/lang}: {@$user->getLastActivityTime()|time}</li>
-                                                       {if $user->getCurrentLocation()}<li>{@$user->getCurrentLocation()}</li>{/if}
-                                               </ul>
-                                       {/if}
-                                       
-                                       {hascontent}
-                                               <dl class="plain inlineDataList">
-                                                       {content}
-                                                               {event name='statistics'}
-                                                               
-                                                               {if MODULE_LIKE && $user->likesReceived}
-                                                                       <dt>{if !$user->isProtected()}<a href="{link controller='User' object=$user}{/link}#likes" class="jsTooltip" title="{lang}wcf.like.showLikesReceived{/lang}">{lang}wcf.like.likesReceived{/lang}</a>{else}{lang}wcf.like.likesReceived{/lang}{/if}</dt>
-                                                                       <dd>{#$user->likesReceived}</dd>
-                                                               {/if}
-                                                               
-                                                               {if $user->activityPoints}
-                                                                       <dt><a href="#" class="activityPointsDisplay jsTooltip" title="{lang}wcf.user.activityPoint.showActivityPoints{/lang}" data-user-id="{@$user->userID}">{lang}wcf.user.activityPoint{/lang}</a></dt>
-                                                                       <dd>{#$user->activityPoints}</dd>
-                                                               {/if}
-                                                               
-                                                               {if $user->profileHits}
-                                                                       <dt>{lang}wcf.user.profileHits{/lang}</dt>
-                                                                       <dd{if $user->getProfileAge() > 1} title="{lang}wcf.user.profileHits.hitsPerDay{/lang}"{/if}>{#$user->profileHits}</dd>
-                                                               {/if}
-                                                       {/content}
-                                               </dl>
-                                       {/hascontent}
-                                       
-                                       <nav class="buttonGroupNavigation">
-                                               <ul id="profileButtonContainer" class="buttonGroup">
-                                                       {hascontent}
-                                                               <li class="dropdown">
-                                                                       <a href="#" class="button dropdownToggle jsTooltip" title="{lang}wcf.user.searchUserContent{/lang}"><span class="icon icon16 fa-search"></span> <span class="invisible">{lang}wcf.user.searchUserContent{/lang}</span></a>
-                                                                       <ul class="dropdownMenu">
-                                                                               {content}
-                                                                               {event name='quickSearchItems'}
-                                                                               {/content}
-                                                                       </ul>
-                                                               </li>
-                                                       {/hascontent}
-                                                       
-                                                       {if $__wcf->session->getPermission('user.profile.canReportContent')}
-                                                               <li class="jsReportUser jsOnly" data-object-id="{@$user->userID}"><a href="#" title="{lang}wcf.user.profile.report{/lang}" class="button jsTooltip"><span class="icon icon16 fa-exclamation-triangle"></span> <span class="invisible">{lang}wcf.user.profile.report{/lang}</span></a></li>
-                                                       {/if}
-                                                       
-                                                       {if $user->userID != $__wcf->user->userID}
-                                                               {if $user->isAccessible('canViewEmailAddress') || $__wcf->session->getPermission('admin.user.canEditMailAddress')}
-                                                                       <li><a class="button jsTooltip" href="mailto:{@$user->getEncodedEmail()}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 fa-envelope-o"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>
-                                                               {elseif $user->isAccessible('canMail') && $__wcf->session->getPermission('user.profile.canMail')}
-                                                                       <li><a class="button jsTooltip" href="{link controller='Mail' object=$user}{/link}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 fa-envelope-o"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>
-                                                               {/if}
-                                                       {/if}
-                                                       
-                                                       {event name='buttons'}
-                                                       
-                                                       {if $isAccessible && $__wcf->user->userID != $user->userID && ($__wcf->session->getPermission('admin.user.canBanUser') || $__wcf->session->getPermission('admin.user.canDisableAvatar') || $__wcf->session->getPermission('admin.user.canDisableSignature') || ($__wcf->session->getPermission('admin.general.canUseAcp') && $__wcf->session->getPermission('admin.user.canEditUser')){event name='moderationDropdownPermissions'})}
-                                                               <li class="dropdown">
-                                                                       <a href="{link controller='UserEdit' object=$user isACP=true}{/link}" class="button jsTooltip jsUserInlineEditor" title="{lang}wcf.user.moderate{/lang}"><span class="icon icon16 fa-wrench"></span> <span class="invisible">{lang}wcf.user.moderate{/lang}</span></a>
-                                                                       <ul class="dropdownMenu"></ul>
-                                                               </li>
-                                                       {/if}
-                                               </ul>
-                                       </nav>
-                               </section>
+                               {/if}
+                               
+                               {hascontent}
+                                       <dl class="plain inlineDataList">
+                                               {content}
+                                               {event name='statistics'}
+                                               
+                                               {if MODULE_LIKE && $user->likesReceived}
+                                                       <dt>{if !$user->isProtected()}<a href="{link controller='User' object=$user}{/link}#likes" class="jsTooltip" title="{lang}wcf.like.showLikesReceived{/lang}">{lang}wcf.like.likesReceived{/lang}</a>{else}{lang}wcf.like.likesReceived{/lang}{/if}</dt>
+                                                       <dd>{#$user->likesReceived}</dd>
+                                               {/if}
+                                               
+                                               {if $user->activityPoints}
+                                                       <dt><a href="#" class="activityPointsDisplay jsTooltip" title="{lang}wcf.user.activityPoint.showActivityPoints{/lang}" data-user-id="{@$user->userID}">{lang}wcf.user.activityPoint{/lang}</a></dt>
+                                                       <dd>{#$user->activityPoints}</dd>
+                                               {/if}
+                                               
+                                               {if $user->profileHits}
+                                                       <dt>{lang}wcf.user.profileHits{/lang}</dt>
+                                                       <dd{if $user->getProfileAge() > 1} title="{lang}wcf.user.profileHits.hitsPerDay{/lang}"{/if}>{#$user->profileHits}</dd>
+                                               {/if}
+                                               {/content}
+                                       </dl>
+                               {/hascontent}
                        </div>
                </div>
        </div>
index 46727f22ace375f0a1e6dbc76309cb247367db27..6dfb6cdad36176792fd4d9149659257de74408ae 100644 (file)
@@ -1,82 +1,70 @@
-.box.userProfileHeader {
+.userProfileHeader.box {
+       margin: 0;
+}
+.userProfileCoverPhoto {
        background-image: url('../images/user-profile-header.jpg'); // todo
        background-size: cover;
-       color: rgba(255, 255, 255, 1);
-       margin: 0;
-       padding: 40px 0;
-       text-shadow: 1px 1px 1px #000;
-       
-       .boxContent {
-               background-color: rgba(0, 0, 0, .4);
-               padding: 20px 0;
-       }
-       
-       .contentHeader {
-               color: rgba(255, 255, 255, 1);
-               margin: 5px 0 10px 0;
-       }
+       height: 200px;
+}
+
+.userProfileUser {
+       background-color: $wcfHeaderBackground;
        
-       .userDetails {
+       > .layoutBoundary {
+               align-items: center;
+               display: flex;
+               padding: 5px 0 10px 160px;
                position: relative;
        }
        
        .userAvatar {
-               > a {
-                       display: block;
-               }
-               
-               img {
-                       box-sizing: content-box;
-                       border: 2px solid $wcfContentBackground;
-               }
-       }
-       
-       a {
-               color: rgba(255, 255, 255, 1);
-               
-               &:hover {
-                       color: rgba(255, 255, 255, 1);
-                       text-decoration: underline;
-               }
+               background-color: $wcfHeaderBackground;
+               border-radius: 50%;
+               left: 0;
+               padding: 10px;
+               position: absolute;
+               top: 50%;
+               transform: translateY(-50%);
        }
        
-       dt {
-               color: rgba(255, 255, 255, 1);
+       .contentHeader {
+               color: $wcfHeaderText;
+               flex: 1 1 auto;
        }
        
-       /* todo */
        .buttonGroupNavigation {
-               position: absolute;
-               right: 0;
-               top: 12px;
+               flex: 0 0 auto;
+               margin-left: 10px;
                
-               .buttonGroup {
-                       > li {
-                               &:not(:last-child) {
-                                       margin-right: 1px;
-                               }
-                               
-                               .button {
-                                       background-color: rgba(255, 255, 255, .4);
-                                       color: rgb(0, 0, 0);
-                                       text-shadow: 1px 1px 1px rgb(255, 255, 255);
-                                       
-                                       .icon {
-                                               color: rgb(0, 0, 0);
-                                               text-shadow: 1px 1px 1px rgb(255, 255, 255);
-                                       }
-                                       
-                                       &:hover,
-                                       &.active {
-                                               background-color: rgba(255, 255, 255, .8);
-                                               text-decoration: none;
-                                       }
-                               }
+               .button {
+                       background-color: $wcfHeaderMenuBackground;
+                       color: $wcfHeaderMenuLink;
+                       
+                       &.active,
+                       &:hover {
+                               background-color: $wcfHeaderMenuBackgroundActive;
+                               color: $wcfHeaderMenuLinkActive;
                        }
                }
        }
 }
 
+.userProfileDetails {
+       background-color: $wcfSidebarBackground;
+       
+       > .layoutBoundary {
+               padding: 10px 0 10px 160px;
+       }
+}
+
+.userProfile .main {
+       padding-top: 0;
+}
+
+.section.userProfileContent {
+       margin-top: 20px;
+}
+
 .userAvatarList {
        display: flex;
        flex-wrap: wrap;
                }
        }
 }
-
-.section.userProfile {
-       margin-top: 0;
-}
\ No newline at end of file