Cleaning up detail page formatting and order

This commit is contained in:
Anthony Johnson 2015-04-14 19:55:46 -07:00
parent 6aa8ced49f
commit 655aff0245

View File

@ -8,53 +8,60 @@
{% endblock %} {% endblock %}
{% block summary %} {% block summary %}
{%- if object.summary %}
Summary Summary
------- -------
{{ summary }} {{ summary }}
{%- endif %}
{% endblock %} {% endblock %}
{% block inheritance %} {% block inheritance %}
{%- if object.inheritance %}
Inheritance Hierarchy Inheritance Hierarchy
--------------------- ---------------------
{% for item in inheritance %} {%- for item in inheritance %}
* :ref:`{{ item.id }}` * :dn:{{ item.ref_directive }}:`{{ item.id }}`
{% endfor %} {%- endfor %}
{%- endif %}
{% endblock %} {% endblock %}
{% block syntax %} {% block syntax %}
{%- if object.example %}
Syntax Syntax
------ ------
.. code-block:: csharp .. code-block:: csharp
{{ syntax }} {{ example }}
{%- endif %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% if item_map %} {%- macro display_type(item_type) %}
{%- if item_type in item_map %}
{% for obj_type, obj_list in item_map.items() %} {{ item_type.title() }}
{{ "-" * item_type|length }}
{{ obj_type }} {%- for obj_item in item_map.get(item_type, []) %}
{{ "-" * obj_type|length }}
{% for obj_item in obj_list %}
{% macro render() %}{{ obj_item.render() }}{% endmacro %} {% macro render() %}{{ obj_item.render() }}{% endmacro %}
{{ render()|indent(0) }} {{ render()|indent(0) }}
{% endfor %} {%- endfor %}
{%- endif %}
{%- endmacro %}
{% endfor %} {%- for item_type in ['constructor', 'method', 'field', 'property',
'event', 'operator'] %}
{% endif %} {{ display_type(item_type) }}
{%- endfor %}
{% endblock %} {% endblock %}