diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-03-31 12:00:22 -0700 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-03-31 12:00:22 -0700 |
commit | 1f3f06284193fa6da12629966e0438f5a1f75bf6 (patch) | |
tree | 89d128bd5c06e12f7ce9e3c999021cc94adc98ad /templates/includes | |
parent | 0af1886358e79b5e9f84fcdeb7017edbc185d3c7 (diff) | |
download | gitbook-1f3f06284193fa6da12629966e0438f5a1f75bf6.zip gitbook-1f3f06284193fa6da12629966e0438f5a1f75bf6.tar.gz gitbook-1f3f06284193fa6da12629966e0438f5a1f75bf6.tar.bz2 |
Add base for generation
Diffstat (limited to 'templates/includes')
-rw-r--r-- | templates/includes/book/header.html | 22 | ||||
-rw-r--r-- | templates/includes/book/summary.html | 25 |
2 files changed, 47 insertions, 0 deletions
diff --git a/templates/includes/book/header.html b/templates/includes/book/header.html new file mode 100644 index 0000000..7bf937b --- /dev/null +++ b/templates/includes/book/header.html @@ -0,0 +1,22 @@ +<div class="book-header"> + <!-- Actions Left --> + <a href="https://github.com/{{ githubId }}" target="_blank" class="btn pull-left"><i class="fa fa-github-alt"></i></a> + <a href="#" class="btn pull-left toggle-summary"><i class="fa fa-align-justify"></i> Summary</a> + + <!-- Actions Right --> + <a href="/star/{{ githubId }}" class="btn pull-right"><i class="fa fa-star-o"></i> Star (0)</a> + <a href="/watch/{{ githubId }}" class="btn pull-right"><i class="fa fa-eye"></i> Watch (0)</a> + + + <!-- Title --> + <h1><a href="/book/{{ book.attributes.full_name }}" >{{ title }}</a></h1> +</div> +<script> +$(document).ready(function() { + var $book = $(".book"); + $book.find(".book-header .toggle-summary").click(function(e) { + e.preventDefault(); + $book.toggleClass("with-summary"); + }); +}); +</script>
\ No newline at end of file diff --git a/templates/includes/book/summary.html b/templates/includes/book/summary.html new file mode 100644 index 0000000..8b2473e --- /dev/null +++ b/templates/includes/book/summary.html @@ -0,0 +1,25 @@ +<div class="book-summary"> + <ul class="summary"> + <li> + <a href="/book/{{ book.attributes.full_name }}/README.md">Introduction</a> + </li> + <li> + <a href="https://github.com/{{ book.attributes.owner.login }}" target="blank">About the author</a> + </li> + <li class="divider"></li> + {% for item in summary.chapters %} + <li> + <a href="/book/{{ book.attributes.full_name }}/{{ item.chapter.path }}">{{ item.chapter.title }}</a> + {% if item.articles.length > 0 %} + <ul class="articles"> + {% for article in item.articles %} + <li> + <a href="/book/{{ book.attributes.full_name }}/{{ article.path }}">{{ article.title }}</a> + </li> + {% endfor %} + </ul> + {% endif %} + </li> + {% endfor %} + </ul> +</div>
\ No newline at end of file |