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

housekeeping activity #102

Merged
merged 3 commits into from
Mar 7, 2016
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
10 changes: 8 additions & 2 deletions models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ userSchema.pre('save', function(callback) {
});*/
});

userSchema.post('init', function(doc) {
if(doc.avatar === undefined){
doc.avatar = "/public/assets/g/imgs/avatar.jpg";
}
});

userSchema.post('find', function(result) {
//console.log(this instanceof mongoose.Query); // true
// prints returned documents
Expand All @@ -120,13 +126,13 @@ function genToken() {
var token = jwt.encode({
exp: expires
}, config.get('auth.secret'));

return {
token: token,
dateCreated: new Date()
};
}

function expiresIn(numDays) {
var dateObj = new Date();
return dateObj.setDate(dateObj.getDate() + numDays);
Expand Down
File renamed without changes
197 changes: 87 additions & 110 deletions public/assets/styles/custom-main.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
html,body {
position: relative;
min-height: 100%;
width:100%;
width:100%;
height:100%;
}




body {
/* Margin bottom by footer height */
/* margin-bottom: 60px; */
Expand All @@ -16,6 +13,7 @@ body {
padding-top: 50px;
padding-bottom: 10px;
}

.footer {
position: fixed;
bottom: 0;
Expand All @@ -26,112 +24,12 @@ body {
z-index: 10000000;

}

.footer{
padding-right: 35px;
padding-left: 25px;
padding-top: 10px;
}
/* Nav bar customizations */
wrapper {

}
.push {
height: 30px;
}
.menu {
list-style: none;
border-bottom: 0.1em solid black;
margin-bottom: 2em;
padding: 0 0 2.5em;
}

.menu:before {
content: "[";
}

.menu:after {
content: "]";
}

.menu > li {
display: inline;
}

.menu > li:before {
content: "|";
padding-right: 0.8em;
}

.menu > li:nth-child(1):before {
content: "";
padding: 0;
}

.navbar-default .navbar-brand {
color: #fff;
}
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
color: #5E5E5E;
}
/* link */
.navbar-default .navbar-nav > li > a {
color: #fff;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
color: #333;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #555;
background-color: #EBF0FA;
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
color: #555;
background-color: #D5D5D5;
}
/* caret */
.navbar-default .navbar-nav > .dropdown > a .caret {
border-top-color: #fff;
border-bottom-color: #fff;
}
.navbar-default .navbar-nav > .dropdown > a:hover .caret,
.navbar-default .navbar-nav > .dropdown > a:focus .caret {
border-top-color: #333;
border-bottom-color: #333;
}
.navbar-default .navbar-nav > .open > a .caret,
.navbar-default .navbar-nav > .open > a:hover .caret,
.navbar-default .navbar-nav > .open > a:focus .caret {
border-top-color: #555;
border-bottom-color: #555;
}
/* mobile version */
.navbar-default .navbar-toggle {
border-color: #DDD;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
background-color: #DDD;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #CCC;
}
@media (max-width: 767px) {
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #fff;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
color: #333;
}
}



.growl-container.growl-fixed {
position: absolute;
Expand All @@ -150,28 +48,94 @@ height: 30px;
padding-right: 30px;
padding-left: 15px;
z-index: 10000000;


}

.navbar-custom .navbar-nav > li > a {
color:silver;
}

.navbar-custom .navbar-nav > .active > a, .navbar-nav > .active > a:hover, .navbar-nav > .active > a:focus {
color: #ffffff;
background-color:transparent;
color: black;
background-color:#ebebfa;
border-bottom: 3px solid red;
}

.navbar-custom .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
color: black;
background-color:#ebebfa;
border-bottom: 3px solid red;
}

.dropdown-menu{
background-color:#f0f0f5;
}

.navbar-custom .navbar-brand {
color:#eeeeee;
}

/* styles to change hamburger menu icon */
.navbar-toggle .icon-bar:nth-of-type(2) {
top: 1px;
}

.navbar-toggle .icon-bar:nth-of-type(3) {
top: 2px;
}

.navbar-toggle .icon-bar {
position: relative;
transition: all 500ms ease-in-out;
background-color: #fff;
}

.navbar-toggle.active .icon-bar:nth-of-type(1) {
top: 6px;
transform: rotate(45deg);
}

.navbar-toggle.active .icon-bar:nth-of-type(2) {
background-color: transparent;
}

.navbar-toggle.active .icon-bar:nth-of-type(3) {
top: -6px;
transform: rotate(-45deg);
}

/* style for left pull menu */
@media screen and (max-width: 768px) {
.side-collapse-container{
width:100%;
position:relative;
left:0;
transition:left .4s;
}
.side-collapse-container.out{
left:200px;
}
.side-collapse {
top:50px;
background-color:#ebebfa;
bottom:0;
left:0;
width:200px;
position:fixed;
overflow:hidden;
transition:width .4s;
}
.side-collapse.in {
width:0;
}
}

/* Text styles */

.text-highlight{
font-size: 16px;
font-weight: bold !important;
color:black;
text-transform: capitalize;
}

.text-big{
Expand Down Expand Up @@ -232,7 +196,7 @@ height: 30px;
.callouts--left:before {
position: absolute;
top: -7px;
left: 9px;
left: 9px;
display: inline-block;
border-left: 7px solid transparent;
border-bottom: 7px solid #ccc;
Expand All @@ -252,4 +216,17 @@ height: 30px;
content: '';
}

.profile-details {
width: 160px;
height: 90px;
display: inline-block;
vertical-align: top; /* here */
}

.change-icon > .fa + .fa,
.change-icon:hover > .fa {
display: none;
}
.change-icon:hover > .fa + .fa {
display: inherit;
}
21 changes: 16 additions & 5 deletions public/assets/styles/profile-pic.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/* CSS used here will be applied after bootstrap.css */
body {
background-color: #eaeaea;
}

img.avatar,
div.avatar {
border: 1px solid #eee;
Expand Down Expand Up @@ -30,10 +26,25 @@ div.avatar {
cursor: inherit;
display: block;
}

.cropArea {
background: #E4E4E4;
background-image: url("/public/assets/images/draganddrop.png");
overflow: hidden;
width:732px;
height:405px;
}
}

@media only screen and (min-width: 768px) {
.cropArea {
width:732px;
height:405px;
}
}

@media only screen and (max-width: 768px) {
.cropArea {
width:350px;
height:200px;
}
}
Loading