rss auto discovery

This commit is contained in:
Pablo Ferreiro 2022-06-12 12:50:41 +02:00
parent 26bde1e4a8
commit 9d37bc433d
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
5 changed files with 10 additions and 2 deletions

View file

@ -5,6 +5,9 @@
<meta property="og:title" content="ProxiTok" />
<meta property="og:description" content="Alternative frontend for TikTok" />
<meta property="og:type" content="website" />
{if isset($has_rss)}
<link rel="alternate" type="application/rss+xml" title="{$title}" href="{$_SERVER['REQUEST_URI'] . '/rss'}" />
{/if}
<link rel="stylesheet" href="{path('/styles/vendor/cssgg.min.css')}">
<link rel="stylesheet" href="{path('/styles/vendor/bulma.min.css')}">
<title>{$title} - ProxiTok</title>

View file

@ -1,8 +1,7 @@
<div n:ifset="$data->info" class="buttons">
{* is_numeric is used to avoid having a back button with ttwid cursors *}
{if isset($_GET['cursor']) && is_numeric($_GET['cursor']) && $_GET['cursor'] != 0 }
{if isset($_GET['cursor']) && is_numeric($_GET['cursor']) && $_GET['cursor'] != 0}
<a class="button is-danger" href="?cursor=0">First</a>
<a class="button is-danger" href="?cursor={$data->feed->minCursor}">Back</a>
{/if}
<a n:attr="disabled => !$data->feed->hasMore" class="button is-success" href="?cursor={$data->feed->maxCursor}">Next</a>
</div>

View file

@ -1,5 +1,7 @@
{layout '../layouts/default.latte'}
{var $has_rss = true}
{block header}
{if $data->info->detail->profileThumb !== ''}
<figure class="figure is-96x96">

View file

@ -1,5 +1,7 @@
{layout '../layouts/default.latte'}
{var $has_rss = true}
{block header}
<p class="title">Trending</p>
<p class="subtitle">{include '../components/rss.latte'}</p>

View file

@ -1,5 +1,7 @@
{layout '../layouts/default.latte'}
{var $has_rss = true}
{block header}
<figure class="figure is-96x96">
<img src="{path('/stream?url=' . urlencode($data->info->detail->avatarThumb))}" />