jadu / pulsar-metadata
Provides a simple way to mark up key/value information provided by a Twig hash or JSON object
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 0
Open Issues: 0
Language:SCSS
pkg:composer/jadu/pulsar-metadata
Requires
- jadu/twig-attribute-parser: ^1.0
- twig/twig: ^2.0
README
Provides a simple way to mark up key/value information provided by a Twig hash or JSON object.
Documentation
https://jadu.github.io/pulsar/docs/components/metadata
Example usage
{{
html.metadata({
'items': {
'File': 'true_lies.avi',
'Size': '1.2 Gb',
'Type': 'Video'
}
})
}}
Variations
| Class | Behaviour |
|---|---|
.metadata--stacked |
Verically align keys and values |
Options
| Option | Type | Description |
|---|---|---|
| class | string | CSS classes, space separated |
| id | string | A unique identifier, if required |
| items | hash | A hash of data where key: value = title: description |
| data-* | string | Data attributes, eg: 'data-foo': 'bar' |