summaryrefslogtreecommitdiffstats
path: root/theme
diff options
context:
space:
mode:
Diffstat (limited to 'theme')
-rw-r--r--theme/templates/ebook/page.html2
-rw-r--r--theme/templates/ebook/summary.html4
-rw-r--r--theme/templates/website/glossary.html2
-rw-r--r--theme/templates/website/includes/exercise.html26
-rw-r--r--theme/templates/website/includes/header.html10
-rw-r--r--theme/templates/website/includes/quiz.html40
-rw-r--r--theme/templates/website/includes/summary.html14
-rw-r--r--theme/templates/website/page.html20
8 files changed, 24 insertions, 94 deletions
diff --git a/theme/templates/ebook/page.html b/theme/templates/ebook/page.html
index 3af7970..86f0df8 100644
--- a/theme/templates/ebook/page.html
+++ b/theme/templates/ebook/page.html
@@ -20,7 +20,7 @@
<div class="page">
<h1 class="book-chapter book-chapter-{{ progress.current.level|lvl }}">{{ progress.current.title }}</h1>
{% for section in content %}
- <div class="{{ section.type }}" id="section-{{ section.id }}">
+ <div class="{{ section.type }}" id="section-{{ section.id }}">
{% if section.type == "normal" %}
{% autoescape false %}{{ section.content }}{% endautoescape %}
{% elif section.type == "exercise" %}
diff --git a/theme/templates/ebook/summary.html b/theme/templates/ebook/summary.html
index ab4b78f..9a67d28 100644
--- a/theme/templates/ebook/summary.html
+++ b/theme/templates/ebook/summary.html
@@ -8,7 +8,7 @@
<li>
{% if item.path %}
{% if !externalLink %}
- <a href="{{ basePath }}/{{ item.path|mdLink }}">{{ item.title }}</a>
+ <a href="{{ basePath }}/{{ item.path|contentLink }}">{{ item.title }}</a>
{% else %}
<a target="_blank" href="{{ item.path }}">{{ item.title }}</a>
{% endif %}
@@ -17,7 +17,7 @@
{% endif %}
{% if item.articles.length > 0 %}
<ol>
- {{ articles(item.articles) }}
+ {{ articles(item.articles) }}
</ol>
{% endif %}
</li>
diff --git a/theme/templates/website/glossary.html b/theme/templates/website/glossary.html
index 4d9683f..5841f5e 100644
--- a/theme/templates/website/glossary.html
+++ b/theme/templates/website/glossary.html
@@ -10,7 +10,7 @@
<h4>Index</h4>
<ul class="glossary-index">
{% for file in item.files %}
- <li><a href="{{ basePath }}/{{ file.path|mdLink }}"><span class="level">{{ file.level }}.</span> {{ file.title }}</a></li>
+ <li><a href="{{ basePath }}/{{ file.path|contentLink }}"><span class="level">{{ file.level }}.</span> {{ file.title }}</a></li>
{% endfor %}
</ul>
</section>
diff --git a/theme/templates/website/includes/exercise.html b/theme/templates/website/includes/exercise.html
deleted file mode 100644
index 42b500f..0000000
--- a/theme/templates/website/includes/exercise.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<div class="header">
- <h2>Exercise</h2>
-</div>
-<div class="alert alert-success">
- <b>Correct!</b>
-</div>
-
-<div class="alert alert-danger error-message">
- <b>False!</b>
-</div>
-
-<div class="message">
- {% autoescape false %}{{ section.content }}{% endautoescape %}
-</div>
-<div class="editor" style="height: {{ section.code.solution|lines*20 }}px">{{ section.code.base }}</div>
-
-<pre class="hidden code-solution">{{ section.code.solution }}</pre>
-<pre class="hidden code-validation">{{ section.code.validation }}</pre>
-{% if section.code.context %}
-<pre class="hidden code-context">{{ section.code.context }}</pre>
-{% endif %}
-
-<div class="buttons">
- <a href="#" class="button size-2 action-submit">Submit</a>
- <a href="#" class="button size-2 action-solution">Solution</a>
-</div>
diff --git a/theme/templates/website/includes/header.html b/theme/templates/website/includes/header.html
index ef2de60..d3fb10e 100644
--- a/theme/templates/website/includes/header.html
+++ b/theme/templates/website/includes/header.html
@@ -12,7 +12,7 @@
</div>
<!-- Actions Right -->
- {% if options.links.sharing.all !== false %}
+ {% if options.links.sharing.all != false %}
<div class="dropdown pull-right">
<a href="#" class="btn toggle-dropdown" aria-label="Toggle share dropdown"><i class="fa fa-share-alt"></i>
</a>
@@ -32,16 +32,16 @@
</div>
{% endif %}
- {% if options.links.sharing.google !== false %}
+ {% if options.links.sharing.google != false %}
<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 %}
+ {% if options.links.sharing.facebook != false %}
<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 %}
+ {% if options.links.sharing.twitter != false %}
<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 options.links.sharing.weibo === true %}
+ {% if options.links.sharing.weibo == true %}
<a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="weibo" aria-label="Share on Weibo"><i class="fa fa-weibo"></i></a>
{% endif %}
diff --git a/theme/templates/website/includes/quiz.html b/theme/templates/website/includes/quiz.html
deleted file mode 100644
index 425fa39..0000000
--- a/theme/templates/website/includes/quiz.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<div class="header">
- <h2>Quiz</h2>
-</div>
-
-<div class="message">
- {% autoescape false %}{{ section.content }}{% endautoescape %}
-</div>
-
-
-{% for quiz in section.quiz %}
-<div class="question">
- <div class="question-header">Question {{ loop.index }} of {{ section.quiz.length }}</div>
-
- <div class="question-content">
- <div class="alert alert-success hidden">
- <b>Correct!</b>
- </div>
-
- <div class="alert alert-danger error-message hidden">
- <p><b>Not quite!</b></p>
- {% autoescape false %}{{ quiz.feedback }}{% endautoescape %}
- </div>
-
- <div class="question-inner">
- {% autoescape false %}{{ quiz.base }}{% endautoescape %}
- </div>
- </div>
-
- <div class="hidden question-answers">
- <div class="question-inner">
- {% autoescape false %}{{ quiz.solution }}{% endautoescape %}
- </div>
- </div>
-</div>
-{% endfor %}
-
-<div class="buttons">
- <a href="#" class="button size-2 action-submit">Submit</a>
- <a href="#" class="button size-2 action-solution">Solution</a>
-</div>
diff --git a/theme/templates/website/includes/summary.html b/theme/templates/website/includes/summary.html
index 3fff7fe..ffe9f16 100644
--- a/theme/templates/website/includes/summary.html
+++ b/theme/templates/website/includes/summary.html
@@ -1,12 +1,12 @@
{% macro articles(_articles) %}
{% for item in _articles %}
{% set externalLink = item.path|isExternalLink %}
- <li class="chapter {% if item.path == _input %}active{% endif %}" data-level="{{ item.level }}" {% if item.path && !externalLink %}data-path="{{ item.path|mdLink }}"{% endif %}>
+ <li class="chapter {% if item.path == _input %}active{% endif %}" data-level="{{ item.level }}" {% if item.path and not externalLink %}data-path="{{ item.path|contentLink }}"{% endif %}>
{% if item.path %}
- {% if !externalLink %}
- <a href="{{ basePath }}/{{ item.path|mdLink }}">
+ {% if not externalLink %}
+ <a href="{{ basePath }}/{{ item.path|contentLink }}">
<i class="fa fa-check"></i>
- {% if item.level !== "0" %}
+ {% if item.level != "0" %}
<b>{{ item.level }}.</b>
{% endif %}
{{ item.title }}
@@ -14,7 +14,7 @@
{% else %}
<a target="_blank" href="{{ item.path }}">
<i class="fa fa-check"></i>
- {% if item.level !== "0" %}
+ {% if item.level != "0" %}
<b>{{ item.level }}.</b>
{% endif %}
{{ item.title }}
@@ -25,7 +25,7 @@
{% endif %}
{% if item.articles.length > 0 %}
<ul class="articles">
- {{ articles(item.articles) }}
+ {{ articles(item.articles) }}
</ul>
{% endif %}
</li>
@@ -53,7 +53,7 @@
{{ articles(summary.chapters) }}
- {% if options.links.gitbook !== false %}
+ {% if options.links.gitbook != false %}
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">Published using GitBook</a>
diff --git a/theme/templates/website/page.html b/theme/templates/website/page.html
index 91f2162..37fc9dd 100644
--- a/theme/templates/website/page.html
+++ b/theme/templates/website/page.html
@@ -1,20 +1,20 @@
{% extends "./layout.html" %}
{% block head %}
- {% parent %}
+ {{ super() }}
{% if progress.current.next and progress.current.next.path %}
- <link rel="next" href="{{ basePath }}/{{ progress.current.next.path|mdLink }}" />
+ <link rel="next" href="{{ basePath }}/{{ progress.current.next.path|contentLink }}" />
{% endif %}
{% if progress.current.prev and progress.current.prev.path %}
- <link rel="prev" href="{{ basePath }}/{{ progress.current.prev.path|mdLink }}" />
+ <link rel="prev" href="{{ basePath }}/{{ progress.current.prev.path|contentLink }}" />
{% endif %}
{% endblock %}
{% block title %}{{ progress.current.title }} | {{ title }}{% endblock %}
-{% block description %}{% if progress.current.level == "0" %}{{ description }}{% endif %}{% endblock %}
+{% block description %}{% if progress.current.level == "0" %}{{ description }}{% endif %}{% endblock %}
{% block content %}
- <div class="book" data-level="{{ progress.current.level }}" data-basepath="{{ basePath }}" data-revision="{{ revision }}">
+ <div class="book" data-level="{{ progress.current.level }}" data-basepath="{{ basePath }}" data-revision="{{ revision }}">
{% include "includes/summary.html" %}
<div class="book-body">
<div class="body-inner">
@@ -23,13 +23,9 @@
<div class="page-inner">
{% block page_inner %}
{% for section in content %}
- <section class="{{ section.type }}" id="section-{{ section.id }}">
+ <section class="{{ section.type }}" id="section-{{ section.id }}">
{% if section.type == "normal" %}
{% autoescape false %}{{ section.content }}{% endautoescape %}
- {% elif section.type == "exercise" %}
- {% include "./includes/exercise.html" with {section: section} %}
- {% elif section.type == "quiz" %}
- {% include "./includes/quiz.html" with {section: section} %}
{% endif %}
</section>
{% endfor %}
@@ -39,10 +35,10 @@
</div>
{% if progress.current.prev and progress.current.prev.path %}
- <a href="{{ basePath }}/{{ progress.current.prev.path|mdLink }}" class="navigation navigation-prev {% if !progress.current.next or !progress.current.next.path %}navigation-unique{% endif %}" aria-label="Previous page: {{ progress.current.prev.title }}"><i class="fa fa-angle-left"></i></a>
+ <a href="{{ basePath }}/{{ progress.current.prev.path|contentLink }}" class="navigation navigation-prev {% if not (progress.current.next and progress.current.next.path) %}navigation-unique{% endif %}" aria-label="Previous page: {{ progress.current.prev.title }}"><i class="fa fa-angle-left"></i></a>
{% endif %}
{% if progress.current.next and progress.current.next.path %}
- <a href="{{ basePath }}/{{ progress.current.next.path|mdLink }}" class="navigation navigation-next {% if !progress.current.prev or !progress.current.prev.path %}navigation-unique{% endif %}" aria-label="Next page: {{ progress.current.next.title }}"><i class="fa fa-angle-right"></i></a>
+ <a href="{{ basePath }}/{{ progress.current.next.path|contentLink }}" class="navigation navigation-next {% if not (progress.current.prev or progress.current.prev.path) %}navigation-unique{% endif %}" aria-label="Next page: {{ progress.current.next.title }}"><i class="fa fa-angle-right"></i></a>
{% endif %}
</div>
</div>