diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-04-03 23:54:03 -0700 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-04-03 23:54:03 -0700 |
commit | 57ecfe4a548a9e648cd7aea8b7c7ebedd3aea30d (patch) | |
tree | 3daa9a985688c8ddf817a872eeb5d88692ff5941 /templates/includes | |
parent | 405792fd8f5614ff50e27ee8cda48813804507fc (diff) | |
download | gitbook-57ecfe4a548a9e648cd7aea8b7c7ebedd3aea30d.zip gitbook-57ecfe4a548a9e648cd7aea8b7c7ebedd3aea30d.tar.gz gitbook-57ecfe4a548a9e648cd7aea8b7c7ebedd3aea30d.tar.bz2 |
Make templates more modular
Diffstat (limited to 'templates/includes')
-rw-r--r-- | templates/includes/book/footer.html | 15 | ||||
-rw-r--r-- | templates/includes/book/progress.html | 10 |
2 files changed, 25 insertions, 0 deletions
diff --git a/templates/includes/book/footer.html b/templates/includes/book/footer.html new file mode 100644 index 0000000..48f4bf9 --- /dev/null +++ b/templates/includes/book/footer.html @@ -0,0 +1,15 @@ +<div class="page-footer"> + {% if _input == "README.md" %} + <a href="{{ basePath }}/{{ progress.current.next.path }}" class="navigation-link">Start</a> + {% else %} + {% if progress.current.next %} + {% if progress.current.next.path %} + <a href="{{ basePath }}/{{ progress.current.next.path }}" class="navigation-link next">Next</a> + {% else %} + <div class="navigation-link coming-soon">Coming soon</div> + {% endif %} + {% else %} + <div class="navigation-link finished">Finished!</div> + {% endif %} + {% endif %} +</div>
\ No newline at end of file diff --git a/templates/includes/book/progress.html b/templates/includes/book/progress.html new file mode 100644 index 0000000..d0e3193 --- /dev/null +++ b/templates/includes/book/progress.html @@ -0,0 +1,10 @@ +<div class="book-progress"> + <div class="bar"> + <div class="inner" style="width: {{ progress.percent }}%;min-width: {{ progress.prevPercent }}%;"></div> + </div> + <div class="chapters"> + {% for p in progress.chapters %} + <a href="{{ basePath }}/{{ p.path }}" title="{{ p.title }}" class="chapter {% if p.done %}done{% endif %} {% if p.level.length == 1 %}new-chapter{% endif %}" data-progress="{{ p.level }}" style="left: {{ p.percent }}%;"></a> + {% endfor %} + </div> +</div>
\ No newline at end of file |