Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions _layouts/chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
<body>
<header>
<h1><a href="/">CoffeeScript Cookbook</a></h1>
<a href="/chapters">Chapter Index</a> |
<a href="/contributing">Contributing</a> |
<a href="/authors">Authors</a> |
<a href="/license">License</a>
<nav>
<ul>
<li><a href="/chapters">Chapter Index</a></li>
<li><a href="/contributing">Contributing</a></li>
<li><a href="/authors">Authors</a></li>
<li><a href="/license">License</a></li>
</ul>
</nav>
</header>
<section class="content">
<h2>{{ page.title }}</h2>
Expand Down
12 changes: 8 additions & 4 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
<body>
<header>
<h1><a href="/">CoffeeScript Cookbook</a></h1>
<a href="/chapters">Chapter Index</a> |
<a href="/contributing">Contributing</a> |
<a href="/authors">Authors</a> |
<a href="/license">License</a>
<nav>
<ul>
<li><a href="/chapters">Chapter Index</a></li>
<li><a href="/contributing">Contributing</a></li>
<li><a href="/authors">Authors</a></li>
<li><a href="/license">License</a></li>
</ul>
</nav>
</header>
<section class="content">
{{ content }}
Expand Down
10 changes: 6 additions & 4 deletions _layouts/recipe.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
<link rel="stylesheet" href="/css/default.css" type="text/css">
</head>
<body>
<header>
<header>
<h1><a href="/">CoffeeScript Cookbook</a></h1>
<nav>
<a href="/">Home</a> &raquo;
<a href="/chapters/{{ page.chapter | replace: ' ', '_' | downcase }}">{{ page.chapter }}</a> &raquo;
{{ page.title }}
<ol class="breadcrumbs">
<li><a href="/">Home</a></li>
<li><a href="/chapters/{{ page.chapter | replace: ' ', '_' | downcase }}">{{ page.chapter }}</a></li>
<li>{{ page.title }}</li>
</ol>
</nav>
</header>
<section class="content">
Expand Down
32 changes: 18 additions & 14 deletions chapters/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,24 @@
- Databases
---

{% for chapter in page.chapters %}
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
<ol id="chapters">
{% for chapter in page.chapters %}
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
{% capture indexurl %}{{ url }}/index.html{% endcapture %}

<h2><a href="{{ url }}">{{ chapter }}</a></h2>
<li class="chapter">
<h2><a href="{{ url }}">{{ chapter }}</a></h2>

<ul>
{% for page in site.pages %}
{% if page.url contains url %}
{% unless page.url == indexurl %}
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
{% endunless %}
{% endif %}
{% endfor %}
</ul>
<ul id="recipes">
{% for page in site.pages %}
{% if page.url contains url %}
{% unless page.url == indexurl %}
<li class="recipe"><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
{% endunless %}
{% endif %}
{% endfor %}
</ul>
</li>

{% endfor %}
{% endfor %}
</ul>
30 changes: 30 additions & 0 deletions css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,36 @@ ul, ol {
margin-bottom: 22px;
}

nav ul {
list-style:none;
}

nav ul li {
border-left:1px solid rgba(0, 0, 0, 0.2);
display:inline-block;
padding:0 10px;
}

nav ul li:first-child {
border:none;
}

nav ol {
list-style:none;
}

nav ol li {
display:inline-block;
}

nav ol.breadcrumbs li:before {
content: '\000bb\000a0'; /* Insert &raquo;&nbsp; between list items. */
}

nav ol.breadcrumbs li:first-child:before {
content: '';
}

/* Typography */

body {
Expand Down
32 changes: 18 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,24 @@ <h1>Welcome</h1>

<p>Welcome to the CoffeeScript Cookbook! CoffeeScript recipes for the community <em>by</em> the community. Head over to the <a href="/contributing">Contributing</a> page and see what you can do to help out!</p>

{% for chapter in page.chapters %}
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
<ol id="chapters">
{% for chapter in page.chapters %}
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
{% capture indexurl %}{{ url }}/index.html{% endcapture %}

<h2><a href="{{ url }}">{{ chapter }}</a></h2>
<li class="chapter">
<h2><a href="{{ url }}">{{ chapter }}</a></h2>

<ul>
{% for page in site.pages %}
{% if page.url contains url %}
{% unless page.url == indexurl %}
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
{% endunless %}
{% endif %}
{% endfor %}
</ul>
<ul id="recipes">
{% for page in site.pages %}
{% if page.url contains url %}
{% unless page.url == indexurl %}
<li class="recipe"><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
{% endunless %}
{% endif %}
{% endfor %}
</ul>
</li>

{% endfor %}
{% endfor %}
</ul>