tried to lazy load home images, but a better solution is to have to home version one html the lightest possible for first laod, and one rich for vuejs display
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override of an image.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the img tag.
|
||||
* - style_name: (optional) The name of the image style applied.
|
||||
*
|
||||
* @see template_preprocess_image()
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
style_name ? 'image-style-' ~ style_name|clean_class,
|
||||
]
|
||||
%}
|
||||
{# {% set attributes['data-src'] = attributes['src'] %}
|
||||
{% set attributes['src'] = '#' %} #}
|
||||
<img{{ attributes.addClass(classes) }} />
|
@@ -0,0 +1,18 @@
|
||||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to display a formatted image field.
|
||||
*
|
||||
* Available variables:
|
||||
* - image: A collection of image data.
|
||||
* - image_style: An optional image style.
|
||||
* - url: An optional URL the image can be linked to.
|
||||
*
|
||||
* @see template_preprocess_image_formatter()
|
||||
*/
|
||||
#}
|
||||
{% if url %}
|
||||
{{ link(image, url) }}
|
||||
{% else %}
|
||||
{{ image }}
|
||||
{% endif %}
|
@@ -0,0 +1,18 @@
|
||||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for an image using a specific image style.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the image, including the following:
|
||||
* - src: Full URL or relative path to the image file.
|
||||
* - class: One or more classes to be applied to the image.
|
||||
* - width: The width of the image (if known).
|
||||
* - height: The height of the image (if known).
|
||||
* - title: The title of the image.
|
||||
* - alt: The alternative text for the image.
|
||||
*
|
||||
* @see template_preprocess_image_style()
|
||||
*/
|
||||
#}
|
||||
{{ image }}
|
@@ -0,0 +1,18 @@
|
||||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override of an image.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the img tag.
|
||||
* - style_name: (optional) The name of the image style applied.
|
||||
*
|
||||
* @see template_preprocess_image()
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
style_name ? 'image-style-' ~ style_name|clean_class,
|
||||
]
|
||||
%}
|
||||
<img{{ attributes.addClass(classes) }} />
|
Reference in New Issue
Block a user