Files
docker-docs/layouts/shortcodes/inline-image.html
Craig Osterhout 2fd4bb7117 styles: fix inline images (#22835)
<!--Delete sections as needed -->

## Description

Inline images have large margins. 
Example: https://docs.docker.com/desktop/setup/vm-vdi/#use-docker-cloud.

This classifies inline images as not prose to not tack on the extra
margin since it's inline.

Fixed example:
https://deploy-preview-22835--docsdocker.netlify.app/desktop/setup/vm-vdi/#use-docker-cloud


## Related issues or tickets

<!-- Related issues, pull requests, or Jira tickets -->

## Reviews

<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->

- [ ] Editorial review

Signed-off-by: Craig <craig.osterhout@docker.com>
2025-06-13 12:29:47 -07:00

16 lines
330 B
HTML

{{ $src := .Get "src" }}
{{ $alt := .Get "alt" }}
{{ $title := .Get "title" }}
{{ if and (eq .Page.Kind "page") (not (hasPrefix $src "/")) }}
{{ $src = (printf "../%s" $src) }}
{{ end }}
<img
loading="lazy"
src="{{ $src }}"
alt="{{ $alt }}"
{{ with $title }}title="{{ . }}"{{ end }}
class="inline my-0 not-prose"
/>