Skip to content

Commit 6a9c7ba

Browse files
committed
2 parents dacde82 + 2c43085 commit 6a9c7ba

File tree

3 files changed

+49
-50
lines changed

3 files changed

+49
-50
lines changed

assets/application.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
(function($){
1+
(function ($) {
22
function addRecentlyUpdatedRepo(repo) {
33
var $item = $("<li>");
4-
4+
55
$item.append('<span class="name"><a href="' + repo.html_url + '">' + repo.name + '</a></span>');
66
$item.append('<span class="time"><a href="' + repo.html_url + '/commits">' + strftime("%h %e, %Y", repo.pushed_at) + '</a></span>');
77
$item.append('<span class="bullet">&sdot;</span>');
@@ -11,7 +11,7 @@
1111

1212
$item.appendTo("#recently-updated-repos");
1313
}
14-
14+
1515
function addProject(project) {
1616
var $project = $("<div />").addClass("project");
1717
$project.addClass(project.language);
@@ -20,13 +20,14 @@
2020
$project.append($("<p />").text(project.description));
2121
$project.appendTo("#projects");
2222
}
23-
23+
2424
$.getJSON("https://api.github.com/users/twitter/repos?callback=?", function (result) {
2525
var repos = result.data;
26-
27-
$(function () {
28-
$("#num-repos").val(repos.length);
2926

27+
$(function () {
28+
$("#num-repos").text(repos.length);
29+
30+
// Convert pushed_at to Date.
3031
$.each(repos, function (i, repo) {
3132
repo.pushed_at = new Date(repo.pushed_at);
3233
});
@@ -37,20 +38,23 @@
3738
if (b.pushed_at < a.pushed_at) return -1;
3839
return 0;
3940
});
40-
41+
4142
$.each(repos, function(i, repo){
4243
addProject(repo);
4344
});
4445

4546
$.each(repos.slice(0, 3), function (i, repo) {
4647
addRecentlyUpdatedRepo(repo);
47-
});
48+
});
4849
});
4950
});
50-
51-
$.getJSON("https://api.github.com/orgs/twitter/members?callback=?", function (members) {
51+
52+
$.getJSON("https://api.github.com/orgs/twitter/members?callback=?", function (result) {
53+
var members = result.data;
54+
5255
$(function () {
53-
$("#num-members").val(members.length);
56+
$("#num-members").text(members.length);
5457
});
5558
});
56-
})(jQuery);
59+
60+
})(jQuery);

assets/style.css

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ h1 {
1515
}
1616

1717
a:link, a:visited {
18-
color: #2984b4;
18+
color: #0084b4;
1919
text-decoration: none;
2020
}
2121

@@ -37,11 +37,9 @@ a:hover {
3737
#main, div.header, div.project {
3838
background: white;
3939
background: rgba(255, 255, 255, 0.7);
40-
/*
41-
-moz-box-shadow: 0px 0px 5px 0px #ccc;
42-
-webkit-box-shadow: 0px 0px 5px 0px #ccc;
43-
box-shadow: 0px 0px 5px 0px #ccc;
44-
*/
40+
-moz-box-shadow: 0px 0px 5px 0px #eee;
41+
-webkit-box-shadow: 0px 0px 5px 0px #eee;
42+
box-shadow: 0px 0px 5px 0px #eee;
4543
}
4644

4745
#main h1 {
@@ -70,23 +68,30 @@ a:hover {
7068
margin: 0;
7169
}
7270

73-
#statistics input {
74-
border: none;
75-
width: 33px;
76-
display: inline-block;
77-
font-weight: bold;
78-
font-size: 20px;
79-
color: #2984b4;
71+
div.header {
72+
height: 130px;
8073
}
8174

82-
#statistics label {
83-
font-size: 20px;
75+
div.header h1, div.header p {
76+
margin: 10px 15px 0;
8477
}
8578

86-
#recently-updated h1 {
79+
div.header h1 {
8780
margin-bottom: 10px;
8881
}
8982

83+
#num-repos, #num-members {
84+
font-size: 14px;
85+
font-weight: bold;
86+
color: #0084b4;
87+
line-height: 15px;
88+
}
89+
90+
#statistics p.email {
91+
margin-top: 6px;
92+
font-size: 11px;
93+
}
94+
9095
#recently-updated h1 a {
9196
font-weight: normal;
9297
font-size: 11px;
@@ -120,14 +125,6 @@ a:hover {
120125
color: #666;
121126
}
122127

123-
div.header {
124-
height: 130px;
125-
}
126-
127-
div.header h1, div.header p {
128-
margin: 10px 15px 0;
129-
}
130-
131128
div.project {
132129
height: 250px;
133130
}

index.html

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,32 @@
1212
</head>
1313
<body>
1414
<div id="wrapper" class="grid clearfix">
15-
15+
1616
<div id="main" class="grid-1">
1717
<div id="logo"><h1>Twitter Open Source</h1></div>
1818
<h1>Twitter is built on open source software.</h1>
19-
<p>Want to help? <a href="#">Join the Flock</a></p>
20-
<p>Visit <a href="#">dev.twitter.com</a></p>
21-
<p><a href="#">Logos and other goodies</a></p>
19+
<p>Want to help? <a href="https://twitter.com/jobs">Join the Flock</a></p>
20+
<p>Visit <a href="https://dev.twitter.com/">dev.twitter.com</a></p>
21+
<p><a href="https://twitter.com/about/resources">Logos and other goodies</a></p>
2222
</div>
23-
23+
2424
<div class="grid grid-3">
2525
<div id="statistics" class="grid-1 alpha header">
2626
<h1>Statistics</h1>
2727
<p>
28-
<input type="text" id="num-repos" disabled="disabled">
29-
<label for="num-repos">public repos</label>
28+
<span id="num-repos">&nbsp;</span> public repos
3029
<br>
31-
<input type="text" id="num-members" disabled="disabled">
32-
<label for="num-members">members</label>
30+
<span id="num-members">&nbsp;</span> members
3331
</p>
34-
<p><a href="mailto:[email protected]">[email protected]</a></p>
32+
<p class="email"><a href="mailto:[email protected]">[email protected]</a></p>
3533
</div>
36-
34+
3735
<div id="recently-updated" class="grid-2 omega header">
38-
<h1>Recently updated <a href="#">View All on GitHub</a></h1>
36+
<h1>Recently updated <a href="https://github.com/twitter/repositories">View All on GitHub</a></h1>
3937
<ol id="recently-updated-repos"></ol>
4038
</div>
4139
</div>
42-
40+
4341
<div id="projects"></div>
4442
</div>
4543
</body>

0 commit comments

Comments
 (0)