proxitok/components/feed.latte

53 lines
2.3 KiB
Plaintext
Raw Normal View History

2022-02-05 18:58:30 -05:00
<link rel="stylesheet" href="{path('/styles/feed.css')}">
<noscript>JavaScript is required for this section to work!</noscript>
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}
2022-01-06 18:13:51 -05:00
<div class="column is-one-quarter">
<a class="clickable-img" id="{$item->id}" href="#{$item->id}"
2022-02-05 18:58:30 -05:00
data-video_url="{path('/stream?url=' . urlencode($item->video->playAddr))}"
data-video_download="{path('/stream?url=' . urlencode($item->video->playAddr) . '&download=1&id=' . $item->id)}"
2022-01-03 07:43:22 -05:00
data-desc="{$item->desc}"
data-music_title="{$item->music->title}"
2022-02-05 18:58:30 -05:00
data-music_url="{path('/stream?url=' . urlencode($item->music->playUrl))}">
<img loading="lazy" src="{path('/stream?url=' . urlencode($item->video->originCover))}" />
<img class="hidden" loading="lazy" data-src="{path('/stream?url=' . urlencode($item->video->dynamicCover))}" />
</a>
2022-01-01 18:42:03 -05:00
</div>
2022-01-03 07:43:22 -05:00
{/foreach}
</div>
<div n:ifset="$feed->info" class="buttons">
{if isset($_GET['cursor']) && $_GET['cursor'] != 0 }
<a class="button is-danger" href="?">First</a>
<button class="button is-danger" onclick="history.back()">Back</button>
{/if}
<a n:attr="disabled => !$feed->hasMore" class="button is-success" href="?cursor={$feed->maxCursor}">Next</a>
</div>
2022-01-01 18:42:03 -05:00
</section>
2022-01-05 15:25:49 -05:00
<!-- MODAL -->
2022-01-01 18:42:03 -05:00
<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">
2022-01-05 15:25:49 -05:00
<a id="download_button" target="_blank" class="button is-info" 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-02-05 18:58:30 -05:00
<script src="{path('/scripts/feed.js')}"></script>