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.
The opt-in set fgtclb/ is the one part of the
extension that loads a stylesheet: its page object, meant for an installation
without a site package of its own, loads the stylesheet and the script of
Bootstrap 5 from jsDelivr and renders the plugins on a plain Bootstrap page. It
does not style the markup described here.
The outermost elements
| Plugin | Content element type | Outermost element |
|---|---|---|
| Profile list | academicpersons_ | academic- |
| Profile detail | academicpersons_ | academic- |
| Profile list and detail | academicpersons_ | academic-, and academic- on the
detail view |
| Profile card | academicpersons_ | academic- |
| Selected profiles | academicpersons_ | academic- |
| Selected contracts | academicpersons_ | academic- |
The profile list
<div class="academic-persons-list">
<!-- the header of the content element, when the plugin renders it -->
<form class="ace-form" …>
<div class="ace-filters">
<div class="row">
<div class="col-auto">
<div class="ace-filter ace-field ace-select-wrap">
<label class="ace-label" for="…">Function</label>
<select class="ace-control ace-select" …>…</select>
</div>
</div>
<div class="col-auto">
<div class="ace-actions">
<input type="submit" class="ace-control ace-submit btn btn-primary" value="Filter" />
</div>
</div>
</div>
</div>
</form>
<nav class="ace-navigation ace-alphabet-navigation" aria-label="…">
<ul class="ace-list">
<li class="ace-list-item active"><a class="ace-link" aria-current="page" …>A-Z</a></li>
<li class="ace-list-item"><a class="ace-link" …><span>B</span></a></li>
<li class="ace-list-item disabled">
<span class="ace-link">C<span class="visually-hidden"> - no profiles</span></span>
</li>
</ul>
</nav>
<nav class="ace-navigation ace-view-mode-switch" aria-label="…">
<ul class="ace-list">
<li class="ace-list-item"><a class="ace-link active" aria-current="true" …>List</a></li>
<li class="ace-list-item"><a class="ace-link" …>Table</a></li>
</ul>
</nav>
<div class="ace-itemlist">
<div class="row">
<div class="col-12 col-md-6 col-lg-4 col-xl-3">
<article class="ace-item">…</article>
</div>
</div>
</div>
<nav class="ace-pagination" aria-label="…">
<ul class="f3-widget-paginator">
<li class="ace-list-item active" aria-current="page"><span class="ace-link">2</span></li>
<li class="ace-list-item next"><a class="ace-link" …><span>Next</span></a></li>
</ul>
</nav>
</div>
- The filter, the alphabet navigation, the view mode switch and the pagination are each only rendered when the content element configures them.
- With a grouping, every group starts with its heading, a
<header class="ace-around anheader"> ace-, followed by the profiles of the group in the view mode of the list.title ace- group- header - The pagination entries carry
first,previous,nextandlast, the current pageactive, the gapsdisabled. Unlike the paginations of the job and partner lists, which name their entriespage-anditem page-, the entries here arelink ace-with anlist- item ace-, in alink <nav class="ace-.pagination"> - The submit button of the filter carries
ace-next to the Bootstrap button classescontrol ace- submit btn btn-. The submit buttons of the job form and the program plugins carry the Bootstrap classes only.primary - A list without profiles renders the message in a
<span class="ace-.empty">
A profile
The list view, the card, the selected profiles and the selected contracts render a profile the same way, and so does the contact list of EXT:academic_contacts4pages:
<article class="ace-item">
<div class="ace-item-content">
<header class="ace-header">
<h2 class="ace-title ace-name"><a href="…">Dr. Jane Doe</a></h2>
</header>
<ul class="ace-list ace-attributes">
<li class="ace-list-item ace-attribute">
<b class="ace-label">Email:</b>
<div class="ace-value"><a class="ace-link" href="mailto:…">…</a></div>
</li>
</ul>
</div>
<!-- the image of the profile, see "An image" in academic_base -->
</article>
- The attributes are the fields of the contract the content element shows.
Several email addresses or phone numbers are links in one
ace-, the addresses anvalue ace-each.list- item - The image follows the text and shows the placeholder of the profile when there is no image, see Profile image.
The table view
<div class="ace-table-wrap">
<table class="ace-table">
<thead class="ace-table-header">
<tr><th class="ace-label" scope="col">Name</th>…</tr>
</thead>
<tbody class="ace-table-body">
<tr class="ace-item">
<th class="ace-label" scope="row"><a class="ace-link" href="…">Dr. Jane Doe</a></th>
<td class="ace-value"><span class="ace-list-item">…</span></td>
</tr>
</tbody>
</table>
</div>
A cell holds an ace- per contract that has a value for its column.
The head and body of the table are ace- and ace-.
The table view of EXT:academic_bite_jobs names them ace- and
ace-, the profile list of EXT:academic_persons_edit
ace- and ace-.
The profile detail
The detail view arranges the elements the content element configures in two columns, a navigation column and the content:
<div class="academic-persons-detail" data-academic-persons-detail>
<div class="ace-content ace-profile-layout">
<div class="row">
<div class="col-12 col-lg-4">
<div class="ace-navigation ace-sidebar">
<div class="ace-sticky-navigation" data-academic-persons-sticky-navigation>
<!-- the elements of the left column -->
</div>
</div>
</div>
<div class="col-12 col-lg-6">
<div class="ace-main">
<!-- the elements of the right column -->
<!-- before the subline, the elements of the left column once more,
for a narrow viewport -->
<div class="ace-navigation ace-mobile-navigation">…</div>
</div>
</div>
</div>
</div>
</div>
The elements are:
| Element | Markup |
|---|---|
| Headline |
<header class="ace- around an
<h2 class="ace- holding one
ace- per part of the name. |
| Position | An ace- of one
ace- per contract, holding an
ace- per part, ace-, ace- or
ace-. |
| Profile image | An ace- around the image. |
| Contact | A
<section class="ace- with an ace-, and
an ace- per contract. Each email, phone,
address, room and office hours line is an ace- with an
ace- and an ace-, the office hours an
ace- with their text in a
ce-. |
| Subline | An
<h3 class="ace-. |
| Profile entries | An ace- of one
<section
class="ace- per entry: a heading ace-
holding a button ace- with an ace- and an
ace-, which holds an ace- and an ace- glyph, and
the text in an ace- with a ce-. |
| Links | An ace- of ace- entries,
each with an ace- and an ace-. |
| Menu sections | A
<nav class="ace- with an
<ol class="ace- of entries, each an ace- with an
empty ace- for a number and an ace-. |
| Menu section data | An ace- of one
<section class="ace- per menu section, with an
ace- and an ace- of
ace- entries: the years in an
ace-, the title in an ace-, the text in a
ce-. |
The profile script works with the data- attributes and
writes these states:
aria-on theexpanded ace-of a profile entry, andtoggle hiddenon itsace-while it is closed.content activeandaria-on the link of the menu section that is in view, where the site loads the scroll spy of Bootstrap.current - The offset of the sticky navigation below a sticky page header, as its
topand as the custom property--on the outermost element.academic- persons- detail- scroll- offset
The script is switched off per site with plugin.,
see Load the script or bring your own. The entries of a profile then stay
closed, with their
hidden
attribute, unless the project brings a
script of its own. The lists load no script.
An example
Rules in the stylesheet of the site package, scoped by the outermost element:
.academic-persons-list .ace-alphabet-navigation .ace-list {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
list-style: none;
padding-left: 0;
}
.academic-persons-list .ace-list-item.disabled .ace-link {
opacity: 0.5;
}
.academic-persons-detail .ace-navigation .ace-link.active {
font-weight: 600;
}
.academic-persons-detail .ace-accordion-item .ace-toggle[aria-expanded="true"] .ace-open,
.academic-persons-detail .ace-accordion-item .ace-toggle[aria-expanded="false"] .ace-close {
display: none;
}
The development instances style this markup with the partials
_academic-persons.scss,
the profile detail, and _academic-persons-list.scss,
the lists and cards, together with the shared rules of
_academic-base.scss,
all of the site package academics_, a complete example to copy
from.
To change the markup itself, override the partials as described in Templates.