mirror of
https://github.com/resume/resume.github.com.git
synced 2026-02-17 02:49:13 -06:00
Add "early adopter" mention for user accounts created on first months of Github
This commit is contained in:
@@ -63,8 +63,9 @@ var run = function() {
|
||||
repos = data;
|
||||
});
|
||||
|
||||
var since = new Date(data.user.created_at);
|
||||
since = since.getFullYear();
|
||||
var sinceDate = new Date(data.user.created_at);
|
||||
since = sinceDate.getFullYear();
|
||||
var sinceMonth = sinceDate.getMonth();
|
||||
var currentYear = (new Date).getFullYear();
|
||||
switch (since) {
|
||||
case currentYear-1:
|
||||
@@ -91,6 +92,7 @@ var run = function() {
|
||||
name: name,
|
||||
email: data.user.email,
|
||||
created_at: data.user.created_at,
|
||||
earlyAdopter: 0,
|
||||
location: data.user.location,
|
||||
gravatar_id: data.user.gravatar_id,
|
||||
repos: data.user.public_repo_count,
|
||||
@@ -103,6 +105,11 @@ var run = function() {
|
||||
view.blog = addHttp + data.user.blog;
|
||||
}
|
||||
|
||||
// We consider a limit of 4 months since the Github opening (Feb 2008) to be considered as an early adopter
|
||||
if (since == '2008' && sinceMonth <= 5) {
|
||||
view.earlyAdopter = 1;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'views/resume.html',
|
||||
dataType: 'html',
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
based in {{location}}
|
||||
{{/location}}
|
||||
{{#repos}}with <a href="https://github.com/{{{username}}}">{{repos}} public {{plural}}</a>{{/repos}}{{^repos}}without any public repository for now{{/repos}}.
|
||||
I've been using github.com since {{since}}
|
||||
I've been using github.com since {{since}}{{#earlyAdopter}}, therefore I'm an early adopter,{{/earlyAdopter}}
|
||||
{{#blog}}
|
||||
and sometimes I blog at <a href="" id="myblog" title="my blog">{{blog}}</a>.
|
||||
{{/blog}}
|
||||
|
||||
Reference in New Issue
Block a user