Added external embeds
This commit is contained in:
parent
5972139552
commit
516a054c31
6 changed files with 70 additions and 16 deletions
|
@ -74,6 +74,9 @@
|
|||
<p>
|
||||
Progress: {progress * 100}%
|
||||
</p>
|
||||
{#if form.success}
|
||||
<p>{form.success}</p>
|
||||
{/if}
|
||||
<p>
|
||||
<Button class="upload-btn" clickFunc={ () => fileInput.click() }>Upload</Button>
|
||||
</p>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<style>
|
||||
img {
|
||||
img, video {
|
||||
max-width: 100px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
img.only-img {
|
||||
.only-img {
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
|
@ -34,9 +34,19 @@
|
|||
{:else}
|
||||
<img src={elem.url} alt='Image preview'>
|
||||
{/if}
|
||||
{:else if elem.type == 'video'}
|
||||
{#if line.filter(x => x.type == 'video').length < 2}
|
||||
<video class='only-img' alt='Video preview' controls>
|
||||
<source src={elem.url}>
|
||||
</video>
|
||||
{:else}
|
||||
<video alt='Video preview' controls>
|
||||
<source src={elem.url}>
|
||||
</video>
|
||||
{/if}
|
||||
{:else if elem.type == 'link'}
|
||||
<a href={elem.url}>{elem.display + ' '}</a>
|
||||
{:else}
|
||||
{:else if !elem.type}
|
||||
{elem + ' '}
|
||||
{/if}
|
||||
{/each}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue