Layout system
This commit is contained in:
parent
ba719e45b2
commit
dde4185ad7
22 changed files with 228 additions and 274 deletions
53
components/feed.latte
Normal file
53
components/feed.latte
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<link rel="stylesheet" href="{assets('feed.css', 'styles')}">
|
||||
<section class="section">
|
||||
<div class="columns is-multiline is-vcentered">
|
||||
{foreach $feed->items as $item}
|
||||
<div class="column is-one-quarter">
|
||||
<a class="clickable-img" id="{$item->id}" href="#{$item->id}"
|
||||
data-video_url="{path('stream?url=' . urlencode($item->video->playAddr))}"
|
||||
data-video_download="{path('stream?url=' . urlencode($item->video->playAddr) . '&download=1')}"
|
||||
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))}" />
|
||||
</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div n:ifset="$feed->info" class="buttons">
|
||||
<a n:ifset="$_GET['cursor']" class="button is-danger" href="?cursor=0">First</a>
|
||||
<a class="button is-danger" href="?cursor={$feed->minCursor}">Back</a>
|
||||
{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>
|
||||
{/if}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- MODAL -->
|
||||
<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" download>Download</a>
|
||||
<p id="audio_title"></p>
|
||||
<audio id="audio" controls preload="none"></audio>
|
||||
<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>
|
||||
</div>
|
||||
<script src="{assets('feed.js', 'scripts')}"></script>
|
||||
9
components/following_tags.latte
Normal file
9
components/following_tags.latte
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<div class="tags">
|
||||
{if !empty($following)}
|
||||
{foreach $following as $user}
|
||||
<span class="tag">{$user}</span>
|
||||
{/foreach}
|
||||
{else}
|
||||
<p>None</p>
|
||||
{/if}
|
||||
</div>
|
||||
7
components/footer.latte
Normal file
7
components/footer.latte
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<footer class="footer">
|
||||
<div class="content">
|
||||
<p class="has-text-centered">
|
||||
Made with <span style="color: #e25555;">♥</span> in <a href="https://github.com/pablouser1/ProxiTok">Github</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
7
components/head.latte
Normal file
7
components/head.latte
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="{assets('bulma.min.css', 'styles')}">
|
||||
<title>{$title} - ProxiTok</title>
|
||||
</head>
|
||||
19
components/navbar.latte
Normal file
19
components/navbar.latte
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<nav class="navbar" role="navigation" aria-label="main navigation">
|
||||
<div class="navbar-brand">
|
||||
<a role="button" id="navbar-burger" class="navbar-burger" aria-label="menu" aria-expanded="false">
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="navbar-menu" class="navbar-menu">
|
||||
<div class="navbar-start">
|
||||
<a href="{path('')}" class="navbar-item">Home</a>
|
||||
<a href="{path('following')}" class="navbar-item">Following</a>
|
||||
<a href="{path('settings')}" class="navbar-item">Settings</a>
|
||||
<a href="{path('about')}" class="navbar-item">About</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script src="{assets('navbar.js', 'scripts')}"></script>
|
||||
24
components/settings/following.latte
Normal file
24
components/settings/following.latte
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{include '../following_tags.latte'}
|
||||
<form action="./settings/following" method="POST">
|
||||
<div class="field">
|
||||
<label class="label">Add / Remove user</label>
|
||||
<div class="control">
|
||||
<input name="account" class="input" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<label class="radio">
|
||||
<input type="radio" name="mode" value="add">Add
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="mode" value="remove">Remove
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<button class="button is-primary" type="submit">Send</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
15
components/settings/proxy.latte
Normal file
15
components/settings/proxy.latte
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<form action="./settings/proxy" method="POST">
|
||||
{foreach $proxy_elements as $proxy_element}
|
||||
<div class="field">
|
||||
<label class="label">{$proxy_element}</label>
|
||||
<div class="control">
|
||||
<input name="{$proxy_element}" class="input" value="{isset($_COOKIE[$proxy_element]) ? $_COOKIE[$proxy_element] : ''}" required />
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<button class="button is-success" type="submit">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue