Code cleanup, following and gif support

This commit is contained in:
Pablo Ferreiro 2022-01-06 00:11:00 +01:00
parent 493f56a052
commit 30954f3d3a
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
21 changed files with 318 additions and 123 deletions

View file

@ -3,7 +3,7 @@
<div class="columns is-multiline is-vcentered">
{foreach $feed->items as $item}
<div class="column is-one-quarter">
<a id="{$item->id}" href="#{$item->id}" class="clickable-img"
<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}"
@ -11,12 +11,13 @@
data-video_height="{$item->video->height}"
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 loading="lazy" src="{path('stream?url=' . urlencode($item->video->originCover))}" />
<img class="hidden" loading="lazy" src="{path('stream?url=' . urlencode($item->video->dynamicCover))}" />
</a>
</div>
{/foreach}
</div>
<div class="buttons">
<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}

View 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>

View file

@ -10,6 +10,7 @@
<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>
</div>
</div>

View 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="add">Add
</label>
<label class="radio">
<input type="radio" name="remove">Remove
</label>
</div>
</div>
<div class="field">
<div class="control">
<button class="button is-primary" type="submit">Send</button>
</div>
</div>
</form>

View 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>