.. index:: ! Styling .. _styling: ======= Styling ======= The plugins 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 - Content element type - Outermost element * - Job list - `academicjobs_list` - `academic-jobs-list` * - Job detail - `academicjobs_detail` - `academic-jobs-detail` * - New job form - `academicjobs_newjobform` - `academic-jobs-new` .. _styling-list: The job list ============ .. code-block:: html
* The item list carries no grid, the items follow each other. A grid is a rule of the site stylesheet on `.ace-itemlist`. * The level of the heading of a job follows the header layout of the content element, one level lower when the content element has a subheader. * The attributes are the same list the job detail renders. Each has an `ace-icon`, an `ace-label` and an `ace-value`. The flags :guilabel:`Internationals welcome` and :guilabel:`Alumni recommend` render their label only, without a value. A link of a job is an `ace-link` inside the value. * The image follows the text, after `ace-item-content`, and is only rendered when the job has one. * The pagination is only rendered with more than one page. Its entries carry `first`, `previous`, `next` and `last`, the current page `active` and the gaps `disabled`. .. _styling-detail: The job detail ============== .. code-block:: html
Back to the list

Job title

…

Contact

…
* The back link is only rendered when the plugin names a list page. * The description is a rich text field and therefore a `ce-bodytext`. The columns are only rendered for a job with a description or contact data, and the description takes the whole width when there is no contact. .. _styling-flash-messages: The flash messages ================== The job list and the job detail render the flash messages of the extension, the confirmation after a submitted job or the message that it could not be created. TYPO3 renders them, with the alert classes of Bootstrap and no speaking class: .. code-block:: html The severity decides the second class: `alert-success`, `alert-danger` and so on. The list is only rendered when there is a message. .. _styling-new: The new job form ================ .. code-block:: html
…
…
…
Every field is rendered by the form partials of :guilabel:`EXT:academic_base`, see `A form field `__ in its chapter :guilabel:`Styling`. The text areas of the description and of the additional contact information carry `ace-ckeditor`. Unlike most scripts of the academic extensions, the rich text script of the form finds its elements by this class: it starts the editor on every text area with `ace-ckeditor`. An override of the form keeps the class on the text areas that get the editor. The editor and its script are switched off per site with `plugin.tx_academicjobs.assets.js`, see :ref:`configuration-javascript`. The text areas then stay plain text areas, with the class. The submit button is a Bootstrap button, `btn btn-primary`, without a speaking class. .. _styling-example: An example ========== Rules in the stylesheet of the site package, scoped by the outermost element: .. code-block:: css .academic-jobs-list .ace-itemlist { display: grid; gap: 1.5rem; } .academic-jobs-list .ace-item, .academic-jobs-detail .ace-contact { padding: 1rem; border: 1px solid #dee2e6; } .academic-jobs-list .ace-attributes, .academic-jobs-detail .ace-attributes { list-style: none; padding-left: 0; } To change the markup itself, override the partials as described in :ref:`templates`.