Skip to content

Commit 84a44df

Browse files
committed
General Layout
1 parent feb8eb4 commit 84a44df

File tree

2 files changed

+192
-39
lines changed

2 files changed

+192
-39
lines changed

index.html

Lines changed: 138 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,147 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
66

7-
<title>NodeGit: Native Node bindings to Git.</title>
8-
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.4.2/pure-min.css">
9-
<link type="text/css" rel="stylesheet" href="styles/common.css">
10-
<link type="text/css" rel="stylesheet" href="styles/ir_black.css">
11-
</head>
7+
<title>NodeGit: Native Node bindings to Git.</title>
8+
<link type="text/css" rel="stylesheet" href="styles/common.css">
9+
<link type="text/css" rel="stylesheet" href="styles/ir_black.css">
10+
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
11+
</head>
1212

13-
<body>
14-
15-
<header>
16-
<h1 class="brand">NodeGit</h1>
17-
18-
<!--
19-
<nav>
20-
<div class="pure-menu pure-menu-open pure-menu-horizontal">
13+
<body>
14+
<div id="wrapper">
15+
<header>
16+
<div class="brand">NodeGit</div>
17+
<nav>
2118
<ul>
22-
<li><a href="#">Home</a></li>
23-
<li class="pure-menu-selected"><a href="#">Flickr</a></li>
24-
<li><a href="#">Messenger</a></li>
25-
<li><a href="#">Sports</a></li>
26-
<li><a href="#">Finance</a></li>
19+
<li><a href="#">CLASSES</a></li>
20+
<li><a href="#">EVENTS</a></li>
21+
<li><a href="#">NAMESPACES</a></li>
22+
<li><a href="#">GLOBAL</a></li>
2723
</ul>
28-
</div>
29-
</nav>
30-
-->
31-
<!--
32-
<nav><a href="#">Test</a> </nav>
33-
<nav><a href="#">Test</a> </nav>
34-
-->
35-
</header>
24+
</nav>
25+
</header>
26+
27+
<section class="block">
28+
<!-- Branding -->
29+
<section class="branding">
30+
<a class="download" href="http://github.com/tbranyen/nodegit/zipball/master">
31+
<img src="http://github.com/images/modules/download/zip.png">
32+
</a>
33+
<a class="download" href="http://github.com/tbranyen/nodegit/tarball/master">
34+
<img src="http://github.com/images/modules/download/tar.png">
35+
</a>
36+
<div class="headline">
37+
<a href="http://github.com/tbranyen/nodegit">nodegit</a>
38+
<a class="travis" href="https://travis-ci.org/tbranyen/nodegit"><img src="https://travis-ci.org/tbranyen/nodegit.png" alt="Build Status" style="max-width:100%;"></a>
39+
</div>
40+
<span class="small">by <a href="http://github.com/tbranyen">tbranyen</a> &amp; <a href="http://github.com/faceleg">faceleg</a></span>
41+
</section>
42+
43+
<div class="social">
44+
<iframe src="http://ghbtns.com/github-btn.html?count=true&amp;user=tbranyen&amp;repo=nodegit&amp;type=watch" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
45+
<iframe id="twitter-widget-0" scrolling="no" frameborder="0" allowtransparency="true" src="http://platform.twitter.com/widgets/tweet_button.1400006231.html#_=1400268411265&amp;count=horizontal&amp;hashtags=nodejs&amp;id=twitter-widget-0&amp;lang=en&amp;original_referer=http%3A%2F%2Fwww.nodegit.org%2F&amp;size=m&amp;text=When%20I%20need%20git%20tools%20in%20Node.js%2C%20I%20use%20nodegit&amp;url=http%3A%2F%2Fnodegit.github.com%2F" class="twitter-share-button twitter-tweet-button twitter-share-button twitter-count-horizontal" title="Twitter Tweet Button" data-twttr-rendered="true" style="width: 107px; height: 20px;"></iframe>
46+
</div>
47+
48+
<p>Version <strong>0.0.79</strong> Node.js libgit2 asynchronous native bindings</p>
49+
<p>A collection of non-blocking Node.js libgit2 bindings, raw api, convenience api, unit tests, documentation and accomodations to make contributing easier.</p>
50+
<h4>require</h4>
51+
<ul><li><a href="http://nodejs.org/">Node.js &gt;=0.8</a></li><li><a href="http://npmjs.org/">npm</a> <em>(if you want the premiere install experience)</em></li><li><a href="http://git-scm.com/">Git</a> <em>(if you want to unit test )</em> </li></ul>
52+
<h4>install</h4>
53+
<pre><code class="" data-result="[object Object]">npm install nodegit</code></pre>
54+
<h4>use</h4>
55+
<p><em>emulate git log</em></p>
56+
<pre>
57+
<code class="javascript" data-result="[object Object]"><span class="comment">// Load in the module.</span>
58+
<span class="keyword">var</span> git = require(<span class="string">'nodegit'</span>),
59+
async = require(<span class="string">'async'</span>);
60+
61+
<span class="comment">// Open the repository in the current directory.</span>
62+
git.repo(<span class="string">'.git'</span>, <span class="function"><span class="keyword">function</span><span class="params">(error, repository)</span> {</span>
63+
<span class="keyword">if</span> (error) <span class="keyword">throw</span> error;
64+
65+
<span class="comment">// Use the master branch (a branch is the HEAD commit)</span>
66+
repository.branch(<span class="string">'master'</span>, <span class="function"><span class="keyword">function</span><span class="params">(error, branch)</span> {</span>
67+
<span class="keyword">if</span> (error) <span class="keyword">throw</span> error;
68+
69+
<span class="comment">// History returns an event, and begins walking the history</span>
70+
<span class="keyword">var</span> history = branch.history();
71+
72+
<span class="comment">// History emits 'commit' event for each commit in the branch's history</span>
73+
history.on(<span class="string">'commit'</span>, <span class="function"><span class="keyword">function</span><span class="params">(error, commit)</span> {</span>
74+
<span class="comment">// Print out `git log` emulation.</span>
75+
async.series([
76+
<span class="function"><span class="keyword">function</span><span class="params">(callback)</span> {</span>
77+
commit.sha(callback);
78+
},
79+
<span class="function"><span class="keyword">function</span><span class="params">(callback)</span> {</span>
80+
commit.date(callback);
81+
},
82+
<span class="function"><span class="keyword">function</span><span class="params">(callback)</span> {</span>
83+
commit.author(<span class="function"><span class="keyword">function</span><span class="params">(error, author)</span> {</span>
84+
author.name(callback);
85+
});
86+
},
87+
<span class="function"><span class="keyword">function</span><span class="params">(callback)</span> {</span>
88+
commit.author(<span class="function"><span class="keyword">function</span><span class="params">(error, author)</span> {</span>
89+
author.email(callback);
90+
});
91+
},
92+
<span class="function"><span class="keyword">function</span><span class="params">(callback)</span> {</span>
93+
commit.message(callback);
94+
}
95+
], <span class="function"><span class="keyword">function</span> <span class="title">printCommit</span><span class="params">(error, results)</span> {</span>
96+
<span class="keyword">if</span> (error) <span class="keyword">throw</span> error;
97+
console.log(<span class="string">'SHA '</span> + results[<span class="number">0</span>]);
98+
console.log(results[<span class="number">1</span>] * <span class="number">1000</span>);
99+
console.log(results[<span class="number">2</span>] + <span class="string">' &lt;'</span> + results[<span class="number">3</span>] + <span class="string">'&gt;'</span>);
100+
console.log(results[<span class="number">4</span>]);
101+
});
102+
});
103+
});
104+
});
105+
</code>
106+
</pre>
107+
108+
<p><em>view commit tree and blob information</em></p>
109+
110+
<pre>
111+
<code class="javascript" data-result="[object Object]"><span class="comment">// Load in the module.</span>
112+
<span class="keyword">var</span> git = require(<span class="string">'nodegit'</span>);
113+
114+
<span class="comment">// Open the repository in the current directory.</span>
115+
git.repo(<span class="string">'.git'</span>, <span class="function"><span class="keyword">function</span><span class="params">(error, repository)</span> {</span>
116+
<span class="keyword">if</span> (error) <span class="keyword">throw</span> error;
117+
118+
<span class="comment">// Use the master branch.</span>
119+
repository.branch(<span class="string">'master'</span>, <span class="function"><span class="keyword">function</span><span class="params">(error, branch)</span> {</span>
120+
<span class="keyword">if</span> (error) <span class="keyword">throw</span> error;
121+
122+
<span class="comment">// Iterate over the revision history.</span>
123+
branch.tree(<span class="function"><span class="keyword">function</span><span class="params">(error, tree)</span> {</span>
124+
<span class="keyword">if</span> (error) <span class="keyword">throw</span> error;
125+
tree.walk().on(<span class="string">'entry'</span>, <span class="function"><span class="keyword">function</span><span class="params">(error, entry)</span> {</span>
126+
entry.name(<span class="function"><span class="keyword">function</span><span class="params">(error, name)</span> {</span>
127+
console.log(name);
128+
});
129+
});
130+
});
131+
});
132+
});
133+
</code>
134+
</pre>
135+
136+
<h4>download</h4>
137+
<p>You can download this project in either <a href="http://github.com/tbranyen/nodegit/zipball/master">zip</a> or <a href="http://github.com/tbranyen/nodegit/tarball/master">tar</a> formats.</p>
138+
<p>You can also clone and build the project with <a href="http://git-scm.com">Git</a> by running:</p>
139+
<pre><code class="" data-result="[object Object]">$ git clone git://github.com/tbranyen/nodegit $ cd nodegit $ node install</code></pre>
140+
</section>
141+
<footer>NodeGit development is sponsored by <a href="http://bocoup.com/">Bocoup</a></footer>
142+
</div>
143+
144+
</body>
36145

37146
<script src="scripts/highlight.pack.js"></script>
38147
<script>
@@ -48,5 +157,4 @@ <h1 class="brand">NodeGit</h1>
48157
ga('create', 'UA-21174385-2', 'github.com');
49158
ga('send', 'pageview');
50159
</script>
51-
</body>
52160
</html>

styles/common.css

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,37 @@
22
box-sizing: border-box;
33
}
44

5+
body {
6+
font-family: 'Open Sans', sans-serif;
7+
margin: 0;
8+
}
9+
510
html, body {
611
background: #434343;
712
}
813

9-
header {
14+
header, footer {
1015
text-align: center;
11-
overflow: visible;
1216
background: #383838;
17+
color: white;
18+
}
19+
20+
a {
21+
text-decoration: none;
1322
}
1423

15-
h1.brand {
24+
.brand {
1625
color: transparent;
1726
position: relative;
1827
margin: 0;
1928
padding: 2%;
20-
height: 100px;
29+
height: 130px;
2130
}
2231

23-
h1.brand:before {
32+
.brand:before {
2433
content: "";
2534
width: 228px;
26-
height: 50px;
35+
height: 51px;
2736
display: block;
2837
background: url(../img/nodegit.svg);
2938
margin: auto;
@@ -36,9 +45,45 @@ header {
3645
position: relative;
3746
}
3847

39-
nav .pure-button {
40-
background: #000;
41-
color: #FFF;
48+
nav ul {
49+
margin: 0;
50+
padding: 0;
51+
border-top: 1px solid #313131;
52+
}
53+
54+
nav ul li {
55+
display: inline-block;
56+
line-height: 3.5em;
57+
}
58+
59+
nav a {
60+
color: white;
61+
padding: 0 3em;
62+
display: block;
63+
font-size: .8em;
64+
font-weight: 100;
65+
letter-spacing: 1px;
66+
}
67+
68+
nav a:hover {
69+
background: #313131;
70+
}
71+
72+
footer {
73+
line-height: 4.5em;
74+
font-size: .8em;
75+
letter-spacing: 1px;
76+
}
77+
78+
footer a {
79+
color: #F45C60;
80+
}
81+
82+
#wrapper .block {
83+
max-width: 980px;
84+
margin: auto;
85+
padding: 6em 2em;
86+
background: white;
4287
}
4388

4489
/*

0 commit comments

Comments
 (0)