diff --git a/src/base.html b/src/base.html index 661ce6f82..83365855e 100644 --- a/src/base.html +++ b/src/base.html @@ -53,7 +53,7 @@ + href="https://fonts.googleapis.com/css?family=Ubuntu:400,700" /> @@ -95,6 +95,14 @@
+ + {% set h1 = "\x3c/h1\x3e" in content %} +
{% include "drawer.html" %} @@ -105,12 +113,13 @@
- {% if page_title %} -

{{ page_title }}

- {% else %} -

{{ site_name }}

+ {% if not h1 %} + {% if page_title %} +

{{ page_title }}

+ {% else %} +

{{ site_name }}

+ {% endif %} {% endif %} -
{{ content }} diff --git a/src/drawer.html b/src/drawer.html index 1e8ffe5cb..931b9f610 100644 --- a/src/drawer.html +++ b/src/drawer.html @@ -58,7 +58,7 @@
    {% for nav_item in nav %} - {% include "toc.html" %} + {% include "nav.html" %} {% endfor %} diff --git a/src/nav.html b/src/nav.html new file mode 100644 index 000000000..b967633fc --- /dev/null +++ b/src/nav.html @@ -0,0 +1,59 @@ + +{% if nav_item.children %} +
  • +
    + {{ nav_item.title }} +
      + + + {% for nav_item in nav_item.children %} + {% include 'nav.html' %} + {% endfor %} +
    +
  • + + +{% else %} +
  • + + {{ nav_item.title }} + + + + {% if nav_item == current_page %} + + {% endif %} +
  • +{% endif %} \ No newline at end of file diff --git a/src/toc.html b/src/toc.html deleted file mode 100644 index f0167b82b..000000000 --- a/src/toc.html +++ /dev/null @@ -1,37 +0,0 @@ - -{% if nav_item.children %} -
  • -
    - {{ nav_item.title }} -
      - - - {% for nav_item in nav_item.children %} - {% include 'toc.html' %} - {% endfor %} -
    -
  • - - -{% else %} -
  • - - {{ nav_item.title }} - - - - {% if nav_item == current_page %} - - {% endif %} -
  • -{% endif %} \ No newline at end of file