1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,23 @@ |
1 |
+ |
|
2 |
+<?php if ($this->sources): ?> |
|
3 |
+ <picture> |
|
4 |
+ <!--[if IE 9]><video style="display: none;"><![endif]--> |
|
5 |
+ <?php foreach ($this->sources as $source): ?> |
|
6 |
+ <source srcset="<?= $source['srcset'] ?>"<?php if (!empty($source['sizes'])) echo ' sizes="' . $source['sizes'] . '"'; ?><?php if (!empty($source['media'])) echo ' media="' . $source['media'] . '"'; ?>> |
|
7 |
+ <?php endforeach; ?> |
|
8 |
+ <!--[if IE 9]></video><![endif]--> |
|
9 |
+<?php endif; ?> |
|
10 |
+ |
|
11 |
+<img src="<?= $this->img['src'] ?>"<?php if ($this->img['srcset'] !== $this->img['src']) echo ' srcset="' . $this->img['srcset'] . '"'; ?><?php if (!empty($this->img['sizes'])) echo ' sizes="' . $this->img['sizes'] . '"'; elseif (!$this->sources) echo ' width="' . $this->img['width'] . '" height="' . $this->img['height'] . '"'; ?> alt="<?= $this->alt ?>"<?php if ($this->title) echo ' title="' . $this->title . '"'; ?><?php if ($this->class) echo ' class="' . $this->class . '"'; ?><?= $this->attributes ?>> |
|
12 |
+ |
|
13 |
+<?php if ($this->sources): ?> |
|
14 |
+ </picture> |
|
15 |
+<?php endif; ?> |
|
16 |
+ |
|
17 |
+<?php if ($this->sources || $this->img['src'] !== $this->img['srcset']): ?> |
|
18 |
+ <script> |
|
19 |
+ window.respimage && window.respimage({ |
|
20 |
+ elements: [document.images[document.images.length - 1]] |
|
21 |
+ }); |
|
22 |
+ </script> |
|
23 |
+<?php endif; ?> |