proxitok/views/components/feed.latte

53 lines
2.2 KiB
Plaintext
Raw Normal View History

<link rel="stylesheet" href="{assets('feed.css', 'styles')}">
2022-01-01 18:42:03 -05:00
<section class="section">
<div class="columns is-multiline is-vcentered">
2022-01-03 07:43:22 -05:00
{foreach $feed->items as $item}
<div class="column is-one-quarter">
2022-01-03 07:43:22 -05:00
<a id="{$item->id}" href="#{$item->id}" class="clickable-img"
data-video_url="{path('stream?url=' . urlencode($item->video->playAddr))}"
data-video_download="{path('stream?url=' . urlencode($item->video->playAddr) . '&download=1')}"
2022-01-03 07:43:22 -05:00
data-desc="{$item->desc}"
data-video_width="{$item->video->width}"
data-video_height="{$item->video->height}"
data-music_title="{$item->music->title}"
data-music_url="{path('audios?url=' . urlencode($item->music->playUrl))}">
<img loading="lazy" src="{path('images?url=' . urlencode($item->video->originCover))}"/>
</a>
2022-01-01 18:42:03 -05:00
</div>
2022-01-03 07:43:22 -05:00
{/foreach}
</div>
<div class="buttons">
2022-01-03 07:43:22 -05:00
<a n:ifset="$_GET['cursor']" class="button is-danger" href="?cursor=0">First</a>
<a class="button is-danger" href="javascript:history.back()">Back</a>
2022-01-03 07:43:22 -05:00
{if $feed->hasMore}
<a n-if="$feed->hasMore" class="button is-success" href="?cursor={$feed->maxCursor}">Next</a>
{else}
<a class="button is-success" disabled title="No more videos available">Next</a>
2022-01-03 07:43:22 -05:00
{/if}
</div>
2022-01-01 18:42:03 -05:00
</section>
<div id="modal" class="modal">
<div id="modal-background" class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<button id="modal-close" class="delete" aria-label="close"></button>
<p class="modal-card-title" id="item_title"></p>
</header>
<section class="modal-card-body has-text-centered" style="overflow: hidden;">
<video id="video" controls preload="none"></video>
</section>
<footer class="modal-card-foot has-text-centered">
<div class="container">
<a id="download_button" target="_blank" class="button is-info" href="" download>Download</a>
<p id="audio_title"></p>
<audio id="audio" controls preload="none"></audio>
2022-01-03 07:43:22 -05:00
<div class="buttons is-centered">
<button id="back-button" class="button is-danger">Back</button>
<button id="next-button" class="button is-success">Next</button>
</div>
</div>
</footer>
</div>
2022-01-01 18:42:03 -05:00
</div>
2022-01-03 08:21:35 -05:00
<script src="{assets('feed.js', 'scripts')}"></script>