Documentation
Kitchen Sink documentation of style: 'Delos' of skin: 'ILIAS'
Love
Description
- Purpose
- Clicking the Love Glyph indicates a user adores an item, e.g. a posting.
- Composition
- The Love Glyph uses the "red heart" unicode emoji U+2764, see https://unicode.org/emoji/charts/full-emoji-list.html.
- Effect
- Upon clicking, the Love Glyph acts as a toggle: A first click adds a Love to the respective item, which is reflected in the colour of the Glyph and in the counter. A second click takes the Love away, which is also reflected in colour and counter.
- Context
- Show timeline in groups and courses.
Rules
- Composition
- A Status Counter MUST indicate the overall amount of love expressions.
- Accessibility
- The aria-label MUST be 'Love'.
Example 1: Love
<?php declare(strict_types=1); namespace ILIAS\UI\examples\Symbol\Glyph\Love; function love() { global $DIC; $f = $DIC->ui()->factory(); $renderer = $DIC->ui()->renderer(); $glyph = $f->symbol()->glyph()->love("#"); //Showcase the various states of this Glyph $list = $f->listing()->descriptive([ "Active" => $glyph, "Inactive" => $glyph->withUnavailableAction(), "Highlighted" => $glyph->withHighlight() ]); return $renderer->render($list); }
Relations
- Parents
- UIComponent
- Symbol
- Glyph