organizations

This commit is contained in:
Ado Matejov
2012-09-27 19:19:15 +02:00
parent 786715e62f
commit 3012f7aa1a
2 changed files with 16 additions and 4 deletions
+10 -1
View File
@@ -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,
+6 -3
View File
@@ -13,7 +13,7 @@
<div class="yui-u">
<div class="contact-info">
{{#gravatar_id}}
<img src="https://secure.gravatar.com/avatar/{{gravatar_id}}?s=140&amp;d=https://github.com/images/gravatars/gravatar-140.png" alt=""/>
<img src="{{avatar_url}}" alt="" class="photo"/>
{{/gravatar_id}}
{{#email}}<h3><a href="mailto:{{email}}">{{email}}</a></h3>{{/email}}
</div><!--// .contact-info -->
@@ -31,11 +31,14 @@
</div>
<div class="yui-u">
<p class="enlarge">
We are XX developers gathered in a group
We are a developers gathered in a group
{{#location}}
based in {{location}}
{{/location}}
with <a href="https://github.com/{{{username}}}">{{repos}} public {{reposLabel}}</a>.
{{#repos}}
with <a href="https://github.com/{{{username}}}">{{repos}} public {{reposLabel}}</a>
{{/repos}}
{{#followers}}&nbsp;and <a href="https://github.com/{{{username}}}/followers">{{followers}} {{followersLabel}}</a>{{/followers}}.
We've created this Github group in {{since}}{{#earlyAdopter}}, therefore I'm an early adopter,{{/earlyAdopter}}{{#blog}}&nbsp;and you can find more informations about us at <a href="{{blog}}" id="myblog" title="my blog">{{blog}}</a>{{/blog}}.
</p>
<p id="languages" class="enlarge"></p>