Changed rendering template and router

This commit is contained in:
Pablo Ferreiro 2022-01-03 13:43:22 +01:00
parent 5ae3b5c11c
commit 328f70e4f6
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
14 changed files with 331 additions and 1207 deletions

View file

@ -8,7 +8,7 @@
<link rel="stylesheet" href="https://unpkg.com/bulmaswatch/superhero/bulmaswatch.min.css">
</head>
<body>
@include('navbar')
{include 'navbar.latte'}
<section class="hero is-primary">
<div class="hero-body">
<div class="container">
@ -19,6 +19,6 @@
<section class="section">
<p>TODO</p>
</section>
@include('footer')
{include 'footer.latte'}
</body>
</html>

View file

@ -1,30 +1,28 @@
<section class="section">
<div class="columns is-multiline is-vcentered">
@foreach ($feed->items as $item)
{foreach $feed->items as $item}
<div class="column is-one-quarter">
<a id="{{$item->id}}" href="#{{$item->id}}" class="clickable-img"
data-video_url="./stream?url={{ $item->video->playAddr }}"
data-video_download="./stream?url={{urlencode($item->video->downloadAddr)}}"
data-desc="{{ $item->desc }}"
data-video_width="{{ $item->video->width }}"
data-video_height="{{ $item->video->height }}"
data-music_title="{{ $item->music->title }}"
data-music_url="./audios?url={{ urlencode($item->music->playUrl) }}">
<img loading="lazy" src="./images?url={{ urlencode($item->video->originCover) }}"/>
<a id="{$item->id}" href="#{$item->id}" class="clickable-img"
data-video_url="./stream?url={$item->video->playAddr}"
data-video_download="./stream?url={urlencode($item->video->downloadAddr)}&download=1"
data-desc="{$item->desc}"
data-video_width="{$item->video->width}"
data-video_height="{$item->video->height}"
data-music_title="{$item->music->title}"
data-music_url="./audios?url={urlencode($item->music->playUrl)}">
<img loading="lazy" src="./images?url={urlencode($item->video->originCover)}"/>
</a>
</div>
@endforeach
{/foreach}
</div>
<div class="buttons">
@isset ($_GET['cursor'])
<a class="button is-danger" href="?cursor=0">First</a>
@endisset
<a n:ifset="$_GET['cursor']" class="button is-danger" href="?cursor=0">First</a>
<a class="button is-danger" href="javascript:history.back()">Back</a>
@if ($feed->hasMore)
<a class="button is-success" href="?cursor={{ $feed->maxCursor }}">Next</a>
@else
{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>
@endif
{/if}
</div>
</section>
<div id="modal" class="modal">
@ -42,7 +40,7 @@
<a id="download_button" target="_blank" class="button is-info" href="" download>Download</a>
<p id="audio_title"></p>
<audio id="audio" controls preload="none"></audio>
<div class="buttons">
<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>

View file

@ -10,7 +10,7 @@
</head>
<body>
@include('navbar')
{include 'navbar.latte'}
<section class="hero is-fullheight-with-navbar">
<div class="hero-body">
<div class="container has-text-centered">
@ -33,10 +33,10 @@
</div>
</div>
<div class="hero-foot">
@include('footer')
{include 'footer.latte'}
</div>
</section>
<script>
<script n:syntax=off>
const goToUser = (e) => {
e.preventDefault()
const formData = new FormData(e.target)

View file

@ -8,7 +8,7 @@
<link rel="stylesheet" href="https://unpkg.com/bulmaswatch/superhero/bulmaswatch.min.css">
</head>
<body>
@include('navbar')
{include 'navbar.latte'}
<section class="hero is-primary">
<div class="hero-body">
<div class="container">
@ -20,14 +20,14 @@
<!-- Proxy settings -->
<p class="title">Proxy</p>
<form action="./settings" method="POST">
@foreach ( $proxy_elements as $element)
{foreach $proxy_elements as $proxy_element}
<div class="field">
<label class="label">{{ $element }}</label>
<label class="label">{$proxy_element}</label>
<div class="control">
<input name="{{ $element }}" class="input" value="{{ isset($_COOKIE[$element]) ? $_COOKIE[$element] : ''}}" required />
<input name="{$proxy_element}" class="input" value="{isset($_COOKIE[$proxy_element]) ? $_COOKIE[$proxy_element] : ''}" required />
</div>
</div>
@endforeach
{/foreach}
<div class="field">
<div class="control">
<button class="button is-success" type="submit">Submit</button>
@ -35,6 +35,6 @@
</div>
</form>
</section>
@include('footer')
{include 'footer.latte'}
</body>
</html>

View file

@ -9,6 +9,7 @@
<link rel="stylesheet" href="../styles/feed.css">
</head>
<body>
{include 'navbar.latte'}
<section class="hero is-primary">
<div class="hero-body">
<div class="container">
@ -16,8 +17,7 @@
</div>
</div>
</section>
@include('navbar')
@include('feed')
@include('footer')
{include 'feed.latte'}
{include 'footer.latte'}
</body>
</html>

View file

@ -4,21 +4,21 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{ $feed->info->detail->user->nickname }} - TikTok</title>
<title>{$feed->info->detail->user->nickname} - TikTok</title>
<link rel="stylesheet" href="https://unpkg.com/bulmaswatch/superhero/bulmaswatch.min.css">
<link rel="stylesheet" href="../styles/feed.css">
</head>
<body>
@include('navbar')
{include 'navbar.latte'}
<section class="hero is-primary">
<div class="hero-body">
<div class="container">
<p class="title">{{ $feed->info->detail->user->uniqueId }}'s profile</p>
<p class="subtitle">{{ $feed->info->detail->user->signature }}</p>
<p class="title">{$feed->info->detail->user->uniqueId}'s profile</p>
<p class="subtitle">{$feed->info->detail->user->signature}</p>
</div>
</div>
</section>
@include('feed')
@include('footer')
{include 'feed.latte'}
{include 'footer.latte'}
</body>
</html>