Merge pull request #62 from NumEricR/html

HTML fixes and improvements
This commit is contained in:
David Coallier
2013-05-20 13:28:45 -07:00
4 changed files with 25 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>GitHub R&eacute;sum&eacute;</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

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&amp;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,
@@ -311,8 +320,8 @@ var run = function() {
username: username,
watchers: repo.info.watchers,
forks: repo.info.forks,
watchersLabel: repo.info.watchers > 1 ? 'watchers' : 'watcher',
forksLabel: repo.info.forks > 1 ? 'forks' : 'fork',
watchersLabel: repo.info.watchers == 0 || repo.info.watchers > 1 ? 'watchers' : 'watcher',
forksLabel: repo.info.forks == 0 || repo.info.forks > 1 ? 'forks' : 'fork',
};
if (itemCount == sorted.length - 1 || itemCount == maxItems - 1) {

View File

@@ -1,6 +1,6 @@
<div id="actions" class="yui-t7">
<a href="#" id="print">Print</a>
<a target='none' href="mailto:?subject=Resume for {{name}}&body=Link to resume: {{resume_url}}" id="email">Email</a>
<a href="mailto:?subject=Resume for {{name}}&body=Link to resume: {{resume_url}}" id="email">Email</a>
</div>
<div id="doc2" class="yui-t7">
@@ -10,16 +10,14 @@
<div id="hd">
<div class="yui-gc">
<div class="yui-u first">
<hgroup>
<h1 class="fn">{{name}}</h1>
<h2>{{userStatus}}</h2>
</hgroup>
<h1 class="fn">{{name}}</h1>
<h2>{{userStatus}}</h2>
</div>
<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="" class="photo" />
<img src="https://secure.gravatar.com/avatar/{{gravatar_id}}?s=140&amp;d=https://github.com/images/gravatars/gravatar-140.png" alt="avatar" class="photo" />
{{/gravatar_id}}
{{#email}}<h3><a href="mailto:{{email}}" class="email">{{email}}</a></h3>{{/email}}
</div><!--// .contact-info -->
@@ -41,7 +39,7 @@
{{#location}}
based in <span class="adr locality">{{location}}</span>
{{/location}}
{{#repos}}with <a href="https://github.com/{{{username}}}">{{repos}} public {{reposLabel}}</a>{{/repos}}{{^repos}}without any public repository for now{{/repos}}{{#followers}}&nbsp;and {{followers}} {{followersLabel}}{{/followers}}.
{{#repos}}with <a href="https://github.com/{{{username}}}">{{repos}} public {{reposLabel}}</a>{{/repos}}{{^repos}}without any public repository for now{{/repos}}{{#followers}}&nbsp;and <a href="https://github.com/{{{username}}}/followers">{{followers}} {{followersLabel}}</a>{{/followers}}.
I've been using github.com since {{since}}{{#earlyAdopter}}, therefore I'm an early adopter,{{/earlyAdopter}}
{{#blog}}&nbsp;and sometimes I blog at <a href="{{blog}}" id="myblog" title="my blog">{{blog}}</a>.{{/blog}}
</p>

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="avatar" class="photo"/>
{{/gravatar_id}}
{{#email}}<h3><a href="mailto:{{email}}">{{email}}</a></h3>{{/email}}
</div><!--// .contact-info -->
@@ -31,12 +31,15 @@
</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>.
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}}.
{{#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}}{{#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>
</div>