summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-04-01 01:21:42 -0700
committerSamy Pessé <samypesse@gmail.com>2014-04-01 01:21:44 -0700
commit256d1ba35a74777b6bdd9d937809798a0cfe3c20 (patch)
tree7be827ab14a85c307afc40d6ff0a176b14116173 /templates
parentcc340db0faa412edec47a7d37ce591501ab454fb (diff)
downloadgitbook-256d1ba35a74777b6bdd9d937809798a0cfe3c20.zip
gitbook-256d1ba35a74777b6bdd9d937809798a0cfe3c20.tar.gz
gitbook-256d1ba35a74777b6bdd9d937809798a0cfe3c20.tar.bz2
Add progress calcul
Diffstat (limited to 'templates')
-rw-r--r--templates/page.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/templates/page.html b/templates/page.html
index 223bb87..656108d 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -7,8 +7,18 @@
<div class="book {% if _input == "README.md" %}with-summary{% endif %}" data-github="{{ githubId }}" data-level="{{ navigation.level }}">
{% include "includes/book/header.html" %}
{% include "includes/book/summary.html" %}
-
<div class="book-body">
+ <div class="book-progress">
+ <div class="bar">
+ <div class="inner" style="width: {{ progress.percent }}%;"></div>
+ </div>
+ <div class="chapters">
+ {% for p in progress.chapters %}
+ <div class="chapter {% if p.done %}done{% endif %}" data-progress="{{ p.level }}" style="left: {{ p.percent }}%;"></div>
+ {% endfor %}
+ </div>
+ </div>
+
<div class="page-wrapper">
<div class="page-inner">
{% for section in content %}