summaryrefslogtreecommitdiffstats
path: root/theme/templates
diff options
context:
space:
mode:
Diffstat (limited to 'theme/templates')
-rw-r--r--theme/templates/includes/book/exercise.html2
-rw-r--r--theme/templates/includes/book/header.html5
-rw-r--r--theme/templates/includes/book/summary.html2
-rw-r--r--theme/templates/page.html4
-rw-r--r--theme/templates/site.html6
5 files changed, 16 insertions, 3 deletions
diff --git a/theme/templates/includes/book/exercise.html b/theme/templates/includes/book/exercise.html
index 1acbe79..fbf8505 100644
--- a/theme/templates/includes/book/exercise.html
+++ b/theme/templates/includes/book/exercise.html
@@ -20,5 +20,7 @@
<div class="btn-group btn-group-justified">
<a href="#" class="btn btn-default action-submit">Submit</a>
<a href="#" class="btn btn-default action-solution">Solution</a>
+ {% if githubId %}
<a href="{{ githubHost }}{{ githubId }}/issues/new" target="_blank" class="btn btn-default">Have a Question?</a>
+ {% endif %}
</div>
diff --git a/theme/templates/includes/book/header.html b/theme/templates/includes/book/header.html
index 7732b37..5662714 100644
--- a/theme/templates/includes/book/header.html
+++ b/theme/templates/includes/book/header.html
@@ -1,6 +1,8 @@
<div class="book-header">
<!-- Actions Left -->
+ {% if githubId %}
<a href="{{ githubHost }}{{ githubId }}" target="_blank" class="btn pull-left"><i class="fa fa-github-alt"></i></a>
+ {% endif %}
<a href="#" class="btn pull-left toggle-summary"><i class="fa fa-align-justify"></i></a>
<a href="#" class="btn pull-left toggle-search"><i class="fa fa-search"></i></a>
@@ -9,9 +11,10 @@
<a href="#" target="_blank" class="btn pull-right" data-sharing="facebook"><i class="fa fa-facebook"></i></a>
<a href="#" target="_blank" class="btn pull-right" data-sharing="twitter"><i class="fa fa-twitter"></i></a>
+ {% if githubId %}
<a href="{{ githubHost }}{{ githubId }}/stargazers" target="_blank" class="btn pull-right count-star"><i class="fa fa-star-o"></i> Star (<span>-</span>)</a>
<a href="{{ githubHost }}{{ githubId }}/watchers" target="_blank" class="btn pull-right count-watch"><i class="fa fa-eye"></i> Watch (<span>-</span>)</a>
-
+ {% endif %}
<!-- Title -->
<h1><a href="{{ basePath }}/" >{{ title }}</a></h1>
diff --git a/theme/templates/includes/book/summary.html b/theme/templates/includes/book/summary.html
index 485b2ef..cbed38c 100644
--- a/theme/templates/includes/book/summary.html
+++ b/theme/templates/includes/book/summary.html
@@ -3,6 +3,7 @@
<input type="text" placeholder="Search" class="form-control" />
</div>
<ul class="summary">
+ {% if githubId %}
<li>
<a href="{{ githubHost }}{{ githubAuthor }}" target="blank">About the author</a>
</li>
@@ -13,6 +14,7 @@
<a href="{{ githubHost }}{{ githubId }}/edit/master/{{ _input }}" target="blank">Edit and Contribute</a>
</li>
<li class="divider"></li>
+ {% endif %}
<li data-level="0" data-path="index.html">
<a href="{{ basePath }}/"><i class="fa fa-check"></i> Introduction</a>
</li>
diff --git a/theme/templates/page.html b/theme/templates/page.html
index b23c81e..6f5115f 100644
--- a/theme/templates/page.html
+++ b/theme/templates/page.html
@@ -12,7 +12,9 @@
{# Cover #}
<section id="cover">
<h1>{{ title }}</h1>
+ {% if githubId %}
<h2>By <a href="{{ githubHost }}{{ githubAuthor }}">@{{ githubAuthor }}</a></h2>
+ {% endif %}
</section>
{# Summary #}
@@ -116,4 +118,4 @@
{% endif %}
{% endblock %}
-{% block javascript %}{% endblock %} \ No newline at end of file
+{% block javascript %}{% endblock %}
diff --git a/theme/templates/site.html b/theme/templates/site.html
index 2bc3408..6feb424 100644
--- a/theme/templates/site.html
+++ b/theme/templates/site.html
@@ -2,7 +2,11 @@
{% block title %}{{ progress.current.title }}{% parent %}{% endblock %}
{% block content %}
+{% if githubId %}
<div class="book" data-github="{{ githubId }}" data-level="{{ progress.current.level }}" data-basepath="{{ basePath }}" data-revision="{{ revision }}">
+{% else %}
+<div class="book" data-level="{{ progress.current.level }}" data-basepath="{{ basePath }}" data-revision="{{ revision }}">
+{% endif %}
{% include "includes/book/header.html" %}
{% include "includes/book/summary.html" %}
<div class="book-body" tabindex="-1">
@@ -32,4 +36,4 @@
{% endif %}
</div>
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}