diff --git a/client/app/projectchooser/projectchooser.less b/client/app/projectchooser/projectchooser.less index 459ae5e6..e532ea5f 100644 --- a/client/app/projectchooser/projectchooser.less +++ b/client/app/projectchooser/projectchooser.less @@ -11,5 +11,15 @@ height: auto; width: auto; max-height: 100%; - max-width: 100% + max-width: 100%; + background-color: #eee; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + + button { + margin-bottom: 10px; + } + + } diff --git a/client/app/projects/profile/profile.controller.js b/client/app/projects/profile/profile.controller.js index 54f4ebe4..fab19fb6 100644 --- a/client/app/projects/profile/profile.controller.js +++ b/client/app/projects/profile/profile.controller.js @@ -24,6 +24,9 @@ angular.module('observatory3App') }; updateProject(); + $scope.selectImage = function() { + angular.element('#uploadImage').trigger('click'); + }; $scope.editProject = function() { $scope.editedProject = angular.copy($scope.project); @@ -66,25 +69,37 @@ angular.module('observatory3App') $scope.getPic = function(user) { if (! ('avatar' in user)){ user.avatar = "//www.gravatar.com/avatar/00000000000000000000000000000000?d=monsterid"; - $http.get('/api/users/' + user._id + '/avatar') .success(function(avatar){ + $http.get('/api/users/' + user._id + '/avatar').success(function(avatar){ user.avatar = avatar; - }) + }); + } else { } return user.avatar } var initializeSlides = function(photos) { var slides = []; - for (var i = 0; i < photos.length; i++){ - slides.push({ - id: i, - active: false, - image: $scope.imgPrefix + photos[i], - src: photos[i] - }); - if (i === 0) { - slides[0].active = true; - } + if(photos.length > 0) { + for (var i = 0; i < photos.length; i++){ + slides.push({ + id: i, + active: false, + image: $scope.imgPrefix + photos[i], + src: photos[i] + }); + if (i === 0) { + slides[0].active = true; + } + } + } + else { + slides.push({ + id: 0, + active: true, + placeholder: true, + image: '../../assets/images/projectplaceholder.png', + src: '../../assets/images/projectplaceholder.png' + }); } $scope.slides = slides; } @@ -99,7 +114,7 @@ angular.module('observatory3App') $scope.isLoggedIn = Auth.isLoggedIn; $scope.isAdmin = Auth.isAdmin; - + $scope.isMentor = Auth.isMentor; $scope.joinProject = function(){ $http.put('/api/users/' + $scope.user._id + '/project',{ @@ -212,18 +227,4 @@ angular.module('observatory3App') }; //end tech bubble code - - -}) -.directive('desc', function() { - return { - restrict:'E', - template: '
\ - ' - }; -}).directive('pname', function() { - return { - restrict:'E', - template: '
' - }; -}) +}); diff --git a/client/app/projects/profile/profile.html b/client/app/projects/profile/profile.html index 48347644..c201904c 100644 --- a/client/app/projects/profile/profile.html +++ b/client/app/projects/profile/profile.html @@ -1,104 +1,94 @@
-
-
-
-

{{project.name}}

-

- -

-
- -
- - - - - - - +
+
+
+

{{project.name}}

+
+ +
+ + + + + + + +
+
+
+
+
+
+ + {{tech}} + + + +
- +
-
-
- -
- Upload Images -
- -
-
-
- X -
- -

- No images uploaded yet. -

+
+
+
+
+
+ + + + + - - - - - + + +
- -
-
-
-

Contributors

-
-
-
- - -
- -
-
+
+
+
+

About

+
+
-
-
-
-
-
- -
-
-
-

Tech Tags

-
-
- {{tech}} - -
- - -
+
+
+
+
+
+
+

Contributors

+
+
+
+
+
+
+
diff --git a/client/app/projects/profile/profile.less b/client/app/projects/profile/profile.less index 3e0b8d70..2be884e9 100644 --- a/client/app/projects/profile/profile.less +++ b/client/app/projects/profile/profile.less @@ -1,159 +1,222 @@ -.project-image{ - background-color: #eee; - clear: both; - padding: 20px; - margin-top: 20px; - margin-bottom: 20px; - position: relative; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.contributors{ - background-color: #eee; - margin-top: 20px; - padding: 0 20px 20px 40px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.description{ - background-color: #eee; - padding: 20px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.contributor-name{ - margin-top: 20px; -} - -.header-buttons{ - padding-top: 20px; -} - -.carousel-indicators li { - border: 1px solid #444; -} - -.carousel-indicators { - bottom: -45px; -} - -.carousel-control { - background-image: none !important; /* remove background gradients on controls */ -} - -.carousel-indicators .active { - background-color: #444; -} - -.project-image { - padding-bottom: 50px; -} - -.slide { - height: 350px; - margin: 0 auto; - background-size: contain !important; - background-repeat: no-repeat !important; -} - -//change carousel transition to fade instead of slide -.carousel { - .carousel-inner { - .item { - opacity: 0; - -webkit-transition-property: opacity; - -moz-transition-property: opacity; - -o-transition-property: opacity; - transition-property: opacity; - -webkit-transition-duration: 300ms; - -moz-transition-duration: 300ms; - -o-transition-duration: 300ms; - transition-duration: 300ms; - } - - .active { - opacity: 1; - } - - .active.left, - .active.right { - left: 0; - opacity: 0; - z-index: 1; - } - - .next.left, - .prev.right { - opacity: 1; - } - } - - .carousel-control { - z-index: 2; +.project-profile{ + // h3 { + // margin-top: 0px; + // } + + div[class*="col"] { + padding: 10px; + } + + .row-eq-height { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + } + + figure { + text-align: center; + img { + margin: 0px auto; } -} - -// hide the file upload input -#upload { - position: absolute; - top: 0; - right: 0; - margin: 0; - padding: 0; - font-size: 20px; + } + + .project-image{ + background-color: #eee; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + margin-bottom: 15px; + } + + .contributors{ + padding: 20px; + background-color: #eee; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + } + + .description{ + // position: absolute; + padding-top: 0; + padding-left: 15px; + padding-right: 15px; + padding-bottom: 15px; + text-align: justify; + overflow-y: auto; + word-wrap: break-word; + background-color: #eee; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + } + + .contributor-name{ + margin-top: 20px; + } + + .header-buttons{ + padding-top: 20px; + } + + .carousel-indicators li { + border: 1px solid #444; + } + + .carousel-indicators { + bottom: -45px; + } + + .carousel-control { + background-image: none !important; /* remove background gradients on controls */ + } + + .carousel-indicators .active { + background-color: #444; + } + + .project-image { + padding: 2%; + } + + .slide { + height: 350px; + margin: 0 auto; + background-size: contain !important; + background-repeat: no-repeat !important; + } + + //change carousel transition to fade instead of slide + .carousel { + margin-bottom: 10px; + .carousel-inner { + .item { + opacity: 0; + -webkit-transition-property: opacity; + -moz-transition-property: opacity; + -o-transition-property: opacity; + transition-property: opacity; + -webkit-transition-duration: 300ms; + -moz-transition-duration: 300ms; + -o-transition-duration: 300ms; + transition-duration: 300ms; + } + + .active { + opacity: 1; + } + + .active.left, + .active.right { + left: 0; + opacity: 0; + z-index: 1; + } + + .next.left, + .prev.right { + opacity: 1; + } + } + + .carousel-control { + z-index: 2; + } + } + + .remove-photo { + float: right; + position: relative; + overflow: hidden; + padding: 5px; + } + + .glyphicon-remove { cursor: pointer; - opacity: 0; - filter: alpha(opacity=0); -} - -.fileUpload { - position: relative; - overflow: hidden; - margin-top: -10px; - margin-bottom: 5px; - margin-left: -10px; -} - -.remove-photo { - float: right; - position: relative; - overflow: hidden; - margin-top: -10px; - margin-bottom: 5px; - margin-left: -10px; -} - -desc textarea{ - width:100%; - height:300px; -} - - - -.description-buttons { - margin-top: -10px; - margin-bottom: 8px; - margin-left: -10px; -} - -#nameDiv { - margin-top: 30px -} - -#repos { + } + + desc textarea{ + width:100%; + height:300px; + } + + .description-buttons { + margin-top: -10px; + margin-bottom: 8px; + margin-left: -10px; + } + + #nameDiv { + margin-top: 30px + } + + #repos { + display: block; + } + + .tech-tags { + padding: 10px 10px 10px 10px; + + span { + padding: 10px; + display: inline-block; + background-color: #eee; + margin-right: 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 10px; + } + } + + .tech-boxes { + white-space: nowrap; + overflow-x: auto; + } + + g { + padding: 3px; + } + + input[type="file"] { + display: none; + } + + .image-row{ + padding-top: 10px; + } + + .profile-img{ + display: inline; + } + .user-box{ + overflow:hidden; + word-break: normal; + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + margin-bottom: 10px; + padding-left: 1%; + padding-right: 1%; + } + .user-name{ + height: 2em; + line-height: 1em; + margin-top: 5%; + } + + .user-avatar{ + padding-bottom:100%; + height:0; + position:relative; display: block; -} + line-height: 1.42857143; + transition: all 0.2s ease-in-out; + } + + p{ + margin: 0 0 0px; + } -.tech-tags { - background-color: #eee; - padding: 10px 10px 10px 10px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; } diff --git a/client/app/projects/projects.html b/client/app/projects/projects.html index 9e4e65eb..bce91fcd 100644 --- a/client/app/projects/projects.html +++ b/client/app/projects/projects.html @@ -4,8 +4,6 @@

{{ past ? "Past" : "Active" }} Projects

-
-
@@ -40,9 +38,9 @@

{{ past ? "Past" : "Active" }} Projects

{{ project.name}}

diff --git a/client/app/user/user.html b/client/app/user/user.html index 3b51144e..8e7246e6 100644 --- a/client/app/user/user.html +++ b/client/app/user/user.html @@ -48,7 +48,7 @@

{{ past ? "Past " : "" }}RCOS Developers

-
+
diff --git a/client/assets/images/projectplaceholder.png b/client/assets/images/projectplaceholder.png new file mode 100644 index 00000000..950c8cc0 Binary files /dev/null and b/client/assets/images/projectplaceholder.png differ