mirror of
https://github.com/resume/resume.github.com.git
synced 2024-08-17 00:00:28 +03:00
Added the changes from n1k0 and a few other things.
This commit is contained in:
parent
c0d8579df4
commit
6343f91478
@ -42,7 +42,8 @@ strong { font-weight: bold; }
|
||||
li { line-height: 24px; border-bottom: 1px solid #ccc; }
|
||||
p.enlarge { font-size: 144%; padding-right: 6.5em; line-height: 24px; }
|
||||
p.enlarge span { color: #000 }
|
||||
.contact-info { margin-top: 7px; text-align: right; font-size: 12px;}
|
||||
.contact-info { margin-top: 7px; text-align: right; font-size: 12px; position: relative; float: left; width: 100%;}
|
||||
.contact-info a { position :relative; float: left; width: 100%;}
|
||||
.contact-info img {float: right; border: 1px solid #ccc; width: 150px; height: 150px; margin: -24px 0 14px;}
|
||||
.first h2 { font-style: italic; }
|
||||
.last { border-bottom: 0 }
|
||||
@ -59,10 +60,10 @@ a#pdf:hover { background: #222; }
|
||||
.org p, .job p { margin: 0.75em 0 3em 0; }
|
||||
|
||||
.last { border: none; }
|
||||
.skills-list { }
|
||||
.skills-list ul { margin: 0; }
|
||||
.skills-list li { margin: 3px 0; padding: 3px 0; }
|
||||
.skills-list li span { font-size: 152%; display: block; margin-bottom: -2px; padding: 0 }
|
||||
.content-languages { }
|
||||
.content-languages ul { margin: 0; display: inline; float: left; position: relative; width: 30%;}
|
||||
.content-languages li { margin: 3px 0; padding: 3px 0; position: relative; float: left; display-inline; }
|
||||
.content-languages li span { font-size: 152%; display: block; margin-bottom: -2px; padding: 0 }
|
||||
.talent { width: 32%; float: left }
|
||||
.talent h2 { margin-bottom: 6px; }
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
var urlParams = {};
|
||||
var username;
|
||||
var trackerId; // set your google analytics tracker ID here
|
||||
var trackerId = 'UA-21222559-1';
|
||||
|
||||
(function () {
|
||||
var e,
|
||||
@ -56,7 +56,7 @@ var home = function() {
|
||||
var run = function() {
|
||||
|
||||
var gh_user = gh.user(username);
|
||||
var itemCount = 0, maxItems = 5, maxLanguages = 5;
|
||||
var itemCount = 0, maxItems = 5, maxLanguages = 6;
|
||||
|
||||
var res = gh_user.show(function(data) {
|
||||
gh_user.repos(function(data) {
|
||||
@ -135,6 +135,7 @@ var run = function() {
|
||||
|
||||
sorted.sort(sortByPopularity);
|
||||
|
||||
var languageTotal = 0;
|
||||
function sortLanguages(languages, limit) {
|
||||
var sorted_languages = [];
|
||||
for (var lang in languages) {
|
||||
@ -148,6 +149,9 @@ var run = function() {
|
||||
return '<a href="https://github.com/languages/' + this.name + '">' + this.name + '</a>';
|
||||
}
|
||||
});
|
||||
|
||||
languageTotal += languages[lang];
|
||||
|
||||
}
|
||||
if (limit) {
|
||||
sorted_languages = sorted_languages.slice(0, limit);
|
||||
@ -160,9 +164,27 @@ var run = function() {
|
||||
dataType: 'html',
|
||||
success: function(response) {
|
||||
var now = new Date().getFullYear();
|
||||
languages = sortLanguages(languages, maxLanguages);
|
||||
|
||||
if (languages) {
|
||||
$('#languages').html('I mostly program in ' + sortLanguages(languages, maxLanguages).join(', ') + '.');
|
||||
if (languages && languages.length > 0) {
|
||||
var ul = $('<ul class="talent"></ul>');
|
||||
languages.forEach(function(elm, i, arr) {
|
||||
x = i + 1;
|
||||
var percent = parseInt((arr[i].popularity / languageTotal) * 100);
|
||||
var li = $('<li>' + arr[i].toString() + ' ('+percent+'%)</li>');
|
||||
if (x % 3 == 0 || i == languages.length - 1) {
|
||||
li.attr('class', 'last');
|
||||
ul.append(li);
|
||||
$('#content-languages').append(ul);
|
||||
ul = $('<ul class="talent"></ul>');
|
||||
} else {
|
||||
ul.append(li);
|
||||
$('#content-languages').append(ul);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log('no languages');
|
||||
$('#mylanguages').hide();
|
||||
}
|
||||
|
||||
if (sorted.length > 0) {
|
||||
|
@ -44,7 +44,14 @@
|
||||
<p id="languages" class="enlarge"></p>
|
||||
</div>
|
||||
</div><!--// .yui-gf -->
|
||||
|
||||
<div class="yui-gf" id="mylanguages">
|
||||
<div class="yui-u first">
|
||||
<h2>Languages</h2>
|
||||
</div>
|
||||
<div class="yui-u" id="content-languages">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-gf">
|
||||
<div class="yui-u first">
|
||||
<h2>My Popular Repositories</h2>
|
||||
|
Loading…
Reference in New Issue
Block a user