Skip to content

Commit 69fa61c

Browse files
committed
Update templates and css.
1 parent a6d733e commit 69fa61c

File tree

6 files changed

+136
-8
lines changed

6 files changed

+136
-8
lines changed

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ other_nodegit_versions:
1010

1111
# Build settings
1212
markdown: redcarpet
13+
redcarpet:
14+
extensions: [tables, no_intra_emphasis, autolink]
1315
highlighter: pygments
1416
permalink: pretty
1517
exclude: ["node_modules","generate","package.json","README.md"]

_includes/header.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ <h1><a class="site-title" href="{{ site.baseurl }}/"><img src="/img/nodegit.svg"
2323
<nav>
2424
<ul>
2525
<li{% if page.menu_item == 'getting_started' %} class="active"{% endif %}><a href="{{ site.baseurl }}/{% if page.nodegit_version %}{{ page.nodegit_version }}/{% endif %}">Getting Started</a></li>
26-
<li><a href="{{ site.baseurl }}/{% if page.nodegit_version %}{{ page.nodegit_version }}/{% endif %}guides/">Guides</a></li>
27-
<li><a href="{{ site.baseurl }}/{% if page.nodegit_version %}{{ page.nodegit_version }}/{% endif %}api/">API Documentation</a></li>
26+
<li{% if page.menu_item == 'guides' %} class="active"{% endif %}><a href="{{ site.baseurl }}/{% if page.nodegit_version %}{{ page.nodegit_version }}/{% endif %}guides/">Guides</a></li>
27+
<li{% if page.menu_item == 'api' %} class="active"{% endif %}><a href="{{ site.baseurl }}/{% if page.nodegit_version %}{{ page.nodegit_version }}/{% endif %}api/">API Documentation</a></li>
2828
<li><a href="https://github.com/nodegit/nodegit/{% if page.nodegit_version %}tree/{{ page.nodegit_version }}/{% endif %}">Source</a></li>
29-
<li><a href="{{ site.baseurl }}/blog/">Blog</a></li>
29+
<li{% if page.menu_item == 'blog' %} class="active"{% endif %}><a href="{{ site.baseurl }}/blog/">Blog</a></li>
3030
</ul>
3131
</nav>
3232

_layouts/default.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
<div class="page-content">
1111
<div class="wrapper">
1212
<div class="outline">
13+
{% if page.return_to %}
14+
{% for section_hash in page.return_to %}
15+
<h5><a href="{{section_hash[1]}}">{{section_hash[0]}}</a></h5>
16+
{% endfor %}
17+
{% endif %}
1318
<ul>
1419
{% for section_hash in page.sections %}
1520
<li><a href="{{section_hash[1]}}">{{section_hash[0]}}</a></li>

_sass/_layout.scss

Lines changed: 95 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
/**
44
* Set `margin-bottom` to maintain vertical rhythm
55
*/
6-
h1, h2, h3, h4, h5, h6,
6+
h1, h2, h3,
77
p, blockquote, pre,
88
ul, ol, dl, figure, .highlight
99
%vertical-rhythm {
1010
margin-bottom: $spacing-unit / 2;
1111
}
1212

13+
html, body {
14+
background:#fff;
15+
}
16+
1317
body {
1418
padding:0 $spacing-unit $spacing-unit;
1519
}
@@ -25,6 +29,7 @@ body {
2529

2630
header {
2731
display:block;
32+
background:#fff;
2833
overflow:hidden;
2934

3035
.site-info {
@@ -212,15 +217,103 @@ header {
212217

213218
.outline {
214219
float:right;
215-
width:180px;
220+
width:220px;
216221
padding:0 0 0 $spacing-unit;
217222
font-size:$font-size * 0.9;
218223
display:block;
224+
225+
ul {
226+
border:none;
227+
}
219228
}
220229

221230
.main {
222231
overflow:hidden;
223232
width:auto;
233+
234+
table {
235+
a {
236+
color:$text-color;
237+
font-weight:500;
238+
239+
span {
240+
font-weight:normal;
241+
}
242+
243+
&:hover {
244+
color:$headline-color;
245+
}
246+
}
247+
248+
.tags {
249+
position:relative;
250+
top:-2px;
251+
right:-12px;
252+
253+
span {
254+
padding-top:2px;
255+
padding-bottom:2px;
256+
}
257+
}
258+
}
259+
}
260+
}
261+
262+
span.tags {
263+
margin:0 0 0 6px;
264+
position:relative;
265+
top:-0.23em;
266+
267+
span {
268+
font-size:12px;
269+
display:inline-block;
270+
padding:6px 8px;
271+
border-radius:3px;
272+
text-transform:uppercase;
273+
color:#fff;
274+
margin:0 8px 0 0;
275+
font-family:$font-family;
276+
font-weight:500;
277+
278+
&.enum {
279+
background:#92D4D3;
280+
}
281+
282+
&.sync {
283+
background:#FD8487;
284+
}
285+
286+
&.async {
287+
background:#77D971;
288+
}
289+
290+
&.experimental {
291+
background:#FFBB85;
292+
}
293+
}
294+
}
295+
296+
table {
297+
border-collapse:collapse;
298+
width:100%;
299+
margin:0 0 $spacing-unit/2;
300+
301+
th {
302+
font-weight:500;
303+
color:#aaa;
304+
}
305+
306+
td {
307+
border-top:1px solid #ededed;
308+
}
309+
310+
th, td {
311+
padding:8px $spacing-unit/2;
312+
text-align:left;
313+
314+
span {
315+
color:#aaa;
316+
}
224317
}
225318
}
226319

_sass/_type.scss

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body {
77
color:$text-color;
88
}
99

10-
h1, h2, h3, h4, h5, nav, .version, .version-menu, .buttons {
10+
h1, h2, h3, nav, .version, .version-menu, .buttons {
1111
font-family: Bitter, $font-family;
1212
line-height:1;
1313
}
@@ -20,6 +20,10 @@ h2 {
2020
font-size:$font-size * 2;
2121
margin-top:$spacing-unit;
2222

23+
span {
24+
color:#aaa;
25+
}
26+
2327
&:first-child {
2428
margin-top:0;
2529
}
@@ -29,16 +33,40 @@ h3 {
2933
font-size:$font-size * 1.2;
3034
}
3135

36+
h4 {
37+
font-weight:500;
38+
color:#999;
39+
}
40+
41+
h5 {
42+
border-bottom:1px solid #ededed;
43+
padding:0 0 $spacing-unit/4;
44+
margin:0 0 $spacing-unit/3;
45+
}
46+
3247
.version, .version-menu {
3348
font-size:$font-size*0.8;
3449
}
3550

51+
strong {
52+
font-weight:bold;
53+
color:#222;
54+
}
55+
3656
a {
3757
text-decoration:none;
3858
color:$key-color;
3959

60+
span {
61+
color:#aaa;
62+
}
63+
4064
&:hover {
4165
color:darken($key-color, 20%);
66+
67+
span {
68+
color:#727272;
69+
}
4270
}
4371
}
4472

css/main.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ $font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
77
$font-size: 16px;
88
$line-height: 1.5;
99
$spacing-unit: 30px;
10-
$headline-color: #444;
11-
$text-color: #727272;
10+
$headline-color: #222;
11+
$text-color: #555;
1212
$key-color: #F1595F;
1313

1414
// Import partials from `sass_dir` (defaults to `_sass`)

0 commit comments

Comments
 (0)