Permalink
Browse files

TOC display

  • Loading branch information...
1 parent 6511397 commit 2e2eec95db6b8cb8e2f026e0cdf7eaaab372cfd6 @alterebro alterebro committed Jul 18, 2016
Showing with 29 additions and 40 deletions.
  1. +20 −31 dev.json
  2. +7 −7 includes/toc_item.html
  3. +2 −2 stylesheets/pdf/_print.scss
View
@@ -2,42 +2,31 @@
"title":"The Nature of Code",
"destination":"build/:build",
"files":[
- "chapters/03_oscillation.html"
+ "chapters/00_1_titlepage.html",
+ "chapters/00_2_dedication.html",
+ "chapters/00_3_creditscopyright.html",
+ "chapters/00_4_acknowledgments.html",
+ "chapters/00_5_preface.html",
+ "chapters/00_6_TOC.html",
+ "chapters/00_7_intro.html",
+ "chapters/01_vectors.html",
+ "chapters/02_forces.html"
],
"addPlugins":[
"magicbook-codesplit",
"magicbook-katex"
],
- "builds":[
- {
- "format":"html",
- "layout":"layouts/html.html",
- "stylesheets":{
- "files": [ "stylesheets/pdf.scss" ]
- },
- "images" : {
- "files" : "noc_html/imgs/**/*.*"
- },
- "fonts" : {
- "destination" : "assets/fonts/"
- }
+ "builds":[{
+ "format":"html",
+ "layout":"layouts/html.html",
+ "stylesheets":{
+ "files": [ "stylesheets/pdf.scss" ]
},
- {
- "format":"pdf",
- "prince" : {
- "log":"errors.txt",
- "timeout" : 300000
- },
- "layout":"layouts/pdf.html",
- "stylesheets":{
- "files": [ "stylesheets/pdf.scss" ]
- },
- "images" : {
- "files" : "noc_pdf/imgs/**/*.*"
- },
- "fonts" : {
- "destination" : "assets/fonts/"
- }
+ "images" : {
+ "files" : "noc_html/imgs/**/*.*"
+ },
+ "fonts" : {
+ "destination" : "assets/fonts/"
}
- ]
+ }]
}
@@ -1,10 +1,10 @@
{% for item in children %}
-<li>
- <a href="{{ item.href }}">{{ item.label }}</a>
- {% if item.children.length > 0 %}
- <ul>
- {% include toc_item.html children=item.children %}
- </ul>
- {% endif %}
+<li data-toc-item="{{ item.id }}">
+ <a href="{{ item.href }}" title="{{ item.label | escape }}">{{ item.label }}</a>
+ {% if item.children.length > 0 %}
+ <ul>
+ {% include toc_item.html children=item.children %}
+ </ul>
+ {% endif %}
</li>
{% endfor %}
@@ -430,11 +430,11 @@ figure {
}
}
- // Preface visible w/roman index
> ul {
width: 90%;
- > li:first-child {
+ // Preface visible w/roman index
+ li[data-toc-item="_preface"] {
a[href]::after {
content: target-counter(attr(href), page, upper-roman);
}

0 comments on commit 2e2eec9

Please sign in to comment.