Skip to content

[discussion] Consider modularity of different page components #330

@bollwyvl

Description

@bollwyvl

... Do you think that the _templates folder is a better place for these links? https://github.com/pydata/pydata-sphinx-theme/tree/master/pydata_sphinx_theme/_templates

I think of _templates as being more like "components", little snippets of HTML that could be put in other parts of the page as well for themes that are sub-theming this one. The .html in folder above _templates I think of more as defining the major structure of the theme (sidebars, top bar, etc). What do folks think?

from #293 (comment), regarding

Goal

Make the overall template/file architecture more modular, minimizing downstream breakage of sites using existing template identifiers.

Motivation

A number of components, such as the "icon links" section proposed in #293, are potentially block-level constructs, which could be re-combined more flexibly in the _templates folder. These could be overridden at a more modular level, but currently have id-level constructs in the DOM/CSS.

Design ideas

The following components are candidates for being moved into _templates.

  • icon-links.html
  • search-related things
  • ...

Criteria

For a successful migration, the default theme should maintain an existing id that meets existing styling need, but allow for a new class-ful variant.

Accessibility

As a component is migrated, it would be worth strongly-considering whether the tags chosen (an abundance of div, span and i) could be replaced with more readily screen-reader interpretable DOM (e.g. article, section). The existing tag names be maintained, and tested, with a transition plan to replace them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions