buddy list modify

This commit is contained in:
khk 2019-10-10 15:37:18 +09:00
parent 150ebd56af
commit b59e67ed42
3 changed files with 97 additions and 53 deletions

View File

@ -1,10 +1,12 @@
@charset 'utf-8'; @charset 'utf-8';
$listH-row3: 90px; $listH-row3: 90px;
$listH-row2: 60px;
$checkbox-size: 16px; $checkbox-size: 16px;
$presence-size: 10px; $presence-size: 10px;
$thumbnail-msize: 50px !global; $thumbnail-msize: 40px;
$bg-list-hover: #efefef !global; $bg-list-hover: #efefef;
$bg-list-item-msg: #f0f4f6;
@mixin ellipsis($row) { @mixin ellipsis($row) {
overflow: hidden; overflow: hidden;
@ -28,9 +30,6 @@ $bg-list-hover: #efefef !global;
@mixin visible($sh) { @mixin visible($sh) {
display: $sh; display: $sh;
} }
@function position-m($h, $o, $p) {
@return ($h - $o - $p) / 2;
}
@mixin presence-status($status) { @mixin presence-status($status) {
@if $status == pcOn { @if $status == pcOn {
background-color: #28ad66; background-color: #28ad66;
@ -42,3 +41,6 @@ $bg-list-hover: #efefef !global;
background-color: #f0c10a; background-color: #f0c10a;
} }
} }
@function position-m($h, $o, $p) {
@return ($h - $o - $p) / 2;
}

View File

@ -1,20 +1,29 @@
<!--체크박스 보여줄때는 <div class="list-item checkbox" matRipple> 클래스에 checkbox만 추가--> <!--체크박스 보여줄때는 <div class="list-item checkbox" matRipple> 클래스에 checkbox만 추가-->
<div class="list-item checkbox" matRipple> <div class="list-item" matRipple>
<!--presence-pcOn , presence-pcOut presence-pcOff , presence-pcOther--> <!--pcOn , pcOut pcOff , pcOther-->
<span class="presence-pcOn" *ngIf="presence">{{ presence.pcStatus }} </span> <span class="presence pcOn" *ngIf="presence">{{ presence.pcStatus }} </span>
<div class="item-default"> <dl class="item-default">
<img <dt>
class="thumbnail" <img
src="{{ profileImageRoot + userInfo.profileImageFile }}" class="thumbnail"
/> src="{{ profileImageRoot + userInfo.profileImageFile }}"
<ul class="info"> />
<li class="name">{{ userInfo.name }} {{ userInfo.grade }}</li> </dt>
<li class="dept"> <dd class="info">
{{ userInfo.deptName }} <div class="detail">
가나다라마바사아자차카파하가나다라마바사아자차카파하하가나다 <span class="name">
</li> <b>{{ userInfo.name }}</b>
<li class="record">{{ userInfo.intro }}</li> {{ userInfo.grade }}
</ul> </span>
</div> <span class="dept">
{{ userInfo.deptName }}
가나다라마바사아자차카파하가나다라마바사아자차카파하하가나다
</span>
</div>
<div class="msg-status">
{{ userInfo.intro }}상태메시지 상태메시지 상태메시지
</div>
</dd>
</dl>
<mat-checkbox *ngIf="checkable"></mat-checkbox> <mat-checkbox *ngIf="checkable"></mat-checkbox>
</div> </div>

View File

@ -6,21 +6,31 @@
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
height: $listH-row3; height: $listH-row2;
border-bottom: 1px solid #dddddd; border-bottom: 1px solid #dddddd;
padding: 14px; padding: 0 10px;
} }
%presence { %presence {
display: inline-block; display: inline-block;
width: $presence-size; width: $presence-size;
height: $presence-size; height: $presence-size;
vertical-align: middle; //margin-top: position-m($listH-row2, $presence-size, 0);
margin-top: position-m($thumbnail-msize, $presence-size, 0) * -1; align-items: center;
text-indent: -10000000px; text-indent: -10000000px;
margin-right: 10px; margin-right: 8px;
border-radius: 100px; border-radius: 100px;
} }
%msg-status {
display: inline-block;
height: 40px;
background-color: $bg-list-item-msg;
font-size: 11px;
padding: 2px 6px;
vertical-align: middle;
align-items: center;
@include ellipsis(20);
@include border-radius(4px);
}
.list-item { .list-item {
@extend %list-item; @extend %list-item;
@ -28,20 +38,17 @@
background-color: $bg-list-hover; background-color: $bg-list-hover;
} }
.presence { .presence {
&-pcOn { @extend %presence;
@extend %presence; &.pcOn {
@include presence-status(pcOn); @include presence-status(pcOn);
} }
&-pcOut { &.pcOut {
@extend %presence;
@include presence-status(pcOut); @include presence-status(pcOut);
} }
&-pcOff { &.pcOff {
@extend %presence;
@include presence-status(pcOff); @include presence-status(pcOff);
} }
&-pcOther { &.pcOther {
@extend %presence;
@include presence-status(pcOther); @include presence-status(pcOther);
} }
} }
@ -60,39 +67,65 @@
@include border-radius(100px); @include border-radius(100px);
} }
.info { .info {
position: relative;
display: inline-block; display: inline-block;
margin: 0; margin: 0;
padding: 0; padding: 0;
width: calc(100% - 62px); width: calc(100% - 50px);
li { .detail {
margin-bottom: 4px; display: inline-block;
@include ellipsis(1); float: left;
&.name { .name {
display: block; font-size: 14px;
font-size: 15px; margin-bottom: 2px;
font-weight: bold; @include ellipsis(1);
b {
font-weight: bold;
}
}
.dept {
font-size: 12px;
@include ellipsis(1); @include ellipsis(1);
} }
&.dept { }
display: block; .msg-status {
font-size: 13px; display: inline-block;
} float: right;
&.record { @extend %msg-status;
//@include visible(none);
}
} }
} }
} }
//가변에 따른 list-item width값 변경
.list-item { .list-item {
span[class*='presence'] { .item-default {
.detail {
width: 60%;
}
.msg-status {
width: 38%;
}
}
.presence {
+ .item-default { + .item-default {
width: calc(100% - 20px); width: calc(100% - 20px);
} }
} }
&.checkbox { &.checkbox {
.presence {
+ .item-default {
width: calc(100% - 50px);
}
}
.item-default { .item-default {
width: calc(100% - 30px); width: calc(100% - 30px);
.info {
.detail {
width: 100%;
}
.msg-status {
@include visible(none);
}
}
} }
} }
} }