better image caption: appears only when hover the image on the bottom
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a formatted image field with a caption.
|
||||
*
|
||||
* Available variables:
|
||||
* - image: A collection of image data.
|
||||
* - image_style: An optional image style.
|
||||
* - url: An optional URL the image can be linked to.
|
||||
* - caption : An optional image caption.
|
||||
*
|
||||
* @see template_preprocess_image_caption_formatter()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<figure>
|
||||
|
||||
{% if url %}
|
||||
<a href="{{ url }}">{{ image }}</a>
|
||||
{% else %}
|
||||
{{ image }}
|
||||
{% endif %}
|
||||
|
||||
{% if caption %}
|
||||
<figcaption class="image-field-caption">
|
||||
<blockquote>{{ caption }}</blockquote>
|
||||
</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
Reference in New Issue
Block a user