Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ Context:

{% set attribute_name = attribute.path if show_full_path else attribute.name %}

{% set object_type = "data" if attribute.parent.is_module else "property" if "property" in attribute.labels else "attribute" %}
{#- Object type in objects inventory. -#}

{% if not root or config.show_root_heading %}
{% filter heading(
heading_level,
role=("data" if attribute.parent.kind.value == "module" else "attr"),
role=object_type,
id=html_id,
class="doc doc-heading",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else attribute.name),
Expand Down Expand Up @@ -89,7 +92,7 @@ Context:

{% if config.show_root_toc_entry %}
{% filter heading(heading_level,
role=("data" if attribute.parent.kind.value == "module" else "attr"),
role=object_type,
id=html_id,
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else attribute_name),
hidden=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Context:

{% block inheritance_diagram scoped %}
{#- Inheritance diagram block.

This block renders the inheritance diagram for the class,
using Mermaid syntax and a bit of JavaScript to make the nodes clickable,
linking to the corresponding class documentation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Context:
{% if config.parameter_headings %}
{% filter heading(
heading_level + 1,
role="param",
role="parameter",
id=html_id ~ "(" ~ parameter.name ~ ")",
class="doc doc-heading doc-heading-parameter",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-parameter"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + parameter.name,
Expand Down Expand Up @@ -86,7 +86,7 @@ Context:
{% if config.parameter_headings %}
{% filter heading(
heading_level + 1,
role="param",
role="parameter",
id=html_id ~ "(" ~ parameter.name ~ ")",
class="doc doc-heading doc-heading-parameter",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-parameter"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + parameter.name,
Expand Down Expand Up @@ -132,7 +132,7 @@ Context:
{% if config.parameter_headings %}
{% filter heading(
heading_level + 1,
role="param",
role="parameter",
id=html_id ~ "(" ~ parameter.name ~ ")",
class="doc doc-heading doc-heading-parameter",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-parameter"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + parameter.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Context:
{% if config.type_parameter_headings %}
{% filter heading(
heading_level + 1,
role="typeparam",
role="typeparameter",
id=obj.path ~ "[" ~ type_parameter.name ~ "]",
class="doc doc-heading doc-heading-type_parameter",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-type_parameter"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + type_parameter.name,
Expand Down Expand Up @@ -93,7 +93,7 @@ Context:
{% if config.type_parameter_headings %}
{% filter heading(
heading_level + 1,
role="typeparam",
role="typeparameter",
id=obj.path ~ "[" ~ type_parameter.name ~ "]",
class="doc doc-heading doc-heading-type_parameter",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-type_parameter"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + type_parameter.name,
Expand Down Expand Up @@ -156,7 +156,7 @@ Context:
{% if config.type_parameter_headings %}
{% filter heading(
heading_level + 1,
role="typeparam",
role="typeparameter",
id=obj.path ~ "[" ~ type_parameter.name ~ "]",
class="doc doc-heading doc-heading-type_parameter",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-type_parameter"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + type_parameter.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ Context:
{#- Brief or full function name depending on configuration. -#}
{% set symbol_type = "method" if function.parent.is_class else "function" %}
{#- Symbol type: method when parent is a class, function otherwise. -#}
{% set object_type = symbol_type %}
{#- Object type in objects inventory. -#}

{% if not root or config.show_root_heading %}
{% filter heading(
heading_level,
role="function",
role=object_type,
id=html_id,
class="doc doc-heading",
toc_label=(('<code class="doc-symbol doc-symbol-toc doc-symbol-' + symbol_type + '"></code>&nbsp;')|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else function.name),
Expand Down Expand Up @@ -106,7 +108,7 @@ Context:
{% if config.show_root_toc_entry %}
{% filter heading(
heading_level,
role="function",
role=object_type,
id=html_id,
toc_label=(('<code class="doc-symbol doc-symbol-toc doc-symbol-' + symbol_type + '"></code>&nbsp;')|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else function.name),
hidden=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Context:
{% if not root or config.show_root_heading %}
{% filter heading(
heading_level,
role="typealias",
role="type",
id=html_id,
class="doc doc-heading",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-type_alias"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + type_alias.name,
Expand Down Expand Up @@ -83,7 +83,7 @@ Context:
{% else %}
{% if config.show_root_toc_entry %}
{% filter heading(heading_level,
role="typealias",
role="type",
id=html_id,
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-type_alias"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + type_alias.name,
hidden=True,
Expand Down
Loading