project structure update for more accurate import

This commit is contained in:
nixa 2016-05-04 11:49:36 +03:00
parent 36288562e6
commit 945cdb7e4f
43 changed files with 47 additions and 42 deletions

View file

@ -0,0 +1 @@
export * from './msgCenter.component.ts';

View file

@ -0,0 +1,88 @@
import {Component} from 'angular2/core';
import {ProfilePicturePipe} from '../../pipes';
@Component({
selector: 'msg-center',
styles: [require('./msgCenter.scss')],
template: require('./msgCenter.html'),
pipes: [ProfilePicturePipe]
})
export class MsgCenter {
notifications = [
{
name: 'Vlad',
text: 'Vlad posted a new article.',
time: '1 min ago'
},
{
name: 'Kostya',
text: 'Kostya changed his contact information.',
time: '2 hrs ago'
},
{
image: 'assets/img/shopping-cart.svg',
text: 'New orders received.',
time: '5 hrs ago'
},
{
name: 'Andrey',
text: 'Andrey replied to your comment.',
time: '1 day ago'
},
{
name: 'Nasta',
text: 'Today is Nasta\'s birthday.',
time: '2 days ago'
},
{
image: 'assets/img/comments.svg',
text: 'New comments on your post.',
time: '3 days ago'
},
{
name: 'Kostya',
text: 'Kostya invited you to join the event.',
time: '1 week ago'
}
];
messages = [
{
name: 'Nasta',
text: 'After you get up and running, you can place Font Awesome icons just about...',
time: '1 min ago'
},
{
name: 'Vlad',
text: 'You asked, Font Awesome delivers with 40 shiny new icons in version 4.2.',
time: '2 hrs ago'
},
{
name: 'Kostya',
text: 'Want to request new icons? Here\'s how. Need vectors or want to use on the...',
time: '10 hrs ago'
},
{
name: 'Andrey',
text: 'Explore your passions and discover new ones by getting involved. Stretch your...',
time: '1 day ago'
},
{
name: 'Nasta',
text: 'Get to know who we are - from the inside out. From our history and culture, to the...',
time: '1 day ago'
},
{
name: 'Kostya',
text: 'Need some support to reach your goals? Apply for scholarships across a variety of...',
time: '2 days ago'
},
{
name: 'Vlad',
text: 'Wrap the dropdown\'s trigger and the dropdown menu within .dropdown, or...',
time: '1 week ago'
}
];
}

View file

@ -0,0 +1,55 @@
<ul class="al-msg-center clearfix">
<li class="dropdown">
<a href class="dropdown-toggle" id="msg-dd1" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-bell-o"></i><span>5</span>
<div class="notification-ring"></div>
</a>
<div class="top-dropdown-menu dropdown-menu" aria-labelledby="msg-dd1">
<i class="dropdown-arr"></i>
<div class="header clearfix">
<strong>Notifications</strong>
<a href>Mark All as Read</a>
<a href>Settings</a>
</div>
<div class="msg-list">
<a *ngFor="#msg of notifications" href class="clearfix">
<div class="img-area"><img [ngClass]="{'photo-msg-item': !msg.image}"
src="{{ ( msg.image || (msg.name | profilePicture)) }}"></div>
<div class="msg-area">
<div>{{ msg.text }}</div>
<span>{{ msg.time }}</span>
</div>
</a>
</div>
<a href>See all notifications</a>
</div>
</li>
<li class="dropdown">
<a href class="msg dropdown-toggle" id="msg-dd2" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-envelope-o"></i><span>5</span>
<div class="notification-ring"></div>
</a>
<div class="top-dropdown-menu dropdown-menu" aria-labelledby="msg-dd2">
<i class="dropdown-arr"></i>
<div class="header clearfix">
<strong>Messages</strong>
<a href>Mark All as Read</a>
<a href>Settings</a>
</div>
<div class="msg-list">
<a *ngFor="#msg of messages" href class="clearfix">
<div class="img-area"><img [ngClass]="{'photo-msg-item': !msg.image}"
src="{{ ( msg.image || (msg.name | profilePicture)) }}"></div>
<div class="msg-area">
<div>{{ msg.text }}</div>
<span>{{ msg.time }}</span>
</div>
</a>
</div>
<a href>See all messages</a>
</div>
</li>
</ul>

View file

@ -0,0 +1,263 @@
@import '../../sass/conf/conf';
/* msg center */
@-webkit-keyframes pulsate {
30% {
-webkit-transform: scale(0.1, 0.1);
opacity: 0.0;
}
35% {
opacity: 1.0;
}
40% {
-webkit-transform: scale(1.2, 1.2);
opacity: 0.0;
}
}
.al-msg-center {
float: right;
padding: 0;
list-style: none;
margin: 13px 47px 0 0;
li {
list-style: none;
float: left;
margin-left: 30px;
&:first-child {
margin-left: 0;
}
& > a {
color: #ffffff;
text-decoration: none;
font-size: 13px;
position: relative;
span {
display: inline-block;
min-width: 10px;
padding: 2px 4px 2px 4px;
color: #ffffff;
vertical-align: baseline;
white-space: nowrap;
text-align: center;
border-radius: 13px;
text-shadow: none;
line-height: 11px;
background-color: $danger;
position: absolute;
top: -5px;
right: -14px;
font-size: 11px;
}
.notification-ring {
border: 1px solid $danger;
border-radius: 100px;
height: 40px;
width: 40px;
position: absolute;
top: -18px;
right: -27px;
animation: pulsate 8s ease-out;
animation-iteration-count: infinite;
opacity: 0.0
}
&:hover {
color: $danger;
&.msg {
color: $primary;
}
}
&.msg {
span {
background-color: $primary;
}
.notification-ring {
border-color: $primary;
}
}
}
&.open {
& > a {
color: $danger;
&.msg {
color: $primary;
}
}
}
}
}
@media (max-width: $resXXS) {
.al-msg-center {
margin-right: 20px;
li {
margin-left: 20px;
&:first-child {
margin-left: 0;
}
}
}
}
.msg-block-header {
display: inline-block;
padding: 0;
font-size: 13px;
margin: 0 0 0 6px;
}
.top-dropdown-menu {
width: 316px;
left: auto;
right: -47px;
top: 26px;
@include scrollbars(.4em, rgba(0, 0, 0, 0.5), #fff);
.header {
padding: 10px 12px;
border-bottom: 1px solid $border-light;
font-size: 12px;
strong {
float: left;
}
& > a {
float: right;
margin-left: 12px;
text-decoration: none;
&:hover {
color: $default-text;
}
}
}
.msg-list {
max-height: 296px;
overflow: scroll;
overflow-x: hidden;
& > a {
border-top: 1px solid $border-light;
padding: 10px 12px;
display: block;
text-decoration: none;
color: $default-text;
font-size: 12px;
&:first-child {
border-top: none;
}
.img-area {
float: left;
width: 36px;
img {
width: 36px;
height: 36px;
&.photo-msg-item {
border-radius: 18px;
}
}
& > div {
width: 36px;
height: 36px;
border-radius: 4px;
font-size: 24px;
text-align: center;
&.comments {
color: $warning;
}
&.orders {
color: $warning;
}
i {
width: 36px;
line-height: 36px;
}
}
}
.msg-area {
float: right;
width: 230px;
div {
max-height: 34px;
overflow: hidden;
text-overflow: ellipsis;
}
span {
font-style: italic;
text-align: right;
display: block;
font-size: 11px;
}
}
&:hover {
background: #E2F0FF;
}
}
}
& > a {
border-top: 1px solid $border-light;
display: block;
text-align: center;
padding: 10px;
font-size: 12px;
text-decoration: none;
&:hover {
color: $default-text;
}
}
&.profile-dropdown {
width: 145px;
top: 55px;
right: -25px;
a {
text-align: left;
border: none;
text-decoration: none;
color: $default-text;
padding: 4px 16px 4px 20px;
&.signout {
border-top: 1px solid $border-light;
}
i {
margin-right: 10px;
}
&:hover {
background: #f4fcff;
}
}
i.dropdown-arr {
right: 25px;
}
}
i.dropdown-arr {
position: absolute;
top: -22px;
right: 42px;
display: block;
width: 0;
height: 0;
border: 11px solid transparent;
border-bottom-color: rgba(0, 0, 0, .15);
&:after {
top: -9px;
left: 0px;
margin-left: -10px;
content: " ";
position: absolute;
display: block;
width: 0;
height: 0;
border: 10px solid transparent;
border-bottom-color: #ffffff;
}
}
}
@media (max-width: 415px) {
.top-dropdown-menu {
right: -81px;
i.dropdown-arr {
right: 75px;
}
}
}