From 786715e62f7e355bf8a496a37cb73cd1072aaf1a Mon Sep 17 00:00:00 2001
From: Ado Matejov
Date: Thu, 27 Sep 2012 17:39:46 +0200
Subject: [PATCH 1/2] href to user's followers
---
views/resume.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/resume.html b/views/resume.html
index 2161ef9..e86b187 100644
--- a/views/resume.html
+++ b/views/resume.html
@@ -41,7 +41,7 @@
{{#location}}
based in {{location}}
{{/location}}
- {{#repos}}with {{repos}} public {{reposLabel}}{{/repos}}{{^repos}}without any public repository for now{{/repos}}{{#followers}} and {{followers}} {{followersLabel}}{{/followers}}.
+ {{#repos}}with {{repos}} public {{reposLabel}}{{/repos}}{{^repos}}without any public repository for now{{/repos}}{{#followers}} and {{followers}} {{followersLabel}} {{/followers}}.
I've been using github.com since {{since}}{{#earlyAdopter}}, therefore I'm an early adopter,{{/earlyAdopter}}
{{#blog}} and sometimes I blog at {{blog}}.{{/blog}}
From 3012f7aa1a8eabf2156395c7f00a14fe6b1a516c Mon Sep 17 00:00:00 2001
From: Ado Matejov
Date: Thu, 27 Sep 2012 19:19:15 +0200
Subject: [PATCH 2/2] organizations
---
js/githubresume.js | 11 ++++++++++-
views/resumeOrgs.html | 9 ++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/js/githubresume.js b/js/githubresume.js
index d5dec89..52689a9 100644
--- a/js/githubresume.js
+++ b/js/githubresume.js
@@ -110,13 +110,21 @@ var run = function() {
name = data.name;
}
+ var avatar = '';
+ if (data.type == 'Organization'){
+ avatar = data.avatar_url.match(/https:\/\/secure.gravatar.com\/avatar\/[0-9a-z]+/)[0];
+ avatar += '?s=140&d=https://github.com/images/gravatars/gravatar-140.png';
+ }
+
var view = {
name: name,
+ type: data.type,
email: data.email,
created_at: data.created_at,
earlyAdopter: 0,
location: data.location,
gravatar_id: data.gravatar_id,
+ avatar_url: avatar,
repos: data.public_repos,
reposLabel: data.public_repos > 1 ? 'repositories' : 'repository',
followers: data.followers,
@@ -184,8 +192,9 @@ var run = function() {
view.blog = addHttp + data.blog;
}
+ var resume = (data.type == 'User' ? 'views/resume.html' : 'views/resumeOrgs.html');
$.ajax({
- url: 'views/resume.html',
+ url: resume,
dataType: 'html',
success: function(data) {
var template = data,
diff --git a/views/resumeOrgs.html b/views/resumeOrgs.html
index 039d805..26ecfe4 100644
--- a/views/resumeOrgs.html
+++ b/views/resumeOrgs.html
@@ -13,7 +13,7 @@