Use definition lists, not tables

The use of tables provides a compact output of config information but
also results in squashed descriptions of various config options.
Definition lists, on the other hand, use more vertical space but make
far more effective use of the horizontal real estate available to us.
Let's use them.

Change-Id: I7a4087c77e3aab8ddead4b30c5aa4e3b31b56704
This commit is contained in:
Stephen Finucane 2017-02-21 13:49:57 -05:00
parent efdab278fc
commit e7add7c8a4
2 changed files with 29 additions and 34 deletions

View File

@ -10,36 +10,34 @@
.. _{{ label }}:
.. list-table:: Description of {{ nice_cat }} configuration options
:header-rows: 1
:class: config-ref-table
{{ nice_cat }}
-----------------------------------------------------------------------
* - Configuration option = Default value
- Description
{% for group in groups %}
* - **[{{ group }}]**
-
{{ group }}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{% for item in items[loop.index0] %}
{% if item[2] is equalto '' %}
* - ``{{ item[0] }}`` =
``{{ item[0] }}`` ({{ item[1] }})
{% if item[2] is not equalto '' %}
Default: ``{{ item[2] }}``
{% else %}
* - ``{{ item[0] }}`` = ``{{ item[2] }}``
Default: (none provided)
{% endif %}
{% for paragraph in item[3] %}
{% if loop.first %}
- ({{ item [1] }}) {{ paragraph }}
{% else %}
{{ paragraph }}
{% endif %}
{{ paragraph }}
{% endfor %}
{% if item[4] %}
Flags:
{% for flagname, flagdesc in item[4] %}
- **{{ flagname }}**
- **{{ flagname }}**
{{ flagdesc }}
{% endfor %}
{{ flagdesc }}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}

View File

@ -10,31 +10,28 @@
.. _{{ label }}:
.. list-table:: Description of {{ group }} configuration options
:header-rows: 1
:class: config-ref-table
* - Configuration option = Default value
- Description
{{ group }}
-----------------------------------------------------------------------
{% for item in items %}
{% if item[2] is equalto '' %}
* - ``{{ item[0] }}`` =
``{{ item[0] }}`` ({{ item[1] }})
{% if item[2] is not equalto '' %}
Default: ``{{ item[2] }}``
{% else %}
* - ``{{ item[0] }}`` = ``{{ item[2] }}``
Default: (none provided)
{% endif %}
{% for paragraph in item[3] %}
{% if loop.first %}
- ({{ item [1] }}) {{ paragraph }}
{% else %}
{{ paragraph }}
{% endif %}
{{ paragraph }}
{% endfor %}
{% if item[4] %}
Flags:
{% for flagname, flagdesc in item[4] %}
- **{{ flagname }}**
- **{{ flagname }}**
{{ flagdesc }}
{{ flagdesc }}
{% endfor %}
{% endif %}
{% endfor %}