From 17019c951fa1bd922f8eabe6ab9e785a74db852f Mon Sep 17 00:00:00 2001 From: Jamie Gaskins Date: Sun, 31 Jul 2011 17:56:21 +0800 Subject: [PATCH 1/5] Semanticize the HTML in the chapter index a bit. --- chapters/index.html | 32 ++++++++++++++++++-------------- index.html | 32 ++++++++++++++++++-------------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/chapters/index.html b/chapters/index.html index 53face9..dc0ad39 100644 --- a/chapters/index.html +++ b/chapters/index.html @@ -17,20 +17,24 @@ - Databases --- -{% for chapter in page.chapters %} - {% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %} - {% capture indexurl %}{{ url }}/index.html{% endcapture %} +
    + {% for chapter in page.chapters %} + {% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %} + {% capture indexurl %}{{ url }}/index.html{% endcapture %} -

    {{ chapter }}

    +
  1. +

    {{ chapter }}

    -
      - {% for page in site.pages %} - {% if page.url contains url %} - {% unless page.url == indexurl %} -
    • {{ page.title }}
    • - {% endunless %} - {% endif %} - {% endfor %} -
    +
      + {% for page in site.pages %} + {% if page.url contains url %} + {% unless page.url == indexurl %} +
    • {{ page.title }}
    • + {% endunless %} + {% endif %} + {% endfor %} +
    +
  2. -{% endfor %} + {% endfor %} + \ No newline at end of file diff --git a/index.html b/index.html index d25f923..247136b 100644 --- a/index.html +++ b/index.html @@ -21,20 +21,24 @@

    Welcome

    Welcome to the CoffeeScript Cookbook! CoffeeScript recipes for the community by the community. Head over to the Contributing page and see what you can do to help out!

    -{% for chapter in page.chapters %} - {% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %} - {% capture indexurl %}{{ url }}/index.html{% endcapture %} +
      + {% for chapter in page.chapters %} + {% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %} + {% capture indexurl %}{{ url }}/index.html{% endcapture %} -

      {{ chapter }}

      +
    1. +

      {{ chapter }}

      -
        - {% for page in site.pages %} - {% if page.url contains url %} - {% unless page.url == indexurl %} -
      • {{ page.title }}
      • - {% endunless %} - {% endif %} - {% endfor %} -
      +
        + {% for page in site.pages %} + {% if page.url contains url %} + {% unless page.url == indexurl %} +
      • {{ page.title }}
      • + {% endunless %} + {% endif %} + {% endfor %} +
      +
    2. -{% endfor %} + {% endfor %} + \ No newline at end of file From 2ba85f74c1d873fedb497e1d171ff8777e7685d5 Mon Sep 17 00:00:00 2001 From: Jamie Gaskins Date: Sun, 31 Jul 2011 18:05:07 +0800 Subject: [PATCH 2/5] Make the navigation in the header a bit more semantic --- _layouts/default.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index abbd566..d4e3a13 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -7,10 +7,14 @@

      CoffeeScript Cookbook

      - Chapter Index | - Contributing | - Authors | - License +
      {{ content }} From 11f45119dbb9f0e074398733dde064c61116d3fc Mon Sep 17 00:00:00 2001 From: Jamie Gaskins Date: Sun, 31 Jul 2011 18:07:40 +0800 Subject: [PATCH 3/5] Pretty up the new navigation header. --- css/default.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/css/default.css b/css/default.css index 0c2d2f9..edb4c34 100644 --- a/css/default.css +++ b/css/default.css @@ -61,6 +61,20 @@ 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; +} + /* Typography */ body { From a18d8149802a8f2bbea931c3ebfc6f1a16906831 Mon Sep 17 00:00:00 2001 From: Jamie Gaskins Date: Sun, 31 Jul 2011 18:36:14 +0800 Subject: [PATCH 4/5] Get the chapter navigation to match the default. --- _layouts/chapter.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/_layouts/chapter.html b/_layouts/chapter.html index 39349c4..ae1d592 100644 --- a/_layouts/chapter.html +++ b/_layouts/chapter.html @@ -7,10 +7,14 @@

      CoffeeScript Cookbook

      - Chapter Index | - Contributing | - Authors | - License +

      {{ page.title }}

      From aab856d8d58c9c8ef35d45bbb56794457ebe87b0 Mon Sep 17 00:00:00 2001 From: Jamie Gaskins Date: Sun, 31 Jul 2011 18:36:54 +0800 Subject: [PATCH 5/5] Separate presentation from content a bit in the recipe header. --- _layouts/recipe.html | 10 ++++++---- css/default.css | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/_layouts/recipe.html b/_layouts/recipe.html index 7405cc7..22b23c1 100644 --- a/_layouts/recipe.html +++ b/_layouts/recipe.html @@ -5,12 +5,14 @@ -
      +

      CoffeeScript Cookbook

      diff --git a/css/default.css b/css/default.css index edb4c34..fb906a4 100644 --- a/css/default.css +++ b/css/default.css @@ -75,6 +75,22 @@ 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 »  between list items. */ +} + +nav ol.breadcrumbs li:first-child:before { + content: ''; +} + /* Typography */ body {