Skip to content

Commit b40a740

Browse files
authored
Merge pull request #314 from BeAPI/feat/ari-captions
feat (ari) add image with caption default template
2 parents 17ebbc8 + 77dc7ba commit b40a740

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

config/image-sizes.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ let nbSizes = 0
3737
*/
3838
function getTemplateFileNames() {
3939
return fs.readdirSync(dir.tpl).filter(function (tpl) {
40-
return tpl !== 'default-picture.tpl'
40+
if (tpl !== 'default-picture.tpl' && tpl !== 'default-picture-caption.tpl') {
41+
return tpl
42+
}
4143
})
4244
}
4345

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<noscript>
2+
%%data-location%%
3+
<img src="%%default_img%%" %%attributes%% />
4+
</noscript>
5+
<picture>
6+
%%sources%%
7+
<img %%srcgif%% %%attributes%%/>
8+
</picture>
9+
<figcaption>%%caption%%</figcaption>

src/conf-img/tpl/default-picture.tpl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
<img src="%%default_img%%" %%attributes%% />
44
</noscript>
55
<picture>
6-
<!--[if IE 9]><video style="display: none"><![endif]-->
7-
86
%%sources%%
9-
10-
<!--[if IE 9]></video><![endif]-->
117
<img %%srcgif%% %%attributes%%/>
12-
</picture>
8+
</picture>

0 commit comments

Comments
 (0)