Skip to content

Commit

Permalink
Merge pull request #372 from helsingborg-stad/feat/remove-caption
Browse files Browse the repository at this point in the history
feat: remove caption
  • Loading branch information
Anna authored Feb 5, 2024
2 parents 2eafaa4 + f53f460 commit 9935751
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/php/Component/Image/image.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<figure class="{{ $class }}" {!! $attribute !!}>
@if($src)
<img src="{{$src}}" alt="{{$alt}}" {!! $imgAttributes !!} />
@if($caption || $byline)
@if(($caption || $byline) && !$removeCaption)
<figcaption>
@if($caption)
<span class="{{$baseClass}}__caption">{{ $caption }}</span><br>
Expand Down
6 changes: 4 additions & 2 deletions source/php/Component/Image/image.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"placeholderText": "Image missing",
"placeholderIcon": "broken_image",
"placeholderIconSize": "xl",
"imgAttributeList": []
"imgAttributeList": [],
"removeCaption": false
},
"description": {
"alt": "Alt text of the image",
Expand All @@ -22,7 +23,8 @@
"placeholderText": "Label to show if image is missing",
"placeholderIcon": "Icon to display if image is missing / false to hide",
"placeholderIconSize": "Icons size, please refer to image component for size.",
"imgAttributeList": "Attributes for the img element."
"imgAttributeList": "Attributes for the img element.",
"removeCaption": "Shows only the alt-text removing the image caption and byline"

},
"view": "image.blade.php",
Expand Down

0 comments on commit 9935751

Please sign in to comment.