annotate core/modules/system/templates/time.html.twig @ 0:4c8ae668cc8c
Initial import (non-working)
author |
Chris Cannam |
date |
Wed, 29 Nov 2017 16:09:58 +0000 |
parents |
|
children |
af1871eacc83 |
rev |
line source |
Chris@0
|
1 {#
|
Chris@0
|
2 /**
|
Chris@0
|
3 * @file
|
Chris@0
|
4 * Default theme implementation for a date / time element.
|
Chris@0
|
5 *
|
Chris@0
|
6 * Available variables
|
Chris@0
|
7 * - timestamp: (optional) A UNIX timestamp for the datetime attribute. If the
|
Chris@0
|
8 * datetime cannot be represented as a UNIX timestamp, use a valid datetime
|
Chris@0
|
9 * attribute value in attributes.datetime.
|
Chris@0
|
10 * - text: (optional) The content to display within the <time> element.
|
Chris@0
|
11 * Defaults to a human-readable representation of the timestamp value or the
|
Chris@0
|
12 * datetime attribute value using format_date().
|
Chris@0
|
13 * - attributes: (optional) HTML attributes to apply to the <time> element.
|
Chris@0
|
14 * A datetime attribute in 'attributes' overrides the 'timestamp'. To
|
Chris@0
|
15 * create a valid datetime attribute value from a UNIX timestamp, use
|
Chris@0
|
16 * format_date() with one of the predefined 'html_*' formats.
|
Chris@0
|
17 *
|
Chris@0
|
18 * @see template_preprocess_time()
|
Chris@0
|
19 * @see http://www.w3.org/TR/html5-author/the-time-element.html#attr-time-datetime
|
Chris@0
|
20 */
|
Chris@0
|
21 #}
|
Chris@0
|
22 <time{{ attributes }}>{{ text }}</time>
|