summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-05-14 10:20:42 +0200
committerSamy Pessé <samypesse@gmail.com>2014-05-14 10:20:42 +0200
commit2b50616251d2e563273a8bfc3938c33a1e81ada6 (patch)
treee6f10dc6120a55838e4a1183f4afadeaf2047a89
parent6ca8e26741405db4a84bcfb58e02e8050749fa5a (diff)
parent5b7f37f0d4ba6ed3b2a0ac707fd64e4f14e71cc1 (diff)
downloadgitbook-2b50616251d2e563273a8bfc3938c33a1e81ada6.zip
gitbook-2b50616251d2e563273a8bfc3938c33a1e81ada6.tar.gz
gitbook-2b50616251d2e563273a8bfc3938c33a1e81ada6.tar.bz2
Merge pull request #231 from embreinhardt/master
Add HTML classes to make plugins easier to write
-rw-r--r--theme/templates/includes/book/header.html8
-rw-r--r--theme/templates/includes/book/summary.html10
2 files changed, 9 insertions, 9 deletions
diff --git a/theme/templates/includes/book/header.html b/theme/templates/includes/book/header.html
index e6b9ab2..14ae294 100644
--- a/theme/templates/includes/book/header.html
+++ b/theme/templates/includes/book/header.html
@@ -1,7 +1,7 @@
<div class="book-header">
<!-- Actions Left -->
{% if options.links.home !== false and (options.links.home != null or githubId) %}
- <a href="{{ options.links.home|default(githubHost+githubId) }}" target="_blank" class="btn pull-left" aria-label="GitHub home"><i class="fa fa-bookmark-o"></i></a>
+ <a href="{{ options.links.home|default(githubHost+githubId) }}" target="_blank" class="btn pull-left home-bookmark" aria-label="GitHub home"><i class="fa fa-bookmark-o"></i></a>
{% endif %}
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
<a href="#" class="btn pull-left toggle-search" aria-label="Toggle search"><i class="fa fa-search"></i></a>
@@ -13,13 +13,13 @@
<!-- Actions Right -->
{% if options.links.sharing.google !== false %}
- <a href="#" target="_blank" class="btn pull-right" data-sharing="google-plus" aria-label="Share on Google Plus"><i class="fa fa-google-plus"></i></a>
+ <a href="#" target="_blank" class="btn pull-right google-plus-sharing-link sharing-link" data-sharing="google-plus" aria-label="Share on Google Plus"><i class="fa fa-google-plus"></i></a>
{% endif %}
{% if options.links.sharing.facebook !== false %}
- <a href="#" target="_blank" class="btn pull-right" data-sharing="facebook" aria-label="Share on Facebook"><i class="fa fa-facebook"></i></a>
+ <a href="#" target="_blank" class="btn pull-right facebook-sharing-link sharing-link" data-sharing="facebook" aria-label="Share on Facebook"><i class="fa fa-facebook"></i></a>
{% endif %}
{% if options.links.sharing.twitter !== false %}
- <a href="#" target="_blank" class="btn pull-right" data-sharing="twitter" aria-label="Share on Twitter"><i class="fa fa-twitter"></i></a>
+ <a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="twitter" aria-label="Share on Twitter"><i class="fa fa-twitter"></i></a>
{% endif %}
{% if githubId %}
diff --git a/theme/templates/includes/book/summary.html b/theme/templates/includes/book/summary.html
index a18bcaa..29fbd8c 100644
--- a/theme/templates/includes/book/summary.html
+++ b/theme/templates/includes/book/summary.html
@@ -5,19 +5,19 @@
<ul class="summary">
{% if options.links.about !== false && (options.links.about != null || githubId) %}
<li>
- <a href="{{ options.links.about|default(githubHost+githubAuthor) }}" target="blank">About the author</a>
+ <a href="{{ options.links.about|default(githubHost+githubAuthor) }}" target="blank" class="author-link">About the author</a>
</li>
{% endif %}
{% if options.links.issues !== false && (options.links.issues != null || githubId) %}
<li>
- <a href="{{ options.links.issues|default(githubHost+githubId+"/issues") }}" target="blank">Questions and Issues</a>
+ <a href="{{ options.links.issues|default(githubHost+githubId+"/issues") }}" target="blank"class="issues-link">Questions and Issues</a>
</li>
{% endif %}
{% if options.links.contribute !== false && (options.links.contribute != null || githubId) %}
<li>
- <a href="{{ options.links.contribute|default(githubHost+githubId+"/edit/master/"+_input) }}" target="blank">Edit and Contribute</a>
+ <a href="{{ options.links.contribute|default(githubHost+githubId+"/edit/master/"+_input) }}" target="blank" class="contribute-link">Edit and Contribute</a>
</li>
{% endif %}
@@ -29,7 +29,7 @@
<a href="{{ basePath }}/"><i class="fa fa-check"></i> Introduction</a>
</li>
{% for item in summary.chapters %}
- <li {% if item._path == _input %}class="active"{% endif %} data-level="{{ item.level }}" {% if item.path %}data-path="{{ item.path|mdLink }}"{% endif %}>
+ <li class="chapter {% if item._path == _input %}active{% endif %}" data-level="{{ item.level }}" {% if item.path %}data-path="{{ item.path|mdLink }}"{% endif %}>
{% if item.path %}
<a href="{{ basePath }}/{{ item.path|mdLink }}">
<i class="fa fa-check"></i> <b>{{ item.level }}.</b> {{ item.title }}
@@ -58,7 +58,7 @@
{% if options.links.gitbook !== false %}
<li class="divider"></li>
<li>
- <a href="http://www.gitbook.io/" target="blank">Generated using GitBook</a>
+ <a href="http://www.gitbook.io/" target="blank" class="gitbook-link">Generated using GitBook</a>
</li>
{% endif %}
</ul>