Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DE3280 - Header Profile Picture #95

Merged
merged 2 commits into from
Apr 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions assets/stylesheets/components/_images.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@
svg use {
fill: currentColor;
}

@for $i from 1 through 12 {
.img-size-#{$i} {
$dimensions: 16px;

height: $dimensions * $i;
width: $dimensions * $i;
}
}
39 changes: 30 additions & 9 deletions assets/stylesheets/layouts/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: inline-block;
margin-top: 1.125rem;
svg {
color: $cr-black;
color: $cr-gray-light;
}
&:hover {
cursor: pointer;
Expand Down Expand Up @@ -124,16 +124,10 @@
ul {
padding: .3125rem 0;
}
.nav-profile-image {
display: inline-block;
.img-size-2_25 {
@include size(2.25rem, 2.25rem);
overflow: hidden;
margin: .25rem;
background-color: #f5f5f5;
border: 2px solid $cr-gray-lighter;
img {
@include size(100%, 100%);
}
color: $cr-gray-lighter;
}
}

Expand Down Expand Up @@ -202,3 +196,30 @@
}
}
}

.header .profile-picture {
position: relative;

.img-circle {
position: absolute;
top: 0;
left: 0;
@include size(100%, 100%)
border-style: solid;
border-width: 2px;
}
}

.header .profile-picture-default {
background-image: url('//crossroads-media.imgix.net/images/avatar.svg');
background-position: center;
background-size: cover;
}

.header .profile-picture-overlay {
background-position: center;
background-size: cover;
position: absolute;
top: 0;
right: 0;
}
3 changes: 3 additions & 0 deletions assets/stylesheets/utilities/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ a[ng-click] {
.push {
margin: $line-height-computed;
}
.push-center {
margin: 0 auto;
}
.push-half {
margin: $line-height-computed / 2;
}
Expand Down