.. index:: ! Styling .. _styling: ======= Styling ======= The plugins and the project page of this extension render their markup with the class system of the academic extensions and ship no styling for it. The system, the classes of Bootstrap it keeps and how a site package styles the markup are described once, in the chapter `Styling of academic_base `__. This chapter shows how the markup of this extension is built up. .. contents:: :local: :depth: 1 .. _styling-outermost-element: The outermost elements ====================== .. list-table:: :header-rows: 1 :widths: 30 35 35 * - Plugin or page - Content element or page type - Outermost element * - Project list - `academicprojects_projectlist` - `academic-projects-list` * - Project list of selected projects - `academicprojects_projectlistsingle` - `academic-projects-list` * - Project page - the page type of a project - `academic-projects-page container` Both plugins render the same template, so a rule for one applies to the other. .. _styling-list: The project list ================ .. code-block:: html

12 projects

…
* The filter bar holds the sorting selects, one filter per category type, the further filters inside the :html:`
` with its :html:``, and the select of the active state. The form submits itself when a select changes. * The active filters and the reset link are wrapped in an `ace-filters` of their own, which the partner and program lists do not render. A rule for `.ace-filters` therefore applies to the filter bar and to the active filters of this list. An active state other than :guilabel:`All` is an active filter as well. * The active filters, the reset link and the count are only rendered when the content element switches them on. * A list without projects renders the message in a :html:`` in place of the item list. .. _styling-item: A project --------- .. code-block:: html * The state is only rendered when the content element switches the state badge on. Its second class is the state of the project, `active` or `completed`. * The short description is a rich text field and therefore a `ce-bodytext`. * The attributes are the categories of the project, one `ace-attribute` per category type. .. _styling-page: The project page ================ .. code-block:: html

Project title

…

…
    …
  • Runtime: 01.2025 - 12.2027
  • Funders:
    …
* The first attribute list holds the categories of the project, the second its facts: the runtime, the budget and the funders. * The funders are a rich text field, so their value is an `ace-value ce-bodytext`, a :html:`
` rather than a :html:``. * The page renders inside the layout of the site. .. _styling-example: An example ========== Rules in the stylesheet of the site package, scoped by the outermost element: .. code-block:: css .academic-projects-list .ace-state { display: inline-block; padding: 0 0.5rem; border-radius: 1rem; background: #e9ecef; } .academic-projects-list .ace-state.active { background: #d1e7dd; } .academic-projects-page .ace-attributes { list-style: none; padding-left: 0; } To change the markup itself, override the partials as described in :ref:`templates`.