Skip to content

Commit 9469c85

Browse files
committed
add header
1 parent 4a1bde4 commit 9469c85

File tree

4 files changed

+59
-7
lines changed

4 files changed

+59
-7
lines changed

Rules

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ compile '/css/*/' do
1414
# don’t filter or layout
1515
end
1616

17+
compile '/images/*' do
18+
end
19+
1720
compile '*' do
1821
filter :erb
1922
filter :kramdown
@@ -26,6 +29,10 @@ route '/css/*/' do
2629
item.identifier.chomp('/') << '.css'
2730
end
2831

32+
route '/images/*/' do
33+
item.identifier.chomp('/') << '.png'
34+
end
35+
2936
route '*' do
3037
item.identifier + 'index.html'
3138
end

content/css/styles.css

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ h1 {
2525

2626
h2 {
2727
font-size: 1em;
28-
margin:1em -2em;
28+
margin:1em 0;
2929
border-top: solid 4px #ddd;
30-
padding:1em 2em 0 2em;
30+
padding-top: 1em;
3131
}
3232

3333
h3 {
@@ -88,6 +88,39 @@ dd + dd {
8888
margin-bottom: 0;
8989
}
9090

91+
#header-wrapper {
92+
padding:1em 0;
93+
margin-bottom: 0;
94+
background-color: #F9F9F9;
95+
border-bottom: solid 2px #ddd;
96+
clear: both;
97+
height: 56px;
98+
}
99+
100+
#logo {
101+
float: left;
102+
}
103+
104+
#nav {
105+
float: right;
106+
}
107+
108+
#nav li:first-child {
109+
padding-left: 0;
110+
background-image: none;
111+
}
112+
113+
#nav li {
114+
list-style-type: none;
115+
float: left;
116+
margin: 2px 0 0 0;
117+
height: 56px;
118+
padding-left: 20px;
119+
line-height: 56px;
120+
background: 10px 50% no-repeat url(data:image/gif;base64,R0lGODlhAQATAKIEAGCl0GGm0mGm0WKn0v///wAAAAAAAAAAACH5BAEAAAQALAAAAAABABMAAAMJGAQkTQPKqEQCADs=);
121+
}
122+
123+
91124
#content {
92125
padding: 1em;
93126
}

content/images/logo.png

3.17 KB
Loading

layouts/default.html

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,28 @@
1414
</head>
1515
<body>
1616

17+
<div id="header-wrapper">
18+
<div class="container_12" id="header">
19+
<div id="logo">
20+
<a href="/"><img src="/images/logo.png" /></a>
21+
</div>
22+
<ul id="nav">
23+
<li><a href="/v3">API v3</a></li>
24+
<li><a href="http://develop.github.com">API v2</a></li>
25+
<li><a
26+
href="http://support.github.com/discussions/api">Support</a></li>
27+
</ul>
28+
</div><!-- #header -->
29+
</div><!-- #header-wrapper -->
30+
1731
<div class="container_12" id="wrapper">
1832
<div class="grid_9 suffix_1" id="content">
1933
<%= yield %>
2034
</div>
35+
2136
<div class="grid_2" id="sidebar">
2237

2338
<ul>
24-
<li><a href="/">Home</a></li>
2539
<li><a href="/v3">Summary</a></li>
2640
<li>
2741
<a href="/v3/issues">Issues</a>
@@ -37,12 +51,10 @@
3751
<li><a href="/v3/gists/comments">Comments</a></li>
3852
</ul>
3953
</li>
40-
<li><a
41-
href="http://support.github.com/discussions/api">Support</a></li>
4254
</ul>
4355

44-
</div>
45-
</div>
56+
</div><!-- #sidebar -->
57+
</div><!-- #wrapper -->
4658

4759
</body>
4860
</html>

0 commit comments

Comments
 (0)