UX: Minor profile page restructure

This commit is contained in:
Kris 2019-03-29 12:52:26 -04:00
parent 2c4b3c21a9
commit 814aee343b
4 changed files with 93 additions and 89 deletions

View File

@ -1,8 +1,9 @@
<div class="container {{if viewingSelf 'viewing-self'}}"> <div class="container {{if viewingSelf 'viewing-self'}}">
{{#d-section class="user-main"}} {{#d-section class="user-main"}}
<section class="{{if collapsedInfo 'collapsed-info'}} about {{if hasProfileBackground 'has-background' 'no-background'}}" style={{model.profileBackground}}> <section class="{{if collapsedInfo 'collapsed-info'}} about {{if hasProfileBackground 'has-background' 'no-background'}}" >
{{#unless collapsedInfo}} {{#unless collapsedInfo}}
<div class="user-profile-image" style={{model.profileBackground}}></div>
{{#if showStaffCounters}} {{#if showStaffCounters}}
<div class='staff-counters'> <div class='staff-counters'>
{{#if model.number_of_flags_given}} {{#if model.number_of_flags_given}}
@ -146,9 +147,6 @@
{{plugin-outlet name="user-profile-primary" args=(hash model=model)}} {{plugin-outlet name="user-profile-primary" args=(hash model=model)}}
</div> </div>
</div> </div>
<div style='clear: both'></div>
</div>
{{#unless collapsedInfo}} {{#unless collapsedInfo}}
<div class='secondary'> <div class='secondary'>
<dl> <dl>
@ -201,6 +199,9 @@
{{plugin-outlet name="user-profile-secondary" args=(hash model=model)}} {{plugin-outlet name="user-profile-secondary" args=(hash model=model)}}
</div> </div>
{{/unless}} {{/unless}}
</div>
</section> </section>
<div class='user-content-wrapper'> <div class='user-content-wrapper'>

View File

@ -101,9 +101,9 @@
margin-bottom: 15px; margin-bottom: 15px;
.secondary { .secondary {
background: $secondary; display: inline-block;
width: 100%;
border-top: 1px solid $primary-low; border-top: 1px solid $primary-low;
border-bottom: 1px solid $primary-low;
.btn { .btn {
padding: 4px 12px; padding: 4px 12px;
@ -155,6 +155,7 @@
.details { .details {
background: rgba($secondary, 0.8); background: rgba($secondary, 0.8);
border-bottom: 1px solid $primary-low;
h1 { h1 {
font-size: $font-up-5; font-size: $font-up-5;
@ -196,7 +197,6 @@
.primary { .primary {
width: 100%; width: 100%;
position: relative; position: relative;
float: left;
h1 { h1 {
font-weight: bold; font-weight: bold;

View File

@ -103,9 +103,6 @@
margin-bottom: 50px; margin-bottom: 50px;
.about { .about {
background-position: center center;
background-size: cover;
&.group { &.group {
.details { .details {
padding: 15px 0; padding: 15px 0;
@ -115,12 +112,8 @@
} }
.details { .details {
padding-bottom: s(2);
transition: margin 0.15s linear;
img.avatar { img.avatar {
margin: 0 20px 10px 0; margin: 0 20px 10px 0;
transition: all 0.1s linear;
} }
.primary { .primary {
@ -149,12 +142,23 @@
} }
} }
} }
.secondary {
margin-top: s(4);
}
} }
&.has-background { &.has-background {
.user-profile-image {
height: 300px;
background-size: cover;
background-repeat: no-repeat;
}
.details { .details {
padding: 15px 15px 4px 15px; box-sizing: border-box;
margin-top: 240px; width: 100%;
padding: 15px 0 0 0;
bottom: 0;
} }
} }
@ -169,11 +173,14 @@
} }
&.collapsed-info { &.collapsed-info {
.user-profile-image {
display: none;
}
.controls { .controls {
width: auto; width: auto;
ul { > ul {
li { > li {
display: inline; display: inline;
} }
@ -185,16 +192,11 @@
} }
.details { .details {
padding: 0 0 2px 0; position: relative;
padding: 0;
margin-top: 0; margin-top: 0;
border-bottom: 1px solid $primary-low; border-bottom: 1px solid $primary-low;
} }
&.has-background {
.details {
padding: 12px 15px 2px 15px;
}
}
} }
} }

View File

@ -47,14 +47,13 @@
color: $secondary; color: $secondary;
.secondary { .secondary {
margin-bottom: s(3);
dl { dl {
padding: s(2) 0; padding: s(2) 0;
} }
} }
.details { .details {
background: $secondary; margin-bottom: s(3);
h1 { h1 {
line-height: $line-height-small; line-height: $line-height-small;
@ -131,16 +130,15 @@
} }
&.has-background { &.has-background {
.user-profile-image {
height: 200px;
background-size: contain; background-size: contain;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
}
.user-profile-avatar { .user-profile-avatar {
margin-top: s(-24); margin-top: s(-24);
} }
.details {
margin-top: 200px;
}
} }
.controls { .controls {
@ -163,6 +161,13 @@
a { a {
width: 100%; width: 100%;
} }
.select-kit.dropdown-select-box.user-notifications-dropdown {
width: 100%;
li {
flex: 1 1 100%;
margin-left: 0;
}
}
} }
} }
@ -210,10 +215,6 @@
.user-profile-names { .user-profile-names {
text-align: left; text-align: left;
} }
.controls {
margin: s(2) 0 s(3);
border-bottom: 1px solid $primary-low;
}
} }
.form-horizontal .control-group.category { .form-horizontal .control-group.category {