diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html index 88c5990..771a9ee 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html @@ -4,7 +4,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} -

{{ section.title or lang.t("Attributes:") }}

+

{{ section.title or lang.t("Attributes:") }}

@@ -15,7 +15,7 @@ {% for attribute in section.value %} - +
{{ attribute.name }} {% if attribute.annotation %} @@ -36,10 +36,10 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

{{ section.title or lang.t("Attributes:") }}

+

{{ section.title or lang.t("Attributes:") }}

    {% for attribute in section.value %} -
  • +
  • {{ attribute.name }} {% if attribute.annotation %} {% with expression = attribute.annotation %} @@ -59,13 +59,13 @@ - - + + {% for attribute in section.value %} - +
    {{ (section.title or lang.t("ATTRIBUTE")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}{{ (section.title or lang.t("ATTRIBUTE")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
    {{ attribute.name }}
    diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html index b8ad2e0..054cf5a 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html @@ -4,7 +4,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} -

    {{ section.title or lang.t("Classes:") }}

    +

    {{ section.title or lang.t("Classes:") }}

    @@ -14,7 +14,7 @@ {% for class in section.value %} - +
    {{ class.name }}
    @@ -28,10 +28,10 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

    {{ section.title or lang.t("Classes:") }}

    +

    {{ section.title or lang.t("Classes:") }}

      {% for class in section.value %} -
    • +
    • {{ class.name }}
      @@ -46,13 +46,13 @@ - - + + {% for class in section.value %} - +
      {{ (section.title or lang.t("CLASS")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}{{ (section.title or lang.t("CLASS")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
      {{ class.name }}
      diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html index bbec5e2..5305efa 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html @@ -2,7 +2,7 @@ {% import "language.html" as lang with context %} -

      {{ section.title or lang.t("Examples:") }}

      +

      {{ section.title or lang.t("Examples:") }}

      {% for section_type, sub_section in section.value %} {% if section_type.value == "text" %} {{ sub_section|convert_markdown(heading_level, html_id) }} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html index ab1939f..a16917b 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html @@ -4,7 +4,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} -

      {{ section.title or lang.t("Methods:") if obj.is_class else lang.t("Functions:") }}

      +

      {{ section.title or lang.t("Methods:") if obj.is_class else lang.t("Functions:") }}

      @@ -15,7 +15,7 @@ {% for function in section.value %} {% if not function.name == "__init__" or not config.merge_init_into_class %} - +
      {{ function.name }}
      @@ -30,11 +30,11 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

      {{ section.title or lang.t("Methods:") if obj.is_class else lang.t("Functions:") }}

      +

      {{ section.title or lang.t("Methods:") if obj.is_class else lang.t("Functions:") }}

        {% for function in section.value %} {% if not function.name == "__init__" or not config.merge_init_into_class %} -
      • +
      • {{ function.name }}
        @@ -50,14 +50,14 @@ - - + + {% for function in section.value %} {% if not function.name == "__init__" or not config.merge_init_into_class %} - +
        {{ (section.title or lang.t("METHOD") if obj.is_class else lang.t("FUNCTION")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}{{ (section.title or lang.t("METHOD") if obj.is_class else lang.t("FUNCTION")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
        {{ function.name }}
        diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html index f771f20..26b3825 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html @@ -4,7 +4,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} -

        {{ section.title or lang.t("Modules:") }}

        +

        {{ section.title or lang.t("Modules:") }}

        @@ -14,7 +14,7 @@ {% for module in section.value %} - +
        {{ module.name }}
        @@ -28,10 +28,10 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

        {{ section.title or lang.t("Modules:") }}

        +

        {{ section.title or lang.t("Modules:") }}

          {% for module in section.value %} -
        • +
        • {{ module.name }}
          @@ -46,13 +46,13 @@ - - + + {% for module in section.value %} - +
          {{ (section.title or lang.t("MODULE")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}{{ (section.title or lang.t("MODULE")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
          {{ module.name }}
          diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html index 7ede671..f31836a 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html @@ -4,7 +4,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} -

          {{ section.title or lang.t("Other Parameters:") }}

          +

          {{ section.title or lang.t("Other Parameters:") }}

          @@ -15,7 +15,7 @@ {% for parameter in section.value %} - +
          {{ parameter.name }} {% if parameter.annotation %} @@ -36,10 +36,10 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

          {{ section.title or lang.t("Other Parameters:") }}

          +

          {{ section.title or lang.t("Other Parameters:") }}

            {% for parameter in section.value %} -
          • +
          • {{ parameter.name }} {% if parameter.annotation %} {% with expression = parameter.annotation %} @@ -59,13 +59,13 @@ - - + + {% for parameter in section.value %} - +
            {{ (section.title or lang.t("PARAMETER")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}{{ (section.title or lang.t("PARAMETER")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
            {{ parameter.name }}
            diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html index 7b4788c..05bdade 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html @@ -4,7 +4,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} -

            {{ section.title or lang.t("Parameters:") }}

            +

            {{ section.title or lang.t("Parameters:") }}

            @@ -16,7 +16,7 @@ {% for parameter in section.value %} - +
            {{ parameter.name }} {% if parameter.annotation %} @@ -46,10 +46,10 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

            {{ section.title or lang.t("Parameters:") }}

            +

            {{ section.title or lang.t("Parameters:") }}

              {% for parameter in section.value %} -
            • +
            • {{ parameter.name }} {% if parameter.annotation %} {% with expression = parameter.annotation %} @@ -74,13 +74,13 @@ - - + + {% for parameter in section.value %} - +
              {{ (section.title or lang.t("PARAMETER")).rstrip(":").upper() }} {{ lang.t("DESCRIPTION") }}{{ (section.title or lang.t("PARAMETER")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
              {{ parameter.name }}
              diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html index 396ccc7..5e20b65 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html @@ -4,7 +4,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} -

              {{ section.title or lang.t("Raises:") }}

              +

              {{ section.title or lang.t("Raises:") }}

              @@ -14,7 +14,7 @@ {% for raises in section.value %} - +
              {% if raises.annotation %} {% with expression = raises.annotation %} @@ -34,10 +34,10 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

              {{ lang.t(section.title) or lang.t("Raises:") }}

              +

              {{ lang.t(section.title) or lang.t("Raises:") }}

                {% for raises in section.value %} -
              • +
              • {% if raises.annotation %} {% with expression = raises.annotation %} {% include "expression.html" with context %} @@ -56,13 +56,13 @@ - - + + {% for raises in section.value %} - +
                {{ (section.title or lang.t("RAISES")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}{{ (section.title or lang.t("RAISES")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
                {% with expression = raises.annotation %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html index 77d83c0..e03e8b8 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html @@ -5,7 +5,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} {% set name_column = section.value|selectattr("name")|any %} -

                {{ section.title or lang.t("Receives:") }}

                +

                {{ section.title or lang.t("Receives:") }}

                @@ -16,7 +16,7 @@ {% for receives in section.value %} - + {% if name_column %}{% endif %}
                {% if receives.name %}{{ receives.name }}{% endif %} {% if receives.annotation %} @@ -37,10 +37,10 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

                {{ section.title or lang.t("Receives:") }}

                +

                {{ section.title or lang.t("Receives:") }}

                  {% for receives in section.value %} -
                • +
                • {% if receives.name %}{{ receives.name }}{% endif %} {% if receives.annotation %} {% with expression = receives.annotation %} @@ -62,13 +62,13 @@ - - + + {% for receives in section.value %} - +
                  {{ (section.title or lang.t("RECEIVES")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}{{ (section.title or lang.t("RECEIVES")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
                  {% if receives.name %} {{ receives.name }} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html index b19917a..a7a7cb9 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html @@ -5,7 +5,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} {% set name_column = section.value|selectattr("name")|any %} -

                  {{ section.title or lang.t("Returns:") }}

                  +

                  {{ section.title or lang.t("Returns:") }}

                  @@ -16,7 +16,7 @@ {% for returns in section.value %} - + {% if name_column %}{% endif %}
                  {% if returns.name %}{{ returns.name }}{% endif %} {% if returns.annotation %} @@ -37,10 +37,10 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

                  {{ section.title or lang.t("Returns:") }}

                  +

                  {{ section.title or lang.t("Returns:") }}

                    {% for returns in section.value %} -
                  • +
                  • {% if returns.name %}{{ returns.name }}{% endif %} {% if returns.annotation %} {% with expression = returns.annotation %} @@ -62,13 +62,13 @@ - - + + {% for returns in section.value %} - +
                    {{ (section.title or lang.t("RETURNS")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION").upper() }}{{ (section.title or lang.t("RETURNS")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION").upper() }}
                    {% if returns.name %} {{ returns.name }} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html index 8377669..a9bdae2 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html @@ -4,7 +4,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} -

                    {{ section.title or lang.t("Warns:") }}

                    +

                    {{ section.title or lang.t("Warns:") }}

                    @@ -14,7 +14,7 @@ {% for warns in section.value %} - +
                    {% if warns.annotation %} {% with expression = warns.annotation %} @@ -34,10 +34,10 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

                    {{ section.title or lang.t("Warns:") }}

                    +

                    {{ section.title or lang.t("Warns:") }}

                      {% for warns in section.value %} -
                    • +
                    • {% if warns.annotation %} {% with expression = warns.annotation %} {% include "expression.html" with context %} @@ -56,13 +56,13 @@ - - + + {% for warns in section.value %} - +
                      {{ (section.title or lang.t("WARNS")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}{{ (section.title or lang.t("WARNS")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
                      {% with expression = warns.annotation %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html index c69135e..6c4cb0b 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html @@ -5,7 +5,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} {% set name_column = section.value|selectattr("name")|any %} -

                      {{ section.title or lang.t("Yields:") }}

                      +

                      {{ section.title or lang.t("Yields:") }}

                      @@ -16,7 +16,7 @@ {% for yields in section.value %} - + {% if name_column %}{% endif %}
                      {% if yields.name %}{{ yields.name }}{% endif %} {% if yields.annotation %} @@ -37,10 +37,10 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} -

                      {{ section.title or lang.t("Yields:") }}

                      +

                      {{ section.title or lang.t("Yields:") }}

                        {% for yields in section.value %} -
                      • +
                      • {% if yields.name %}{{ yields.name }}{% endif %} {% if yields.annotation %} {% with expression = yields.annotation %} @@ -62,13 +62,13 @@ - - + + {% for yields in section.value %} - +
                        {{ (section.title or lang.t("YIELDS")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}{{ (section.title or lang.t("YIELDS")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
                        {% if yields.name %} {{ yields.name }} diff --git a/src/mkdocstrings_handlers/python/templates/material/style.css b/src/mkdocstrings_handlers/python/templates/material/style.css index 805c64c..154be85 100644 --- a/src/mkdocstrings_handlers/python/templates/material/style.css +++ b/src/mkdocstrings_handlers/python/templates/material/style.css @@ -25,6 +25,11 @@ float: right; } +/* Backward-compatibility: docstring section titles in bold. */ +.doc-section-title { + font-weight: bold; +} + /* Symbols in Navigation and ToC. */ :root, [data-md-color-scheme="default"] {