64c5de290a9459b388a2f97f9bcfa3df3957dd315894fd4d76d7fe152216b3dc.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. <?php
  2. /* partials/mediaembed.html.twig */
  3. class __TwigTemplate_a62d707fdfc0a87d06ec9de9c2894d398f5c5153bfc6f36e5c303df2237f9fda extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. $this->parent = false;
  9. $this->blocks = array(
  10. );
  11. }
  12. protected function doDisplay(array $context, array $blocks = array())
  13. {
  14. // line 2
  15. $context["default"] = $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "config", array()), "media", array());
  16. // line 3
  17. $context["oembed"] = $this->getAttribute(($context["mediaembed"] ?? null), "service", array());
  18. // line 4
  19. echo "
  20. ";
  21. // line 6
  22. if ( !$this->getAttribute(($context["mediaembed"] ?? null), "success", array())) {
  23. // line 7
  24. echo " ";
  25. if ($this->getAttribute(($context["default"] ?? null), "responsive", array())) {
  26. // line 8
  27. echo " ";
  28. $context["class"] = "-responsive mediaembed-msod";
  29. // line 9
  30. echo " ";
  31. } else {
  32. // line 10
  33. echo " ";
  34. $context["class"] = ((" mediaembed-msod\" style=\"max-width: " . $this->getAttribute(($context["default"] ?? null), "width", array())) . "px;");
  35. // line 11
  36. echo " ";
  37. }
  38. // line 12
  39. echo "
  40. <div class=\"mediaembed";
  41. // line 13
  42. echo ($context["class"] ?? null);
  43. echo "\">
  44. <p class=\"mediaembed-icon\">&#9749;</p>
  45. <p class=\"mediaembed-error-title\"><b>Unable to process oEmbed media:</b><a href=\"";
  46. // line 15
  47. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "src", array());
  48. echo "\" alt=\"";
  49. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "alt", array());
  50. echo "\" title=\"";
  51. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "title", array());
  52. echo "\">";
  53. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "src", array()));
  54. echo "</a></p>
  55. <p class=\"mediaembed-error-message\"><b>Error:</b>";
  56. // line 16
  57. echo $this->getAttribute(($context["mediaembed"] ?? null), "message", array());
  58. echo "</p>
  59. </div>
  60. ";
  61. } else {
  62. // line 21
  63. echo " ";
  64. $context["response"] = $this->getAttribute(($context["oembed"] ?? null), "attributes", array());
  65. // line 22
  66. echo " ";
  67. // line 23
  68. echo " ";
  69. if (((twig_test_empty($this->getAttribute(($context["response"] ?? null), "width", array())) || !$this->getAttribute(($context["response"] ?? null), "width", array(), "any", true, true)) || ($this->getAttribute(($context["response"] ?? null), "width", array()) == 0))) {
  70. // line 24
  71. echo " ";
  72. $context["response"] = twig_array_merge(($context["response"] ?? null), array("width" => (($this->getAttribute(($context["default"] ?? null), "width", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["default"] ?? null), "width", array()), 1)) : (1))));
  73. // line 25
  74. echo " ";
  75. }
  76. // line 26
  77. echo "
  78. ";
  79. // line 27
  80. if (((twig_test_empty($this->getAttribute(($context["response"] ?? null), "height", array())) || !$this->getAttribute(($context["response"] ?? null), "height", array(), "any", true, true)) || ($this->getAttribute(($context["response"] ?? null), "height", array()) == 0))) {
  81. // line 28
  82. echo " ";
  83. $context["response"] = twig_array_merge(($context["response"] ?? null), array("height" => (($this->getAttribute(($context["default"] ?? null), "height", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["default"] ?? null), "height", array()), 1)) : (1))));
  84. // line 29
  85. echo " ";
  86. }
  87. // line 30
  88. echo "
  89. ";
  90. // line 31
  91. $context["width"] = $this->getAttribute(($context["response"] ?? null), "width", array());
  92. // line 32
  93. echo " ";
  94. $context["height"] = $this->getAttribute(($context["response"] ?? null), "height", array());
  95. // line 33
  96. echo " ";
  97. $context["ratio"] = (($context["height"] ?? null) / ($context["width"] ?? null));
  98. // line 34
  99. echo "
  100. ";
  101. // line 36
  102. echo " ";
  103. if ($this->getAttribute(($context["default"] ?? null), "adjust", array())) {
  104. // line 37
  105. echo " ";
  106. // line 38
  107. echo " ";
  108. if ((((($context["width"] ?? null) * ($context["ratio"] ?? null)) > $this->getAttribute(($context["default"] ?? null), "height", array())) || ((($context["height"] ?? null) / ($context["ratio"] ?? null)) > $this->getAttribute(($context["default"] ?? null), "width", array())))) {
  109. // line 39
  110. echo " ";
  111. // line 40
  112. echo " ";
  113. $context["width"] = (($this->getAttribute(($context["default"] ?? null), "width", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["default"] ?? null), "width", array()), 1)) : (1));
  114. // line 41
  115. echo " ";
  116. $context["height"] = twig_round(($this->getAttribute(($context["default"] ?? null), "width", array()) * ($context["ratio"] ?? null)));
  117. // line 42
  118. echo " ";
  119. }
  120. // line 43
  121. echo " ";
  122. } else {
  123. // line 44
  124. echo " ";
  125. $context["width"] = (($this->getAttribute(($context["default"] ?? null), "width", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["default"] ?? null), "width", array()), 1)) : (1));
  126. // line 45
  127. echo " ";
  128. $context["height"] = (($this->getAttribute(($context["default"] ?? null), "height", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["default"] ?? null), "height", array()), 1)) : (1));
  129. // line 46
  130. echo " ";
  131. }
  132. // line 47
  133. echo "
  134. ";
  135. // line 49
  136. echo " ";
  137. $context["ratio"] = (($context["height"] ?? null) / ($context["width"] ?? null));
  138. // line 50
  139. echo " ";
  140. $context["container_styles"] = (("padding-bottom: " . sprintf("%.2f", (($context["ratio"] ?? null) * 100))) . "%;");
  141. // line 51
  142. echo "
  143. ";
  144. // line 53
  145. echo " ";
  146. if ($this->getAttribute(($context["default"] ?? null), "responsive", array())) {
  147. // line 54
  148. echo " ";
  149. $context["responsive"] = "-responsive";
  150. // line 55
  151. echo "
  152. ";
  153. // line 56
  154. $context["width"] = 1920;
  155. // line 57
  156. echo " ";
  157. $context["height"] = twig_round((($context["width"] ?? null) * ($context["ratio"] ?? null)));
  158. // line 58
  159. echo " ";
  160. } else {
  161. // line 59
  162. echo " ";
  163. $context["styles"] = ((((" style=\"max-width: " . ($context["width"] ?? null)) . "px; max-height: ") . ($context["height"] ?? null)) . "px;\"");
  164. // line 60
  165. echo " ";
  166. }
  167. // line 61
  168. echo "
  169. ";
  170. // line 63
  171. echo " ";
  172. if ($this->getAttribute(($context["default"] ?? null), "preview", array())) {
  173. // line 64
  174. echo " ";
  175. $context["lazyload"] = " lazyload";
  176. // line 65
  177. echo " ";
  178. $context["lazyload_script"] = " onclick=\"lazyload(this)\"";
  179. // line 66
  180. echo " ";
  181. }
  182. // line 67
  183. echo "
  184. <div class=\"mediaembed";
  185. // line 68
  186. echo ($context["responsive"] ?? null);
  187. echo " mediaembed-media mediaembed-";
  188. echo $this->getAttribute(($context["oembed"] ?? null), "type", array());
  189. echo " mediaembed-";
  190. echo twig_lower_filter($this->env, $this->getAttribute(($context["oembed"] ?? null), "name", array()));
  191. echo ($context["lazyload"] ?? null);
  192. echo "\"";
  193. echo ($context["styles"] ?? null);
  194. echo ">
  195. <div class=\"mediaembed-container\" style=\"";
  196. // line 69
  197. echo ($context["container_styles"] ?? null);
  198. echo "\">
  199. ";
  200. // line 71
  201. echo "
  202. ";
  203. // line 73
  204. echo " ";
  205. if (($this->getAttribute(($context["oembed"] ?? null), "type", array()) == "photo")) {
  206. // line 74
  207. echo " ";
  208. $context["title"] = (((($this->getAttribute($this->getAttribute(($context["oembed"] ?? null), "getOembed", array(), "method"), "provider_name", array()) . ": &#8220;") . $this->getAttribute(($context["oembed"] ?? null), "title", array())) . "&#8221; by ") . $this->getAttribute(($context["oembed"] ?? null), "author", array()));
  209. // line 75
  210. echo " <a class=\"mediaembed-embed\" href=\"";
  211. echo $this->getAttribute(($context["oembed"] ?? null), "author", array(0 => "url"), "method");
  212. echo "\" title=\"";
  213. echo ($context["title"] ?? null);
  214. echo "\">
  215. <img src=\"";
  216. // line 76
  217. echo $this->getAttribute(($context["oembed"] ?? null), "url", array());
  218. echo "\" alt=\"";
  219. echo $this->getAttribute(($context["oembed"] ?? null), "title", array());
  220. echo "\">
  221. </a>
  222. ";
  223. // line 80
  224. echo " ";
  225. } elseif (($this->getAttribute(($context["oembed"] ?? null), "type", array()) == "video")) {
  226. // line 81
  227. echo " <a href=\"";
  228. echo $this->getAttribute(($context["oembed"] ?? null), "getEmbedCode", array());
  229. echo "\" alt=\"";
  230. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "alt", array());
  231. echo "\" title=\"";
  232. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "title", array());
  233. echo "\" class=\"mediaembed-media\"";
  234. echo ($context["lazyload_script"] ?? null);
  235. echo ">
  236. ";
  237. // line 83
  238. echo " <!--
  239. <iframe class=\"mediaembed-embed\" src=\"";
  240. // line 84
  241. echo $this->getAttribute(($context["oembed"] ?? null), "getEmbedCode", array());
  242. echo "\" width=\"";
  243. echo ($context["width"] ?? null);
  244. echo "\" height=\"";
  245. echo ($context["height"] ?? null);
  246. echo "\" frameborder=\"0\" scrolling=\"no\" webkitallowfullscreen mozallowfullscreen allowfullscreen>
  247. <p>Your browser does not support iframes.</p>
  248. </iframe>
  249. -->
  250. ";
  251. // line 90
  252. echo " ";
  253. if (($this->getAttribute(($context["default"] ?? null), "preview", array()) && $this->getAttribute(($context["oembed"] ?? null), "thumbnail", array()))) {
  254. // line 91
  255. echo " <img src=\"";
  256. echo $this->getAttribute(($context["oembed"] ?? null), "thumbnail", array());
  257. echo "\" alt=\"";
  258. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "alt", array());
  259. echo "\" title=\"";
  260. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "title", array());
  261. echo "\" class=\"mediaembed-thumbnail\" />
  262. ";
  263. } else {
  264. // line 93
  265. echo " ";
  266. // line 94
  267. echo " ";
  268. }
  269. // line 95
  270. echo "
  271. ";
  272. // line 97
  273. echo " <input type=\"checkbox\" id=\"mediaembed-hidden-input-";
  274. echo $this->getAttribute(($context["mediaembed"] ?? null), "uid", array());
  275. echo "\" class=\"mediaembed-input\" />
  276. ";
  277. // line 100
  278. echo " <noscript>
  279. <iframe class=\"mediaembed-embed\" src=\"";
  280. // line 101
  281. echo $this->getAttribute(($context["oembed"] ?? null), "getEmbedCode", array());
  282. echo "\" width=\"";
  283. echo ($context["width"] ?? null);
  284. echo "\" height=\"";
  285. echo ($context["height"] ?? null);
  286. echo "\" frameborder=\"0\" scrolling=\"no\" webkitallowfullscreen mozallowfullscreen allowfullscreen style=\"display: none;\">
  287. <p>Your browser does not support iframes.</p>
  288. </iframe>
  289. </noscript>
  290. <label class=\"mediaembed-play\" for=\"mediaembed-hidden-input-";
  291. // line 106
  292. echo $this->getAttribute(($context["mediaembed"] ?? null), "uid", array());
  293. echo "\">&#9654;</label>
  294. </a>
  295. ";
  296. // line 110
  297. echo " ";
  298. } elseif (($this->getAttribute(($context["oembed"] ?? null), "type", array()) == "link")) {
  299. // line 111
  300. echo " ";
  301. $context["title"] = (((($this->getAttribute($this->getAttribute(($context["oembed"] ?? null), "getOembed", array(), "method"), "provider_name", array()) . ": &#8220;") . (($this->getAttribute($this->getAttribute($this->getAttribute(($context["oembed"] ?? null), "mediaembed", array(), "any", false, true), "raw", array(), "any", false, true), "title", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["oembed"] ?? null), "mediaembed", array(), "any", false, true), "raw", array(), "any", false, true), "title", array()), ($context["title"] ?? null))) : (($context["title"] ?? null)))) . "&#8221; by ") . $this->getAttribute(($context["oembed"] ?? null), "author", array()));
  302. // line 112
  303. echo " <a href=\"";
  304. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "src", array());
  305. echo "\" alt=\"";
  306. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "alt", array());
  307. echo "\" title=\"";
  308. echo ($context["title"] ?? null);
  309. echo "\">";
  310. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "src", array()));
  311. echo "</a>
  312. ";
  313. // line 114
  314. echo " ";
  315. } elseif (($this->getAttribute(($context["oembed"] ?? null), "type", array()) == "rich")) {
  316. // line 115
  317. echo " <div class=\"mediaembed-media\">";
  318. echo $this->getAttribute(($context["oembed"] ?? null), "getEmbedCode", array(), "method");
  319. echo "</div>
  320. ";
  321. // line 118
  322. echo " ";
  323. } else {
  324. // line 119
  325. echo " ";
  326. // line 120
  327. echo " <a href=\"";
  328. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "src", array());
  329. echo "\" alt=\"";
  330. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "alt", array());
  331. echo "\" title=\"";
  332. echo $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "title", array());
  333. echo "\">";
  334. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["mediaembed"] ?? null), "raw", array()), "src", array()));
  335. echo "</a>
  336. ";
  337. }
  338. // line 122
  339. echo " </div>
  340. </div>
  341. ";
  342. }
  343. }
  344. public function getTemplateName()
  345. {
  346. return "partials/mediaembed.html.twig";
  347. }
  348. public function isTraitable()
  349. {
  350. return false;
  351. }
  352. public function getDebugInfo()
  353. {
  354. return array ( 350 => 122, 338 => 120, 336 => 119, 333 => 118, 327 => 115, 324 => 114, 313 => 112, 310 => 111, 307 => 110, 301 => 106, 289 => 101, 286 => 100, 280 => 97, 277 => 95, 274 => 94, 272 => 93, 262 => 91, 259 => 90, 247 => 84, 244 => 83, 233 => 81, 230 => 80, 222 => 76, 215 => 75, 212 => 74, 209 => 73, 206 => 71, 202 => 69, 191 => 68, 188 => 67, 185 => 66, 182 => 65, 179 => 64, 176 => 63, 173 => 61, 170 => 60, 167 => 59, 164 => 58, 161 => 57, 159 => 56, 156 => 55, 153 => 54, 150 => 53, 147 => 51, 144 => 50, 141 => 49, 138 => 47, 135 => 46, 132 => 45, 129 => 44, 126 => 43, 123 => 42, 120 => 41, 117 => 40, 115 => 39, 112 => 38, 110 => 37, 107 => 36, 104 => 34, 101 => 33, 98 => 32, 96 => 31, 93 => 30, 90 => 29, 87 => 28, 85 => 27, 82 => 26, 79 => 25, 76 => 24, 73 => 23, 71 => 22, 68 => 21, 61 => 16, 51 => 15, 46 => 13, 43 => 12, 40 => 11, 37 => 10, 34 => 9, 31 => 8, 28 => 7, 26 => 6, 23 => 4, 21 => 3, 19 => 2,);
  355. }
  356. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  357. public function getSource()
  358. {
  359. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  360. return $this->getSourceContext()->getCode();
  361. }
  362. public function getSourceContext()
  363. {
  364. return new Twig_Source("{# Shortcut variables #}
  365. {% set default = mediaembed.config.media %}
  366. {% set oembed = mediaembed.service %}
  367. {# Processing error #}
  368. {% if not mediaembed.success %}
  369. {% if default.responsive %}
  370. {% set class = \"-responsive mediaembed-msod\" %}
  371. {% else %}
  372. {% set class = \" mediaembed-msod\\\" style=\\\"max-width: \" ~ default.width ~ \"px;\" %}
  373. {% endif %}
  374. <div class=\"mediaembed{{ class }}\">
  375. <p class=\"mediaembed-icon\">&#9749;</p>
  376. <p class=\"mediaembed-error-title\"><b>Unable to process oEmbed media:</b><a href=\"{{ mediaembed.raw.src }}\" alt=\"{{ mediaembed.raw.alt }}\" title=\"{{ mediaembed.raw.title }}\">{{ mediaembed.raw.src|e }}</a></p>
  377. <p class=\"mediaembed-error-message\"><b>Error:</b>{{ mediaembed.message }}</p>
  378. </div>
  379. {# Setup block #}
  380. {% else %}
  381. {% set response = oembed.attributes %}
  382. {# Normalize response #}
  383. {% if (response.width is empty) or not (response.width is defined) or (response.width == 0) %}
  384. {% set response = response|merge({'width' : default.width|default(1)}) %}
  385. {% endif %}
  386. {% if (response.height is empty) or not (response.height is defined) or (response.height == 0) %}
  387. {% set response = response|merge({'height' : default.height|default(1)}) %}
  388. {% endif %}
  389. {% set width = response.width %}
  390. {% set height = response.height %}
  391. {% set ratio = height / width %}
  392. {# Adjust OEmbed media dimensions or restrict them? #}
  393. {% if default.adjust %}
  394. {# Check if computed height is larger than default setting #}
  395. {% if (width * ratio) > default.height or (height / ratio) > default.width %}
  396. {# Rescale width and height #}
  397. {% set width = default.width|default(1) %}
  398. {% set height = (default.width * ratio)|round %}
  399. {% endif %}
  400. {% else %}
  401. {% set width = default.width|default(1) %}
  402. {% set height = default.height|default(1) %}
  403. {% endif %}
  404. {# Recompute aspect ratio #}
  405. {% set ratio = height / width %}
  406. {% set container_styles = \"padding-bottom: \" ~ \"%.2f\"|format(ratio * 100) ~ \"%;\" %}
  407. {# Embed responsive OEmbed media #}
  408. {% if default.responsive %}
  409. {% set responsive = \"-responsive\" %}
  410. {% set width = 1920 %}
  411. {% set height = (width * ratio)|round %}
  412. {% else %}
  413. {% set styles = \" style=\\\"max-width: \" ~ width ~ \"px; max-height: \" ~ height ~ \"px;\\\"\" %}
  414. {% endif %}
  415. {# Setup lazy loading media for those with preview enabled #}
  416. {% if default.preview %}
  417. {% set lazyload = \" lazyload\" %}
  418. {% set lazyload_script = \" onclick=\\\"lazyload(this)\\\"\" %}
  419. {% endif %}
  420. <div class=\"mediaembed{{ responsive }} mediaembed-media mediaembed-{{ oembed.type }} mediaembed-{{ oembed.name|lower }}{{ lazyload }}\"{{ styles }}>
  421. <div class=\"mediaembed-container\" style=\"{{ container_styles }}\">
  422. {# Embed content according to media type #}
  423. {# -- Photo -- #}
  424. {% if oembed.type == \"photo\" %}
  425. {% set title = oembed.getOembed().provider_name ~ ': &#8220;' ~ oembed.title ~ '&#8221; by ' ~ oembed.author %}
  426. <a class=\"mediaembed-embed\" href=\"{{ oembed.author('url') }}\" title=\"{{ title }}\">
  427. <img src=\"{{ oembed.url }}\" alt=\"{{ oembed.title }}\">
  428. </a>
  429. {# -- Video -- #}
  430. {% elseif oembed.type == \"video\" %}
  431. <a href=\"{{ oembed.getEmbedCode }}\" alt=\"{{ mediaembed.raw.alt }}\" title=\"{{ mediaembed.raw.title }}\" class=\"mediaembed-media\"{{ lazyload_script }}>
  432. {# JavaScript lazy-loading #}
  433. <!--
  434. <iframe class=\"mediaembed-embed\" src=\"{{ oembed.getEmbedCode }}\" width=\"{{ width }}\" height=\"{{ height }}\" frameborder=\"0\" scrolling=\"no\" webkitallowfullscreen mozallowfullscreen allowfullscreen>
  435. <p>Your browser does not support iframes.</p>
  436. </iframe>
  437. -->
  438. {# Show Thumbnail #}
  439. {% if default.preview and oembed.thumbnail %}
  440. <img src=\"{{ oembed.thumbnail }}\" alt=\"{{ mediaembed.raw.alt }}\" title=\"{{ mediaembed.raw.title }}\" class=\"mediaembed-thumbnail\" />
  441. {% else %}
  442. {# Show placeholder #}
  443. {% endif %}
  444. {# Toggle for loading iframe content #}
  445. <input type=\"checkbox\" id=\"mediaembed-hidden-input-{{ mediaembed.uid }}\" class=\"mediaembed-input\" />
  446. {# Implement JavaScript-less lazyload technique #}
  447. <noscript>
  448. <iframe class=\"mediaembed-embed\" src=\"{{ oembed.getEmbedCode }}\" width=\"{{ width }}\" height=\"{{ height }}\" frameborder=\"0\" scrolling=\"no\" webkitallowfullscreen mozallowfullscreen allowfullscreen style=\"display: none;\">
  449. <p>Your browser does not support iframes.</p>
  450. </iframe>
  451. </noscript>
  452. <label class=\"mediaembed-play\" for=\"mediaembed-hidden-input-{{ mediaembed.uid }}\">&#9654;</label>
  453. </a>
  454. {# -- Link -- #}
  455. {% elseif oembed.type == \"link\" %}
  456. {% set title = oembed.getOembed().provider_name ~ ': &#8220;' ~ oembed.mediaembed.raw.title|default(title) ~ '&#8221; by ' ~ oembed.author %}
  457. <a href=\"{{ mediaembed.raw.src }}\" alt=\"{{ mediaembed.raw.alt }}\" title=\"{{ title }}\">{{ mediaembed.raw.src|e }}</a>
  458. {# -- Rich media -- #}
  459. {% elseif oembed.type == \"rich\" %}
  460. <div class=\"mediaembed-media\">{{ oembed.getEmbedCode() }}</div>
  461. {# -- Nothing from above -- #}
  462. {% else %}
  463. {# Show at least a link for the user #}
  464. <a href=\"{{ mediaembed.raw.src }}\" alt=\"{{ mediaembed.raw.alt }}\" title=\"{{ mediaembed.raw.title }}\">{{ mediaembed.raw.src|e }}</a>
  465. {% endif %}
  466. </div>
  467. </div>
  468. {% endif %}
  469. ", "partials/mediaembed.html.twig", "/home/kevin/Sites/static-ethica.net/user/plugins/mediaembed/templates/partials/mediaembed.html.twig");
  470. }
  471. }