feat(image shortcodes): add lazy loading (#116)

Additionally sets the `alt` parameters as optional and cleans HTML output.
This commit is contained in:
Óscar
2023-08-26 01:57:19 +02:00
committed by GitHub
parent 1be3fa886c
commit 1c3db86b75
9 changed files with 41 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
+++
title = "Shortcodes personalitzats"
date = 2023-02-19
updated = 2023-08-24
updated = 2023-08-26
description = "Aquest tema inclou alguns shortcodes personalitzats útils que pots utilitzar per millorar les teves publicacions. Ja sigui per mostrar imatges que s'adapten als temes clar i fosc, o per donar format a una secció de referències amb un aspecte professional, aquests shortcodes personalitzats t'ajudaran."
[taxonomies]
@@ -15,6 +15,8 @@ quick_navigation_buttons = true
## Shortcodes d'imatge
**Nota**: tots els shortcodes d'imatge tenen dos paràmetres opcionals: `full_width`, que té com a valor predeterminat `false` (vegeu [a sota](#imatge-d-amplada-completa)), i `lazy_loading`, que té com a valor predeterminat `true`.
### Imatges per a temes duals
Útil si vols utilitzar una imatge diferent pels temes clar i fosc:

View File

@@ -1,7 +1,7 @@
+++
title = "Shortcodes personalizados"
date = 2023-02-19
updated = 2023-08-24
updated = 2023-08-26
description = "Este tema incluye algunos shortcodes personalizados útiles que puedes utilizar para mejorar tus publicaciones. Puedes mostrar imágenes que se adapten a los temas claro y oscuro, dar formato a una sección de referencias con un aspecto profesional, y más."
[taxonomies]
@@ -13,7 +13,9 @@ toc_levels = 2
quick_navigation_buttons = true
+++
## Shortcodes de imágenes
## Shortcodes de imagen
**Nota**: todos los shortcodes de imagen tienen dos parámetros opcionales: `full_width`, que tiene como valor predeterminado `false` (ver [más abajo](#imagen-a-ancho-completo)), y `lazy_loading`, que tiene como valor predeterminado `true`.
### Imágenes de doble tema

View File

@@ -1,7 +1,7 @@
+++
title = "Custom shortcodes"
date = 2023-02-19
updated = 2023-08-24
updated = 2023-08-26
description = "This theme includes some useful custom shortcodes that you can use to enhance your posts. Whether you want to display images that adapt to light and dark themes, or format a professional-looking reference section, these custom shortcodes have got you covered."
[taxonomies]
@@ -15,6 +15,8 @@ quick_navigation_buttons = true
## Image shortcodes
**Note**: all image shortcodes have two optional parameters: `full_width`, which defaults to `false` (see [below](#full-width-image)), and `lazy_loading`, which defaults to `true`.
### Dual theme images
Useful if you want to use a different image for the light and dark themes: