Quellcode durchsuchen

Show documentation TOC in a left sidebar

JC Brand vor 7 Jahren
Ursprung
Commit
061832df41

+ 22 - 0
docs/source/_static/style.css

@@ -28,6 +28,28 @@ h5 {
     margin-right: 0.5em;
     margin-right: 0.5em;
 }
 }
 
 
+.nav-header {
+    font-weight: bold;
+    font-size: 110%;
+}
+
+.sidebar-title {
+    padding-left: 15px;
+}
+
+#sidebar > .nav-list {
+    height: 100vh;
+    overflow-y: scroll;
+}
+
+.bs-sidenav .nav .nav > li > a {
+    font-size: 100%;
+}
+.bs-sidenav .nav .nav .nav > li > a {
+    font-size: 90%;
+	color: gray;
+}
+
 /*
 /*
 Copyright (c) 2012 Terrence Ryan
 Copyright (c) 2012 Terrence Ryan
 
 

+ 13 - 0
docs/source/_templates/localtoc.html

@@ -0,0 +1,13 @@
+{#
+    basic/localtoc.html
+    ~~~~~~~~~~~~~~~~~~~
+
+    Sphinx sidebar template: local table of contents.
+
+    :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+#}
+{%- if display_toc %}
+  <h3 class="sidebar-title"><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
+  {{ toc }}
+{%- endif %}

+ 2 - 2
docs/source/conf.py

@@ -41,7 +41,7 @@ master_doc = 'index'
 
 
 # General information about the project.
 # General information about the project.
 project = u'Converse.js'
 project = u'Converse.js'
-copyright = u'2014, JC Brand'
+copyright = u'2017, JC Brand'
 
 
 # The version info for the project you're documenting, acts as replacement for
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # |version| and |release|, also used in various other places throughout the
@@ -177,7 +177,7 @@ html_favicon = "_static/favicon.ico"
 #html_use_smartypants = True
 #html_use_smartypants = True
 
 
 # Custom sidebar templates, maps document names to template names.
 # Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
+html_sidebars = {'**': ['localtoc.html', 'sourcelink.html', 'searchbox.html']}
 
 
 # Additional templates that should be rendered to pages, maps page names to
 # Additional templates that should be rendered to pages, maps page names to
 # template names.
 # template names.

+ 0 - 4
docs/source/configuration.rst

@@ -6,10 +6,6 @@
 Configuration
 Configuration
 =============
 =============
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 The included minified JS and CSS files can be used for demoing or testing, but
 The included minified JS and CSS files can be used for demoing or testing, but
 you'll want to configure *Converse.js* to suit your needs before you deploy it
 you'll want to configure *Converse.js* to suit your needs before you deploy it
 on your website.
 on your website.

+ 0 - 4
docs/source/developer_api.rst

@@ -6,10 +6,6 @@
 The converse.js developer API
 The converse.js developer API
 =============================
 =============================
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 .. note:: The API documented here is available in Converse.js 0.8.4 and higher.
 .. note:: The API documented here is available in Converse.js 0.8.4 and higher.
         Earlier versions of Converse.js might have different API methods or none at all.
         Earlier versions of Converse.js might have different API methods or none at all.
 
 

+ 0 - 4
docs/source/developer_guidelines.rst

@@ -5,10 +5,6 @@
 Developer guidelines
 Developer guidelines
 ====================
 ====================
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 If you want to work with the non-minified JavaScript and CSS files you'll soon
 If you want to work with the non-minified JavaScript and CSS files you'll soon
 notice that there are references to a missing *node_modules* directory.
 notice that there are references to a missing *node_modules* directory.
 Please follow the instructions below to create these directories and fetch Converse's
 Please follow the instructions below to create these directories and fetch Converse's

+ 0 - 4
docs/source/documentation.rst

@@ -6,10 +6,6 @@
 Writing Documentation
 Writing Documentation
 =====================
 =====================
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 .. note:: Contributions to the documentation are much appreciated.
 .. note:: Contributions to the documentation are much appreciated.
 
 
 What is used to write the documentation?
 What is used to write the documentation?

+ 0 - 4
docs/source/events.rst

@@ -7,10 +7,6 @@
 Events and promises
 Events and promises
 ===================
 ===================
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 Converse.js and its plugins emit various events which you can listen to via the
 Converse.js and its plugins emit various events which you can listen to via the
 :ref:`listen-grouping`.
 :ref:`listen-grouping`.
 
 

+ 0 - 4
docs/source/features.rst

@@ -6,10 +6,6 @@
 Features
 Features
 ========
 ========
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 Off-the-record encryption
 Off-the-record encryption
 =========================
 =========================
 
 

+ 0 - 4
docs/source/manual.rst

@@ -10,10 +10,6 @@ The Converse.js User Manual
 
 
    <br />
    <br />
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 .. figure:: images/homepage.jpg
 .. figure:: images/homepage.jpg
    :align: right
    :align: right
    :alt: The converse.js website
    :alt: The converse.js website

+ 0 - 4
docs/source/other_frameworks.rst

@@ -5,10 +5,6 @@
 Integrating converse.js into other frameworks
 Integrating converse.js into other frameworks
 =============================================
 =============================================
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 Angular.js
 Angular.js
 ----------
 ----------
 
 

+ 0 - 4
docs/source/plugin_development.rst

@@ -7,10 +7,6 @@
 Writing a plugin
 Writing a plugin
 ================
 ================
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 Introduction
 Introduction
 ------------
 ------------
 
 

+ 0 - 4
docs/source/setup.rst

@@ -6,10 +6,6 @@
 Setup and integration
 Setup and integration
 =====================
 =====================
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 .. _what-you-will-need:
 .. _what-you-will-need:
 
 
 ------------------
 ------------------

+ 0 - 4
docs/source/style_guide.rst

@@ -5,10 +5,6 @@
 Software Style Guide
 Software Style Guide
 ====================
 ====================
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 .. note:: Converse.js doesn't yet use any of the new `ES2015
 .. note:: Converse.js doesn't yet use any of the new `ES2015
     <https://babeljs.io/docs/learn-es2015/>`_ features, because we don't
     <https://babeljs.io/docs/learn-es2015/>`_ features, because we don't
     rely on a transpiler and still support older browsers.
     rely on a transpiler and still support older browsers.

+ 0 - 4
docs/source/theming.rst

@@ -8,10 +8,6 @@
 Theming
 Theming
 =======
 =======
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 Setting up your environment
 Setting up your environment
 ===========================
 ===========================
 
 

+ 0 - 4
docs/source/translations.rst

@@ -6,10 +6,6 @@
 Translations
 Translations
 ============
 ============
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 .. note::
 .. note::
    Translations take up a lot of space and will bloat your minified file.
    Translations take up a lot of space and will bloat your minified file.
    At the time of writing, all the translations add about 50KB of extra data to
    At the time of writing, all the translations add about 50KB of extra data to

+ 0 - 4
docs/source/troubleshooting.rst

@@ -6,10 +6,6 @@
 Troubleshooting and debugging
 Troubleshooting and debugging
 =============================
 =============================
 
 
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
 General tips on debugging Converse.js
 General tips on debugging Converse.js
 =====================================
 =====================================