xonecas.io
1361
Xc

xonecas.com / commit c0bdb3f

added more.. flare

Sean Caetano Martin2012-02-09 c0bdb3f0ed8cacf3f500278ce5811e6bf778a43f parent 6811fee

4 files changed

htdocs/css/style.css+22−11
@@ -158,26 +158,37 @@
158158 /* my styles */
159159 html, body {
160160 min-height: 100%;
161- font-family: Helvetica, "Helvetica Neue", Arial, "DejaVu Sans", sans-serif;
162-}
163-
164-pre {
165- font-size: smaller;
166- padding: 4px;
167- border-left: 5px solid #eff6ff;
161+ font-family: "Anonymous Pro", monospace;
162+ font-weight: 400;
163+ color: #ccc;
164+}
165+body {
166+ position: relative;
167+ margin: 0 40px 40px;;
168+ -webkit-transform: rotate(-2.5deg); /* Saf3.1+, Chrome */
169+ -moz-transform: rotate(-2.5deg); /* FF3.5+ */
170+ -ms-transform: rotate(-2.5deg); /* IE9 */
171+ -o-transform: rotate(-2.5deg); /* Opera 10.5 */
172+ transform: rotate(-2.5deg);
173+ filter: progid:DXImageTransform.Microsoft.Matrix(/* IE6–IE9 */
174+ M11=0.9990482215818578, M12=0.043619387365336, M21=-0.043619387365336, M22=0.9990482215818578, sizingMethod='auto expand');
175+ zoom: 1;
168176 }
169177
170178 a {
171- color: #91ceed;
179+ color: #FF5700;
172180 text-decoration: none;
173181 }
174182 a:active, a:visited {
175- color: #6caee8;
183+ color: #BBFF0D;
176184 }
177185 a:hover {
178186 color: #2072d6;
179187 }
180188
181-.container {
182- padding: 40px;
189+pre {
190+ padding: 5px;
191+ background-color: #222;
192+ border-left: 5px solid #91ceed;
183193 }
194+
htdocs/index.html+11−0
@@ -6,6 +6,7 @@
66 <title>Sean Caetano Martin -- @xonecas</title>
77 <meta name="viewport" content="width=device-width,initial-scale=1">
88
9+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Anonymous+Pro:400,700,400italic,700italic">
910 <link rel="stylesheet" href="css/normalize.css">
1011 <link rel="stylesheet" href="css/style.css">
1112 </head>
@@ -18,6 +19,7 @@
1819
1920 <!-- my modules -->
2021 <script src="js/tumblr-api.js"></script>
22+ <script src="js/github.js"></script>
2123 <script src="js/view.js"></script>
2224
2325 <!-- startup -->
@@ -35,6 +37,15 @@
3537 </ul>
3638 </script>
3739
40+ <script id="github-tmpl" type="text/template">
41+ <h3>Github repos</h3>
42+ <ul>
43+ <% _.each(repos, function (repo, idx) { %>
44+ <li><a href="<%= repo.url %>" target="_blank"><%= repo.name %> &#8599;</a></li>
45+ <% }); %>
46+ </ul>
47+ </script>
48+
3849 <script id="page-tmpl" type="text/template">
3950 <h1><%= title %></h1>
4051 <div><%= body %></div>
htdocs/js/github.js+43−0
@@ -0,0 +1,43 @@
1+/*jshint expr:true, onevar:true */
2+/*global _:true, $:true, define: true */
3+var Github = (function (win, undefined) {
4+ 'use strict';
5+
6+ var Github;
7+
8+ Github = function (username) {
9+ this.username = username;
10+ };
11+
12+ Github.prototype = {
13+ sync: function (options) {
14+ options = options || {};
15+ var _success = options.success, params,
16+ _url = options.url;
17+
18+ delete options.url;
19+ delete options.success;
20+
21+ params = {
22+ type: 'GET',
23+ url: _url,
24+ data: options,
25+ dataType: 'jsonp',
26+ success: _success
27+ };
28+
29+ return $.ajax(params);
30+ },
31+
32+ getrepos: function (cb) {
33+ this.sync({
34+ url: '//github.com/api/v2/json/repos/show/'+ this.username,
35+ success: cb
36+ });
37+ return this;
38+ }
39+ };
40+
41+ return (win.Github = Github);
42+
43+}) (this);
htdocs/js/index.js+11−3
@@ -1,8 +1,9 @@
1-/*global Tumblr:true, _:true, $:true, View:true, parallax: true */
1+/*global Tumblr:true, _:true, $:true, View:true, parallax: true, Github:true */
22 $(function () {
33 'use strict';
44
5- var tumblr = new Tumblr('xonecas', 'IM11cPEsi3jxTeSNwF8BB9Z08UItXcYKiEDLTLvl5RYn6MBcMD');
5+ var tumblr = new Tumblr('xonecas', 'IM11cPEsi3jxTeSNwF8BB9Z08UItXcYKiEDLTLvl5RYn6MBcMD'),
6+ github = new Github('xonecas');
67 $('body').hide();
78
89 tumblr.getpost(20, {
@@ -40,10 +41,17 @@ $(function () {
4041 });
4142 });
4243
43- $('body').noisy().css('background-color', '#eff6ff').show();
44+ $('body').noisy().css('background-color', '#121212').show();
4445 parallax.index.show();
4546 }
4647 });
4748
49+ github.getrepos(function (data) {
50+ var gitview = new View({
51+ el: $('<div id="github"></div>').appendTo('#index'),
52+ template: _.template($('#github-tmpl').html())
53+ }).toHTML({ repos: data.repositories });
54+ });
55+
4856 $.get('/analytics');
4957 });