fix(embed): set height of player iframe from config
This commit is contained in:
parent
6c010fc5fd
commit
4665741425
|
@ -14,7 +14,7 @@ const ThemePicker = (): void => {
|
||||||
const url: string | undefined = button.dataset.url;
|
const url: string | undefined = button.dataset.url;
|
||||||
if (url) {
|
if (url) {
|
||||||
button.addEventListener("click", () => {
|
button.addEventListener("click", () => {
|
||||||
iframeTextArea.value = `<iframe width="100%" height="280" frameborder="0" scrolling="no" style="width: 100%; height: 280px; overflow: hidden;" src="${url}"></iframe>`;
|
iframeTextArea.value = `<iframe width="100%" height="112" frameborder="0" scrolling="no" style="width: 100%; height: 112px; overflow: hidden;" src="${url}"></iframe>`;
|
||||||
urlTextArea.value = url;
|
urlTextArea.value = url;
|
||||||
iframe.src = url;
|
iframe.src = url;
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
|
$embedHeight = config('Embed')
|
||||||
|
->height;
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
<?= $this->extend('_layout') ?>
|
<?= $this->extend('_layout') ?>
|
||||||
|
|
||||||
<?= $this->section('title') ?>
|
<?= $this->section('title') ?>
|
||||||
|
@ -27,7 +34,7 @@
|
||||||
<iframe name="embed" id="embed" class="w-full max-w-xl mt-6 h-28" frameborder="0" scrolling="no" style="width: 100%; overflow: hidden;" src="<?= $episode->embed_url ?>"></iframe>
|
<iframe name="embed" id="embed" class="w-full max-w-xl mt-6 h-28" frameborder="0" scrolling="no" style="width: 100%; overflow: hidden;" src="<?= $episode->embed_url ?>"></iframe>
|
||||||
|
|
||||||
<div class="flex items-center mt-8 gap-x-2">
|
<div class="flex items-center mt-8 gap-x-2">
|
||||||
<Forms.Textarea readonly="true" class="w-full max-w-xl" name="iframe" rows="2" value="<?= esc("<iframe width=\"100%\" height=\"280\" frameborder=\"0\" scrolling=\"no\" style=\"width: 100%; height: 280px; overflow: hidden;\" src=\"{$episode->embed_url}\"></iframe>") ?>" />
|
<Forms.Textarea readonly="true" class="w-full max-w-xl" name="iframe" rows="2" value="<?= esc("<iframe width=\"100%\" height=\"{$embedHeight}\" frameborder=\"0\" scrolling=\"no\" style=\"width: 100%; height: {$embedHeight}px; overflow: hidden;\" src=\"{$episode->embed_url}\"></iframe>") ?>" />
|
||||||
<IconButton glyph="file-copy" data-type="clipboard-copy" data-clipboard-target="iframe"><?= lang('Episode.embed.clipboard_iframe') ?></IconButton>
|
<IconButton glyph="file-copy" data-type="clipboard-copy" data-clipboard-target="iframe"><?= lang('Episode.embed.clipboard_iframe') ?></IconButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue