From 8bd9c4449c87f5dd8dc076afd38a63e59c349463 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 6 Apr 2018 19:24:43 +0200 Subject: [PATCH] Theme-related Documentation Enhancements - Consistent background color in all types of codes - Improve dd (list item) padding - Link to Index in global TOC in navbar - Briefly describe Instaloader in `index.html` title - Remove page contents (navbartoc) in index, genindex and installation - Link to new pypi.org rather than old pypi.python.org --- docs/_static/style.css | 11 ++++++++++- docs/_templates/globaltoc.html | 14 ++++++++++++++ docs/_templates/layout.html | 7 +++++++ docs/_templates/navbar.html | 6 +++--- docs/conf.py | 2 +- docs/index.rst | 8 +++++--- 6 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 docs/_templates/globaltoc.html diff --git a/docs/_static/style.css b/docs/_static/style.css index f34d322..c603332 100644 --- a/docs/_static/style.css +++ b/docs/_static/style.css @@ -1,3 +1,12 @@ code { color: #222; -} \ No newline at end of file + background-color: #f5f5f5; +} + +dd { + padding-left: 8px; +} + +dl.option dd { + padding-left: 12px; +} diff --git a/docs/_templates/globaltoc.html b/docs/_templates/globaltoc.html new file mode 100644 index 0000000..a832919 --- /dev/null +++ b/docs/_templates/globaltoc.html @@ -0,0 +1,14 @@ + diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index e722476..9dcc05b 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,4 +1,11 @@ {% extends "!layout.html" %} +{% block htmltitle %} + {% if pagename == "index" %} + {{ title|striptags|e }} + {% else %} + {{ title|striptags|e }}{{ titlesuffix }} + {% endif %} +{% endblock %} {% block extrahead %} {{ super() }} diff --git a/docs/_templates/navbar.html b/docs/_templates/navbar.html index ecb9852..382d0c7 100644 --- a/docs/_templates/navbar.html +++ b/docs/_templates/navbar.html @@ -14,7 +14,7 @@ {% if theme_navbar_title -%}{{ theme_navbar_title|e }}{%- else -%}{{ project|e }}{%- endif -%} - v{{current_release}} + v{{current_release}} @@ -27,7 +27,7 @@ {% endif %} {% block navbartoc %} {% include "globaltoc.html" %} - {% if theme_navbar_pagenav %} + {% if theme_navbar_pagenav and pagename not in ("index", "genindex", "installation") %} {% include "navbartoc.html" %} {% endif %} {% endblock %} @@ -46,7 +46,7 @@