Pictures support
This commit is contained in:
parent
faee8d58f2
commit
33c723d786
5 changed files with 40 additions and 21 deletions
19
templates/components/themes/common/content.latte
Normal file
19
templates/components/themes/common/content.latte
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{if !isset($item->imagePost)}
|
||||
<video controls n:attr="autoplay => $isAutoplay" poster="{url_stream($item->video->originCover)}" preload="none">
|
||||
<source src="{url_stream($item->video->playAddr)}" type="video/mp4" />
|
||||
</video>
|
||||
{else}
|
||||
<div n:class="columns, is-centered, is-vcentered, is-multiline, $isBig ? is-mobile">
|
||||
{foreach $item->imagePost->images as $image}
|
||||
{if $isBig}
|
||||
<div class="column is-half">
|
||||
{else}
|
||||
<div class="column is-one-third-tablet is-one-third-desktop is-one-quarter-widescreen is-one-fifth-fullhd">
|
||||
{/if}
|
||||
<figure class="image">
|
||||
<img width="{$image->imageWidth}" height="{$image->imageHeight}" src="{$image->imageURL->urlList[0]}" />
|
||||
</figure>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
Loading…
Add table
Add a link
Reference in a new issue