From 2156c308c388b77da4689c6aff4775e188e4f6a0 Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Mon, 24 Sep 2012 19:45:22 +0200 Subject: [PATCH 1/3] Add meteorite to .gitignore --- .meteor/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.meteor/.gitignore b/.meteor/.gitignore index 408303742..08150d000 100644 --- a/.meteor/.gitignore +++ b/.meteor/.gitignore @@ -1 +1,2 @@ local +meteorite From cbf2465124b53039da440ec3cfef5c6c7cf12433 Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Mon, 24 Sep 2012 19:48:32 +0200 Subject: [PATCH 2/3] Check whether mixpanel's defined --- client/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/app.js b/client/app.js index 1aa3ad71a..f5dac43d6 100644 --- a/client/app.js +++ b/client/app.js @@ -219,7 +219,7 @@ getCurrentUserEmail = function(){ trackEvent = function(event, properties){ var properties= (typeof properties === 'undefined') ? {} : properties; - if(mixpanel){ + if(typeof mixpanel != 'undefined'){ mixpanel.track(event, properties); } } From e1e8af929c74e47c04ec91adfc390df8369ba96a Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Mon, 24 Sep 2012 22:27:29 +0200 Subject: [PATCH 3/3] User profile pages --- client/app.js | 7 +++++++ client/css/screen.css | 11 ++++++++++ client/sass/modules/_user-profile.scss | 8 ++++++++ client/sass/screen.scss | 1 + client/templates/comment_item.html | 2 +- client/templates/post_item.html | 2 +- client/templates/user_profile.html | 28 ++++++++++++++++++++++++++ client/templates/user_profile.js | 20 ++++++++++++++++++ 8 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 client/sass/modules/_user-profile.scss create mode 100644 client/templates/user_profile.html create mode 100644 client/templates/user_profile.js diff --git a/client/app.js b/client/app.js index f5dac43d6..11054ce43 100644 --- a/client/app.js +++ b/client/app.js @@ -134,6 +134,7 @@ if (Meteor.is_client) { 'users':'users', 'account':'user_edit', 'forgot_password':'forgot_password', + 'user/:id': 'user_profile', 'users/:id/edit':'user_edit' }, top: function() { this.goto('posts_top'); }, @@ -173,6 +174,12 @@ if (Meteor.is_client) { this.goto('comment_edit'); window.newCommentTimestamp=new Date(); }, + user_profile: function(id){ + if(typeof id !== undefined){ + window.selected_user_id=id; + } + this.goto('user_profile'); + }, user_edit: function(id){ if(typeof id !== undefined){ window.selected_user_id=id; diff --git a/client/css/screen.css b/client/css/screen.css index 8fb60f05f..fd32a5b25 100644 --- a/client/css/screen.css +++ b/client/css/screen.css @@ -1163,6 +1163,17 @@ table tr td { table thead tr td { font-weight: bold; } +/* line 2, ../sass/modules/_user-profile.scss */ +.user-profile .user-avatar { + height: 80px; + width: 80px; + display: block; + -webkit-border-radius: 80px; + -moz-border-radius: 80px; + -ms-border-radius: 80px; + -o-border-radius: 80px; + border-radius: 80px; } + /* line 1, ../sass/modules/_errors.scss */ .error { margin-bottom: 10px; diff --git a/client/sass/modules/_user-profile.scss b/client/sass/modules/_user-profile.scss new file mode 100644 index 000000000..c1850e020 --- /dev/null +++ b/client/sass/modules/_user-profile.scss @@ -0,0 +1,8 @@ +.user-profile { + .user-avatar{ + height:80px; + width:80px; + display:block; + @include border-radius(80px); + } +} \ No newline at end of file diff --git a/client/sass/screen.scss b/client/sass/screen.scss index f4a243a5a..867dd6ed6 100644 --- a/client/sass/screen.scss +++ b/client/sass/screen.scss @@ -25,6 +25,7 @@ @import "modules/dialogs"; @import "modules/settings"; @import "modules/users"; +@import "modules/user-profile"; @import "modules/errors"; @import "partials/mobile"; diff --git a/client/templates/comment_item.html b/client/templates/comment_item.html index 23e9fbf02..846029bfd 100644 --- a/client/templates/comment_item.html +++ b/client/templates/comment_item.html @@ -14,7 +14,7 @@
- {{author}} + {{author}} {{ago}}, {{votes}} points link diff --git a/client/templates/post_item.html b/client/templates/post_item.html index abaf5da00..3db094b5f 100644 --- a/client/templates/post_item.html +++ b/client/templates/post_item.html @@ -36,7 +36,7 @@ {{/if}} {{#if url}}{{domain}}{{/if}} -