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">
|
2022-01-02 11:39:22 -05:00
|
|
|
<div class="columns is-multiline is-vcentered">
|
2022-01-03 07:43:22 -05:00
|
|
|
{foreach $feed->items as $item}
|
2022-02-13 04:57:08 -05:00
|
|
|
{do $share_url = 'https://tiktok.com/@' . $item->author->uniqueId . '/video/' . $item->id}
|
2022-02-07 16:23:33 -05:00
|
|
|
<div class="column is-one-quarter clickable-img" id="{$item->id}" onclick="openVideo(this.id)"
|
|
|
|
data-video_url="{path('/stream?url=' . urlencode($item->video->playAddr))}"
|
|
|
|
data-video_download_watermark="{path('/stream?url=' . urlencode($item->video->playAddr) . '&download=1&id=' . $item->id . '&user=' . $item->author->uniqueId) . '&watermark='}"
|
2022-02-07 17:45:07 -05:00
|
|
|
data-video_download_nowatermark="{path('/stream?download=1&id=' . $item->id . '&user=' . $item->author->uniqueId)}"
|
2022-02-07 16:23:33 -05:00
|
|
|
data-video_share_url="{$share_url}"
|
|
|
|
data-desc="{$item->desc}"
|
|
|
|
data-music_title="{$item->music->title}"
|
|
|
|
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))}" />
|
2022-01-01 18:42:03 -05:00
|
|
|
</div>
|
2022-01-03 07:43:22 -05:00
|
|
|
{/foreach}
|
2022-01-02 11:39:22 -05:00
|
|
|
</div>
|
2022-02-13 16:21:08 -05:00
|
|
|
<div class="buttons">
|
2022-02-07 12:32:45 -05:00
|
|
|
{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>
|
2022-02-06 08:22:23 -05:00
|
|
|
{/if}
|
2022-02-07 12:32:45 -05:00
|
|
|
<a n:attr="disabled => !$feed->hasMore" class="button is-success" href="?cursor={$feed->maxCursor}">Next</a>
|
2022-01-02 11:39:22 -05:00
|
|
|
</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">
|
2022-01-02 11:39:22 -05:00
|
|
|
<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;">
|
2022-02-07 16:23:33 -05:00
|
|
|
<video id="video" autoplay controls></video>
|
2022-01-02 11:39:22 -05:00
|
|
|
</section>
|
|
|
|
<footer class="modal-card-foot has-text-centered">
|
|
|
|
<div class="container">
|
2022-02-07 16:23:33 -05:00
|
|
|
<div class="field has-addons has-addons-centered">
|
|
|
|
<div class="control">
|
|
|
|
<input id="share_input" class="input" readonly />
|
|
|
|
</div>
|
|
|
|
<div class="control">
|
|
|
|
<button class="button is-primary" onclick="copyShare()">Copy</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-07 15:07:51 -05:00
|
|
|
<div class="buttons is-centered">
|
2022-02-07 17:45:07 -05:00
|
|
|
<a target="_blank" id="download_watermark" class="button is-info">Download with watermark</a>
|
2022-02-07 15:07:51 -05:00
|
|
|
<a target="_blank" id="download_nowatermark" class="button is-info">Download without watermark</a>
|
|
|
|
</div>
|
2022-01-02 11:39:22 -05:00
|
|
|
<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">
|
2022-01-02 11:39:22 -05:00
|
|
|
<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>
|