Compare commits
No commits in common. "9012ea59775a7e6e465c9b68414f1a8f3d60e80b" and "4188fcf0642bd16174b250f16b819aa9e7bce427" have entirely different histories.
9012ea5977
...
4188fcf064
|
@ -6,7 +6,7 @@ use App\Helpers\Wrappers;
|
||||||
use App\Models\DiscoverTemplate;
|
use App\Models\DiscoverTemplate;
|
||||||
|
|
||||||
class DiscoverController {
|
class DiscoverController {
|
||||||
public static function get() {
|
static public function get() {
|
||||||
$api = Wrappers::api();
|
$api = Wrappers::api();
|
||||||
$data = $api->discover();
|
$data = $api->discover();
|
||||||
if ($data->meta->success) {
|
if ($data->meta->success) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ use App\Helpers\Wrappers;
|
||||||
use App\Models\VideoTemplate;
|
use App\Models\VideoTemplate;
|
||||||
|
|
||||||
class EmbedController {
|
class EmbedController {
|
||||||
public static function v2(int $id) {
|
static public function v2(int $id) {
|
||||||
$api = Wrappers::api();
|
$api = Wrappers::api();
|
||||||
$video = $api->video($id);
|
$video = $api->video($id);
|
||||||
$video->feed();
|
$video->feed();
|
||||||
|
|
|
@ -7,7 +7,7 @@ use App\Helpers\Wrappers;
|
||||||
use App\Models\FullTemplate;
|
use App\Models\FullTemplate;
|
||||||
|
|
||||||
class MusicController {
|
class MusicController {
|
||||||
public static function get(string $music_id) {
|
static public function get(string $music_id) {
|
||||||
$cursor = Misc::getCursor();
|
$cursor = Misc::getCursor();
|
||||||
|
|
||||||
$api = Wrappers::api();
|
$api = Wrappers::api();
|
||||||
|
|
|
@ -10,7 +10,7 @@ class ProxyController {
|
||||||
"tiktokcdn.com", "tiktokcdn-us.com", "tiktok.com"
|
"tiktokcdn.com", "tiktokcdn-us.com", "tiktok.com"
|
||||||
];
|
];
|
||||||
|
|
||||||
public static function stream() {
|
static public function stream() {
|
||||||
self::checkUrl();
|
self::checkUrl();
|
||||||
$url = $_GET['url'];
|
$url = $_GET['url'];
|
||||||
$config['user_agent'] = Misc::env("USER_AGENT", TikScraperUserAgents::DEFAULT);
|
$config['user_agent'] = Misc::env("USER_AGENT", TikScraperUserAgents::DEFAULT);
|
||||||
|
@ -18,7 +18,7 @@ class ProxyController {
|
||||||
$streamer->url($url);
|
$streamer->url($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function download() {
|
static public function download() {
|
||||||
self::checkUrl();
|
self::checkUrl();
|
||||||
$method = Cookies::downloader();
|
$method = Cookies::downloader();
|
||||||
$downloader = new \TikScraper\Download($method);
|
$downloader = new \TikScraper\Download($method);
|
||||||
|
|
|
@ -8,7 +8,7 @@ use App\Helpers\UrlBuilder;
|
||||||
* Used to be compatible with HTML forms
|
* Used to be compatible with HTML forms
|
||||||
*/
|
*/
|
||||||
class RedirectController {
|
class RedirectController {
|
||||||
public static function search() {
|
static public function search() {
|
||||||
$endpoint = '/';
|
$endpoint = '/';
|
||||||
if (isset($_GET['type'], $_GET['term'])) {
|
if (isset($_GET['type'], $_GET['term'])) {
|
||||||
$term = trim($_GET['term']);
|
$term = trim($_GET['term']);
|
||||||
|
@ -49,7 +49,7 @@ class RedirectController {
|
||||||
header("Location: {$url}");
|
header("Location: {$url}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function download() {
|
static public function download() {
|
||||||
if (!(isset($_GET['videoId'], $_GET['authorUsername'], $_GET['playAddr']))) {
|
if (!(isset($_GET['videoId'], $_GET['authorUsername'], $_GET['playAddr']))) {
|
||||||
ErrorHandler::showText(400, 'Request incomplete');
|
ErrorHandler::showText(400, 'Request incomplete');
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -7,11 +7,11 @@ use App\Helpers\Wrappers;
|
||||||
use App\Models\SettingsTemplate;
|
use App\Models\SettingsTemplate;
|
||||||
|
|
||||||
class SettingsController {
|
class SettingsController {
|
||||||
public static function index() {
|
static public function index() {
|
||||||
Wrappers::latte('settings', new SettingsTemplate());
|
Wrappers::latte('settings', new SettingsTemplate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function general() {
|
static public function general() {
|
||||||
if (isset($_POST['theme'])) {
|
if (isset($_POST['theme'])) {
|
||||||
$theme = $_POST['theme'];
|
$theme = $_POST['theme'];
|
||||||
Cookies::set('theme', $theme);
|
Cookies::set('theme', $theme);
|
||||||
|
@ -19,7 +19,7 @@ class SettingsController {
|
||||||
self::redirect();
|
self::redirect();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function api() {
|
static public function api() {
|
||||||
// TODO, ADD COUNT
|
// TODO, ADD COUNT
|
||||||
if (isset($_POST['api-test_endpoints'])) {
|
if (isset($_POST['api-test_endpoints'])) {
|
||||||
$test_endpoints = $_POST['api-test_endpoints'];
|
$test_endpoints = $_POST['api-test_endpoints'];
|
||||||
|
|
|
@ -9,7 +9,7 @@ use App\Models\FullTemplate;
|
||||||
use App\Models\RSSTemplate;
|
use App\Models\RSSTemplate;
|
||||||
|
|
||||||
class TagController {
|
class TagController {
|
||||||
public static function get(string $name) {
|
static public function get(string $name) {
|
||||||
$cursor = Misc::getCursor();
|
$cursor = Misc::getCursor();
|
||||||
$api = Wrappers::api();
|
$api = Wrappers::api();
|
||||||
$hashtag = $api->hashtag($name);
|
$hashtag = $api->hashtag($name);
|
||||||
|
@ -23,7 +23,7 @@ class TagController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function rss(string $name) {
|
static public function rss(string $name) {
|
||||||
$api = Wrappers::api();
|
$api = Wrappers::api();
|
||||||
$hashtag = $api->hashtag($name);
|
$hashtag = $api->hashtag($name);
|
||||||
$hashtag->feed();
|
$hashtag->feed();
|
||||||
|
|
|
@ -8,7 +8,7 @@ use App\Helpers\Wrappers;
|
||||||
use App\Models\RSSTemplate;
|
use App\Models\RSSTemplate;
|
||||||
|
|
||||||
class TrendingController {
|
class TrendingController {
|
||||||
public static function get() {
|
static public function get() {
|
||||||
$api = Wrappers::api();
|
$api = Wrappers::api();
|
||||||
$cursor = Misc::getTtwid();
|
$cursor = Misc::getTtwid();
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ class TrendingController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function rss() {
|
static public function rss() {
|
||||||
$api = Wrappers::api();
|
$api = Wrappers::api();
|
||||||
$trending = $api->trending();
|
$trending = $api->trending();
|
||||||
$trending->feed();
|
$trending->feed();
|
||||||
|
|
|
@ -10,7 +10,7 @@ use App\Models\RSSTemplate;
|
||||||
use App\Models\VideoTemplate;
|
use App\Models\VideoTemplate;
|
||||||
|
|
||||||
class UserController {
|
class UserController {
|
||||||
public static function get(string $username) {
|
static public function get(string $username) {
|
||||||
$cursor = Misc::getCursor();
|
$cursor = Misc::getCursor();
|
||||||
$api = Wrappers::api();
|
$api = Wrappers::api();
|
||||||
$user = $api->user($username);
|
$user = $api->user($username);
|
||||||
|
@ -24,7 +24,7 @@ class UserController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function video(string $username, string $video_id) {
|
static public function video(string $username, string $video_id) {
|
||||||
$api = Wrappers::api();
|
$api = Wrappers::api();
|
||||||
$video = $api->video($video_id);
|
$video = $api->video($video_id);
|
||||||
$video->feed();
|
$video->feed();
|
||||||
|
@ -37,7 +37,7 @@ class UserController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function rss(string $username) {
|
static public function rss(string $username) {
|
||||||
$api = Wrappers::api();
|
$api = Wrappers::api();
|
||||||
$user = $api->user($username);
|
$user = $api->user($username);
|
||||||
$user->feed();
|
$user->feed();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
namespace App\Controllers;
|
namespace App\Controllers;
|
||||||
|
|
||||||
class VideoController {
|
class VideoController {
|
||||||
public static function get(string $video_id) {
|
static public function get(string $video_id) {
|
||||||
UserController::video('placeholder', $video_id);
|
UserController::video('placeholder', $video_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,14 +4,14 @@ namespace App\Helpers;
|
||||||
use App\Constants\Themes;
|
use App\Constants\Themes;
|
||||||
|
|
||||||
class Cookies {
|
class Cookies {
|
||||||
public static function get(string $name, string $default_value = ''): string {
|
static public function get(string $name, string $default_value = ''): string {
|
||||||
if (isset($_COOKIE[$name]) && !empty($_COOKIE[$name])) {
|
if (isset($_COOKIE[$name]) && !empty($_COOKIE[$name])) {
|
||||||
return $_COOKIE[$name];
|
return $_COOKIE[$name];
|
||||||
}
|
}
|
||||||
return $default_value;
|
return $default_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function theme(): string {
|
static public function theme(): string {
|
||||||
$theme = self::get('theme');
|
$theme = self::get('theme');
|
||||||
$ref = new \ReflectionClass(Themes::class);
|
$ref = new \ReflectionClass(Themes::class);
|
||||||
$themes = $ref->getConstants();
|
$themes = $ref->getConstants();
|
||||||
|
@ -21,20 +21,20 @@ class Cookies {
|
||||||
return 'default';
|
return 'default';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function downloader(): string {
|
static public function downloader(): string {
|
||||||
$downloader = self::get('api-downloader', 'default');
|
$downloader = self::get('api-downloader', 'default');
|
||||||
return $downloader;
|
return $downloader;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function exists(string $name): bool {
|
static public function exists(string $name): bool {
|
||||||
return isset($_COOKIE[$name]);
|
return isset($_COOKIE[$name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function check(string $name, string $value): bool {
|
static public function check(string $name, string $value): bool {
|
||||||
return self::exists($name) && $_COOKIE[$name] === $value;
|
return self::exists($name) && $_COOKIE[$name] === $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function set(string $name, string $value) {
|
static public function set(string $name, string $value) {
|
||||||
setcookie($name, $value, time()+60*60*24*30, '/', '', isset($_SERVER['HTTPS']), true);
|
setcookie($name, $value, time()+60*60*24*30, '/', '', isset($_SERVER['HTTPS']), true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,12 +5,12 @@ use App\Models\ErrorTemplate;
|
||||||
use TikScraper\Models\Meta;
|
use TikScraper\Models\Meta;
|
||||||
|
|
||||||
class ErrorHandler {
|
class ErrorHandler {
|
||||||
public static function showMeta(Meta $meta) {
|
static public function showMeta(Meta $meta) {
|
||||||
http_response_code($meta->http_code);
|
http_response_code($meta->http_code);
|
||||||
Wrappers::latte('error', new ErrorTemplate($meta->http_code, $meta->tiktok_msg, $meta->tiktok_code));
|
Wrappers::latte('error', new ErrorTemplate($meta->http_code, $meta->tiktok_msg, $meta->tiktok_code));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function showText(int $code, string $msg) {
|
static public function showText(int $code, string $msg) {
|
||||||
http_response_code($code);
|
http_response_code($code);
|
||||||
Wrappers::latte('error', new ErrorTemplate($code, $msg));
|
Wrappers::latte('error', new ErrorTemplate($code, $msg));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,34 +2,33 @@
|
||||||
namespace App\Helpers;
|
namespace App\Helpers;
|
||||||
|
|
||||||
class Misc {
|
class Misc {
|
||||||
public static function getCursor(): int {
|
static public function getCursor(): int {
|
||||||
return isset($_GET['cursor']) && is_numeric($_GET['cursor']) ? (int) $_GET['cursor'] : 0;
|
return isset($_GET['cursor']) && is_numeric($_GET['cursor']) ? (int) $_GET['cursor'] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getTtwid(): string {
|
static public function getTtwid(): string {
|
||||||
return isset($_GET['cursor']) ? $_GET['cursor'] : '';
|
return isset($_GET['cursor']) ? $_GET['cursor'] : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function url(string $endpoint = ''): string {
|
static public function url(string $endpoint = ''): string {
|
||||||
return self::env('APP_URL', '') . $endpoint;
|
return self::env('APP_URL', '') . $endpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function env(string $key, $default_value) {
|
static public function env(string $key, $default_value) {
|
||||||
return $_ENV[$key] ?? $default_value;
|
return $_ENV[$key] ?? $default_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns absolute path for view
|
* Returns absolute path for view
|
||||||
*/
|
*/
|
||||||
public static function getView(string $template): string {
|
static public function getView(string $template): string {
|
||||||
return __DIR__ . "/../../templates/views/{$template}.latte";
|
return __DIR__ . "/../../templates/views/{$template}.latte";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common method for rss feeds
|
* Common method for rss feeds
|
||||||
*/
|
*/
|
||||||
public static function rss(string $title) {
|
static public function rss(string $title) {
|
||||||
header('Content-Type: application/rss+xml');
|
|
||||||
header('Content-Disposition: attachment; filename="' . $title . '.rss' . '"');
|
header('Content-Disposition: attachment; filename="' . $title . '.rss' . '"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,29 +2,29 @@
|
||||||
namespace App\Helpers;
|
namespace App\Helpers;
|
||||||
|
|
||||||
class UrlBuilder {
|
class UrlBuilder {
|
||||||
public static function stream(string $url): string {
|
static public function stream(string $url): string {
|
||||||
return Misc::url('/stream?url=' . urlencode($url));
|
return Misc::url('/stream?url=' . urlencode($url));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function download(string $url, string $username, string $id, bool $watermark): string {
|
static public function download(string $url, string $username, string $id, bool $watermark): string {
|
||||||
$down_url = Misc::url('/download?url=' . urlencode($url) . '&id=' . $id . '&user=' . $username);
|
$down_url = Misc::url('/download?url=' . urlencode($url) . '&id=' . $id . '&user=' . $username);
|
||||||
if ($watermark) $down_url .= '&watermark=1';
|
if ($watermark) $down_url .= '&watermark=1';
|
||||||
return $down_url;
|
return $down_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function user(string $username): string {
|
static public function user(string $username): string {
|
||||||
return Misc::url('/@' . $username);
|
return Misc::url('/@' . $username);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function tag(string $tag): string {
|
static public function tag(string $tag): string {
|
||||||
return Misc::url('/tag/' . $tag);
|
return Misc::url('/tag/' . $tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function video_internal(string $username, string $id): string {
|
static public function video_internal(string $username, string $id): string {
|
||||||
return Misc::url('/@' . $username . "/video/" . $id);
|
return Misc::url('/@' . $username . "/video/" . $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function video_external(string $username, string $id): string {
|
static public function video_external(string $username, string $id): string {
|
||||||
return "https://www.tiktok.com/@" . $username . "/video/" . $id;
|
return "https://www.tiktok.com/@" . $username . "/video/" . $id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ class Wrappers {
|
||||||
/**
|
/**
|
||||||
* Setup of Latte template engine
|
* Setup of Latte template engine
|
||||||
*/
|
*/
|
||||||
public static function latte(string $template, BaseTemplate $base) {
|
static public function latte(string $template, BaseTemplate $base) {
|
||||||
$latte = new \Latte\Engine;
|
$latte = new \Latte\Engine;
|
||||||
$cache_path = Misc::env('LATTE_CACHE', __DIR__ . '/../../cache/latte');
|
$cache_path = Misc::env('LATTE_CACHE', __DIR__ . '/../../cache/latte');
|
||||||
$latte->setTempDirectory($cache_path);
|
$latte->setTempDirectory($cache_path);
|
||||||
|
@ -91,19 +91,9 @@ class Wrappers {
|
||||||
return UrlBuilder::download($url, $username, $id, $watermark);
|
return UrlBuilder::download($url, $username, $id, $watermark);
|
||||||
});
|
});
|
||||||
|
|
||||||
$latte->addFunction('bool_to_str', function (bool $cond): string {
|
|
||||||
return $cond ? 'yes' : 'no';
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add URLs to video descriptions
|
// Add URLs to video descriptions
|
||||||
// TODO: Make it work with unicode characters such as emojis
|
// TODO: Make it work with unicode characters such as emojis
|
||||||
$latte->addFunction('render_desc', function (string $desc, array $textExtras = []): string {
|
$latte->addFunction('render_desc', function (string $desc, array $textExtras = []): string {
|
||||||
$bytesCount = strlen($desc);
|
|
||||||
$charsCount = mb_strlen($desc);
|
|
||||||
// Skip urlify for now if there is a special char like an emoji to avoid issues
|
|
||||||
if ($bytesCount !== $charsCount) {
|
|
||||||
return $desc;
|
|
||||||
}
|
|
||||||
$sanitizedDesc = htmlspecialchars($desc);
|
$sanitizedDesc = htmlspecialchars($desc);
|
||||||
$out = $sanitizedDesc;
|
$out = $sanitizedDesc;
|
||||||
foreach ($textExtras as $extra) {
|
foreach ($textExtras as $extra) {
|
||||||
|
@ -131,7 +121,7 @@ class Wrappers {
|
||||||
/**
|
/**
|
||||||
* Setup of TikTok Api wrapper
|
* Setup of TikTok Api wrapper
|
||||||
*/
|
*/
|
||||||
public static function api(): \TikScraper\Api {
|
static public function api(): \TikScraper\Api {
|
||||||
$method = Misc::env('API_SIGNER', '');
|
$method = Misc::env('API_SIGNER', '');
|
||||||
$url = Misc::env('API_SIGNER_URL', '');
|
$url = Misc::env('API_SIGNER_URL', '');
|
||||||
if (!$method) {
|
if (!$method) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "pablouser1/proxitok",
|
"name": "pablouser1/proxitok",
|
||||||
"description": "An alternative frontend for TikTok",
|
"description": "An alternative frontend for TikTok",
|
||||||
"version": "2.4.9.1",
|
"version": "2.4.8.1",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
14
composer.lock
generated
14
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "790ea9098323ef66c520cfe44b92b7d3",
|
"content-hash": "15a71acabddd2588be9800ae1bb37c92",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bramus/router",
|
"name": "bramus/router",
|
||||||
|
@ -303,16 +303,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pablouser1/tikscraper",
|
"name": "pablouser1/tikscraper",
|
||||||
"version": "v2.3.6.4",
|
"version": "v2.3.6.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pablouser1/TikScraperPHP.git",
|
"url": "https://github.com/pablouser1/TikScraperPHP.git",
|
||||||
"reference": "b26764777121dbc4408f84140b802869a77b575e"
|
"reference": "10394fb5fb5213d05fe0eb29f7582423fc15d08a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/b26764777121dbc4408f84140b802869a77b575e",
|
"url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/10394fb5fb5213d05fe0eb29f7582423fc15d08a",
|
||||||
"reference": "b26764777121dbc4408f84140b802869a77b575e",
|
"reference": "10394fb5fb5213d05fe0eb29f7582423fc15d08a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -346,9 +346,9 @@
|
||||||
"description": "Get data from TikTok API",
|
"description": "Get data from TikTok API",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/pablouser1/TikScraperPHP/issues",
|
"issues": "https://github.com/pablouser1/TikScraperPHP/issues",
|
||||||
"source": "https://github.com/pablouser1/TikScraperPHP/tree/v2.3.6.4"
|
"source": "https://github.com/pablouser1/TikScraperPHP/tree/v2.3.6.2"
|
||||||
},
|
},
|
||||||
"time": "2023-04-05T15:08:06+00:00"
|
"time": "2023-04-01T13:46:50+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "php-webdriver/webdriver",
|
"name": "php-webdriver/webdriver",
|
||||||
|
|
|
@ -4,8 +4,8 @@ services:
|
||||||
web:
|
web:
|
||||||
container_name: proxitok-web
|
container_name: proxitok-web
|
||||||
image: ghcr.io/pablouser1/proxitok:master
|
image: ghcr.io/pablouser1/proxitok:master
|
||||||
# ports:
|
ports:
|
||||||
# - 8080:80
|
- 8080:80
|
||||||
environment:
|
environment:
|
||||||
- LATTE_CACHE=/cache
|
- LATTE_CACHE=/cache
|
||||||
- API_CACHE=redis
|
- API_CACHE=redis
|
||||||
|
@ -13,7 +13,6 @@ services:
|
||||||
- REDIS_PORT=6379
|
- REDIS_PORT=6379
|
||||||
- API_SIGNER=remote
|
- API_SIGNER=remote
|
||||||
- API_SIGNER_URL=http://proxitok-signer:8080/signature
|
- API_SIGNER_URL=http://proxitok-signer:8080/signature
|
||||||
- APP_URL=https://proxitok.tams.tech
|
|
||||||
volumes:
|
volumes:
|
||||||
- proxitok-cache:/cache
|
- proxitok-cache:/cache
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -21,7 +20,6 @@ services:
|
||||||
- signer
|
- signer
|
||||||
networks:
|
networks:
|
||||||
- proxitok
|
- proxitok
|
||||||
- web
|
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
cap_drop:
|
cap_drop:
|
||||||
|
@ -30,20 +28,6 @@ services:
|
||||||
- CHOWN
|
- CHOWN
|
||||||
- SETGID
|
- SETGID
|
||||||
- SETUID
|
- SETUID
|
||||||
labels:
|
|
||||||
# Traefik
|
|
||||||
traefik.docker.network: web
|
|
||||||
traefik.domain: tams.tech
|
|
||||||
traefik.enable: "true"
|
|
||||||
# Traefik v1
|
|
||||||
traefik.frontend.rule: Host:proxitok.tams.tech
|
|
||||||
# DNS discovery (not used)
|
|
||||||
tech.tams.dns_hosts: proxitok.tams.tech
|
|
||||||
# Traefik V2
|
|
||||||
traefik.http.routers.proxitok.rule: Host(`proxitok.tams.tech`)
|
|
||||||
traefik.http.routers.proxitok.tls: true
|
|
||||||
traefik.http.routers.proxitok.tls.certresolver: letsencrypt
|
|
||||||
|
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
container_name: proxitok-redis
|
container_name: proxitok-redis
|
||||||
|
@ -78,6 +62,3 @@ volumes:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxitok:
|
proxitok:
|
||||||
internal: true
|
|
||||||
web:
|
|
||||||
external: true
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
@import "./node_modules/css.gg/icons/scss/comment.scss";
|
@import "./node_modules/css.gg/icons/scss/comment.scss";
|
||||||
@import "./node_modules/css.gg/icons/scss/share.scss";
|
@import "./node_modules/css.gg/icons/scss/share.scss";
|
||||||
@import "./node_modules/css.gg/icons/scss/software-download.scss";
|
@import "./node_modules/css.gg/icons/scss/software-download.scss";
|
||||||
@import "./node_modules/css.gg/icons/scss/check-o.scss";
|
|
||||||
|
|
||||||
@import "./node_modules/css.gg/icons/scss/lock.scss";
|
@import "./node_modules/css.gg/icons/scss/lock.scss";
|
||||||
@import "./node_modules/css.gg/icons/scss/lock-unlock.scss";
|
@import "./node_modules/css.gg/icons/scss/lock-unlock.scss";
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
.new-line {
|
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
|
2
styles/vendor/cssgg.min.css
vendored
2
styles/vendor/cssgg.min.css
vendored
File diff suppressed because one or more lines are too long
2
styles/vendor/cssgg.min.css.map
vendored
2
styles/vendor/cssgg.min.css.map
vendored
|
@ -1 +1 @@
|
||||||
{"version":3,"sourceRoot":"","sources":["../../misc/scss/node_modules/css.gg/icons/scss/home.scss","../../misc/scss/node_modules/css.gg/icons/scss/options.scss","../../misc/scss/node_modules/css.gg/icons/scss/info.scss","../../misc/scss/node_modules/css.gg/icons/scss/code-slash.scss","../../misc/scss/node_modules/css.gg/icons/scss/search.scss","../../misc/scss/node_modules/css.gg/icons/scss/feed.scss","../../misc/scss/node_modules/css.gg/icons/scss/eye.scss","../../misc/scss/node_modules/css.gg/icons/scss/heart.scss","../../misc/scss/node_modules/css.gg/icons/scss/comment.scss","../../misc/scss/node_modules/css.gg/icons/scss/share.scss","../../misc/scss/node_modules/css.gg/icons/scss/software-download.scss","../../misc/scss/node_modules/css.gg/icons/scss/check-o.scss","../../misc/scss/node_modules/css.gg/icons/scss/lock.scss","../../misc/scss/node_modules/css.gg/icons/scss/lock-unlock.scss","../../misc/scss/node_modules/css.gg/icons/scss/music.scss"],"names":[],"mappings":"AAAA,SACE,yLACA,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,aACA,gBACA,4BACA,2BACA,6BACA,4BACA,mBAEA,gBACE,WACA,cACA,sBACA,kBAGF,iBACE,WACA,cACA,sBACA,kBACA,qBACA,sBACA,2BACA,wBACA,SACA,kBACA,WACA,YACA,OAGF,gBACE,UACA,YACA,iBACA,oBACA,4BACA,6BACA,gBACA,SACA,SCjDJ,YACI,sBACA,kBACA,cACA,+BACA,WACA,WACA,qCAEA,mBACE,WACA,cACA,sBACA,kBACA,UACA,WACA,iBACA,mBAGF,oBACE,WACA,cACA,sBACA,kBACA,UACA,WACA,iBACA,mBACA,SACA,UAGF,mBACE,YACA,WCnCN,SACI,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,mBAEA,iCACE,WACA,cACA,sBACA,kBACA,kBACA,UACA,wBACA,SAGF,gBACE,WACA,WAGF,iBACE,WACA,QC5BN,eACI,cACA,kBACA,sBACA,6CACA,UACA,YACA,wBAEA,sBACE,WACA,cACA,sBACA,kBACA,UACA,WACA,yBAGF,uBACE,WACA,cACA,sBACA,kBACA,UACA,WACA,yBACA,sBACA,qBACA,UACA,QAGF,sBACE,uBACA,wBACA,WACA,QCrCN,WACI,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,mBACA,iBACA,gBAEA,kBACE,WACA,cACA,sBACA,kBACA,kBACA,UACA,WACA,wBACA,yBACA,SACA,UCvBN,SACI,cACA,sBACA,wBACA,sBASA,iBACA,gBACA,kBACA,+BACA,UACA,WACA,kBAbA,iCACE,cACA,sBACA,wBACA,sBAWF,iCACE,WACA,kBACA,kBACA,WACA,WACA,QACA,SACA,WAGF,gBACE,UACA,QACA,WCnCN,QACI,kBACA,cACA,+BACA,WACA,YACA,iCACA,gCACA,gBACA,sBAEA,+BACE,WACA,cACA,oBACA,kBACA,sBAGF,eACE,QACA,8CACA,WACA,YAGF,gBACE,UACA,WACA,iBACA,WACA,SC/BN,UACI,iBACA,6BACA,8BACA,WACA,WACA,gBAeA,sBACA,kBACA,gHACA,cAhBA,iBACE,iBACA,6BACA,8BACA,WACA,WACA,gBACA,WACA,cACA,sBACA,kBAQF,kBACE,WACA,cACA,sBACA,kBAGF,iBACE,WACA,wBACA,QAGF,kBACE,WACA,YACA,sBACA,wBACA,UACA,QC7CN,YACI,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,gBACA,0CAEA,mBACE,WACA,cACA,sBACA,kBACA,UAGF,oBACE,WACA,cACA,sBACA,kBACA,UACA,iBACA,+BACA,+BACA,UACA,YACA,WAGF,mBACE,WACA,wBACA,qBACA,SACA,QCtCN,UACI,sBACA,kBACA,cACA,+BACA,UACA,WACA,wBACA,oBACA,kCAEA,iBACE,WACA,cACA,sBACA,kBACA,kBACA,WACA,WACA,wBACA,SAGF,kBACE,WACA,cACA,sBACA,kBACA,kBACA,WACA,WACA,wBACA,SACA,MACA,yBAGF,iBACE,SACA,wBCvCN,sBACI,sBACA,kBACA,cACA,+BACA,WACA,WACA,iBACA,aACA,8BACA,+BACA,eAEA,6BACE,WACA,cACA,sBACA,kBACA,UACA,WACA,sBACA,wBACA,yBACA,SACA,WAGF,8BACE,WACA,cACA,sBACA,kBACA,kBACA,UACA,YACA,wBACA,SACA,WCrCN,YACI,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,oBAEA,mBACE,WACA,cACA,sBACA,kBACA,SACA,SACA,UACA,YACA,0BACA,yBACA,mBACA,6BACA,wBCvBN,SACI,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,4BACA,2BACA,4BACA,iBAEA,gBACE,WACA,cACA,sBACA,kBACA,WACA,YACA,kBACA,+BACA,qBACA,UACA,QCxBN,gBACI,sBACA,kBACA,cACA,+BACA,WACA,WACA,iBACA,8BACA,6BACA,4BACA,iBACA,iBAEA,+CACE,WACA,cACA,sBACA,kBAGF,uBACE,+BACA,qBACA,WACA,YACA,kBACA,UACA,SAGF,wBACE,UACA,WACA,wBACA,UACA,QCpCN,UACI,cACA,sBACA,iBAQA,2BACA,4BACA,gBACA,gBACA,kBACA,6CACA,WACA,YAbA,mCACE,cACA,sBACA,iBAYF,mCACE,WACA,kBACA,UACA,WACA,QACA,UACA,uBACA,mBAGF,iBACE","file":"cssgg.min.css"}
|
{"version":3,"sourceRoot":"","sources":["../../misc/scss/node_modules/css.gg/icons/scss/home.scss","../../misc/scss/node_modules/css.gg/icons/scss/options.scss","../../misc/scss/node_modules/css.gg/icons/scss/info.scss","../../misc/scss/node_modules/css.gg/icons/scss/code-slash.scss","../../misc/scss/node_modules/css.gg/icons/scss/search.scss","../../misc/scss/node_modules/css.gg/icons/scss/feed.scss","../../misc/scss/node_modules/css.gg/icons/scss/eye.scss","../../misc/scss/node_modules/css.gg/icons/scss/heart.scss","../../misc/scss/node_modules/css.gg/icons/scss/comment.scss","../../misc/scss/node_modules/css.gg/icons/scss/share.scss","../../misc/scss/node_modules/css.gg/icons/scss/software-download.scss","../../misc/scss/node_modules/css.gg/icons/scss/lock.scss","../../misc/scss/node_modules/css.gg/icons/scss/lock-unlock.scss","../../misc/scss/node_modules/css.gg/icons/scss/music.scss"],"names":[],"mappings":"AAAA,SACE,yLACA,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,aACA,gBACA,4BACA,2BACA,6BACA,4BACA,mBAEA,gBACE,WACA,cACA,sBACA,kBAGF,iBACE,WACA,cACA,sBACA,kBACA,qBACA,sBACA,2BACA,wBACA,SACA,kBACA,WACA,YACA,OAGF,gBACE,UACA,YACA,iBACA,oBACA,4BACA,6BACA,gBACA,SACA,SCjDJ,YACI,sBACA,kBACA,cACA,+BACA,WACA,WACA,qCAEA,mBACE,WACA,cACA,sBACA,kBACA,UACA,WACA,iBACA,mBAGF,oBACE,WACA,cACA,sBACA,kBACA,UACA,WACA,iBACA,mBACA,SACA,UAGF,mBACE,YACA,WCnCN,SACI,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,mBAEA,iCACE,WACA,cACA,sBACA,kBACA,kBACA,UACA,wBACA,SAGF,gBACE,WACA,WAGF,iBACE,WACA,QC5BN,eACI,cACA,kBACA,sBACA,6CACA,UACA,YACA,wBAEA,sBACE,WACA,cACA,sBACA,kBACA,UACA,WACA,yBAGF,uBACE,WACA,cACA,sBACA,kBACA,UACA,WACA,yBACA,sBACA,qBACA,UACA,QAGF,sBACE,uBACA,wBACA,WACA,QCrCN,WACI,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,mBACA,iBACA,gBAEA,kBACE,WACA,cACA,sBACA,kBACA,kBACA,UACA,WACA,wBACA,yBACA,SACA,UCvBN,SACI,cACA,sBACA,wBACA,sBASA,iBACA,gBACA,kBACA,+BACA,UACA,WACA,kBAbA,iCACE,cACA,sBACA,wBACA,sBAWF,iCACE,WACA,kBACA,kBACA,WACA,WACA,QACA,SACA,WAGF,gBACE,UACA,QACA,WCnCN,QACI,kBACA,cACA,+BACA,WACA,YACA,iCACA,gCACA,gBACA,sBAEA,+BACE,WACA,cACA,oBACA,kBACA,sBAGF,eACE,QACA,8CACA,WACA,YAGF,gBACE,UACA,WACA,iBACA,WACA,SC/BN,UACI,iBACA,6BACA,8BACA,WACA,WACA,gBAeA,sBACA,kBACA,gHACA,cAhBA,iBACE,iBACA,6BACA,8BACA,WACA,WACA,gBACA,WACA,cACA,sBACA,kBAQF,kBACE,WACA,cACA,sBACA,kBAGF,iBACE,WACA,wBACA,QAGF,kBACE,WACA,YACA,sBACA,wBACA,UACA,QC7CN,YACI,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,gBACA,0CAEA,mBACE,WACA,cACA,sBACA,kBACA,UAGF,oBACE,WACA,cACA,sBACA,kBACA,UACA,iBACA,+BACA,+BACA,UACA,YACA,WAGF,mBACE,WACA,wBACA,qBACA,SACA,QCtCN,UACI,sBACA,kBACA,cACA,+BACA,UACA,WACA,wBACA,oBACA,kCAEA,iBACE,WACA,cACA,sBACA,kBACA,kBACA,WACA,WACA,wBACA,SAGF,kBACE,WACA,cACA,sBACA,kBACA,kBACA,WACA,WACA,wBACA,SACA,MACA,yBAGF,iBACE,SACA,wBCvCN,sBACI,sBACA,kBACA,cACA,+BACA,WACA,WACA,iBACA,aACA,8BACA,+BACA,eAEA,6BACE,WACA,cACA,sBACA,kBACA,UACA,WACA,sBACA,wBACA,yBACA,SACA,WAGF,8BACE,WACA,cACA,sBACA,kBACA,kBACA,UACA,YACA,wBACA,SACA,WCrCN,SACI,sBACA,kBACA,cACA,+BACA,WACA,YACA,iBACA,4BACA,2BACA,4BACA,iBAEA,gBACE,WACA,cACA,sBACA,kBACA,WACA,YACA,kBACA,+BACA,qBACA,UACA,QCxBN,gBACI,sBACA,kBACA,cACA,+BACA,WACA,WACA,iBACA,8BACA,6BACA,4BACA,iBACA,iBAEA,+CACE,WACA,cACA,sBACA,kBAGF,uBACE,+BACA,qBACA,WACA,YACA,kBACA,UACA,SAGF,wBACE,UACA,WACA,wBACA,UACA,QCpCN,UACI,cACA,sBACA,iBAQA,2BACA,4BACA,gBACA,gBACA,kBACA,6CACA,WACA,YAbA,mCACE,cACA,sBACA,iBAYF,mCACE,WACA,kBACA,UACA,WACA,QACA,UACA,uBACA,mBAGF,iBACE","file":"cssgg.min.css"}
|
|
@ -1,4 +0,0 @@
|
||||||
<details>
|
|
||||||
<summary>{$title}</summary>
|
|
||||||
{block content}{/block}
|
|
||||||
</details>
|
|
|
@ -31,7 +31,6 @@
|
||||||
{/if}
|
{/if}
|
||||||
<link rel="stylesheet" href="{static('css', 'cssgg.min.css', true)}">
|
<link rel="stylesheet" href="{static('css', 'cssgg.min.css', true)}">
|
||||||
<link rel="stylesheet" href="{static('css', 'bulma.min.css', true)}">
|
<link rel="stylesheet" href="{static('css', 'bulma.min.css', true)}">
|
||||||
<link rel="stylesheet" href="{static('css', 'misc.css')}">
|
|
||||||
<link rel="stylesheet" href="{static('css', 'carousel.css')}">
|
<link rel="stylesheet" href="{static('css', 'carousel.css')}">
|
||||||
<title>{$title} - ProxiTok</title>
|
<title>{$title} - ProxiTok</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -3,25 +3,19 @@
|
||||||
<source src="{url_stream($item->video->playAddr)}" type="video/mp4" />
|
<source src="{url_stream($item->video->playAddr)}" type="video/mp4" />
|
||||||
</video>
|
</video>
|
||||||
{else}
|
{else}
|
||||||
{if isset($isSimple)}
|
<section class="carousel" aria-label="carousel" Tabindex="0">
|
||||||
{foreach $item->imagePost->images as $i => $image}
|
|
||||||
<img src="{url_stream($image->imageURL->urlList[0])}" />
|
|
||||||
{/foreach}
|
|
||||||
{else}
|
|
||||||
<section class="carousel" aria-label="carousel" Tabindex="0">
|
|
||||||
<div class="slides">
|
<div class="slides">
|
||||||
{foreach $item->imagePost->images as $i => $image}
|
{foreach $item->imagePost->images as $i => $image}
|
||||||
<div class="slides-item" id="{$item->id}-image{$i + 1}" tabindex="0">
|
<div class="slides-item" id="image-{$i + 1}" tabindex="0">
|
||||||
<img src="{url_stream($image->imageURL->urlList[0])}" />
|
<img src="{url_stream($image->imageURL->urlList[0])}" />
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
<div class="carousel__nav">
|
<div class="carousel__nav">
|
||||||
{for $i = 0; $i < count($item->imagePost->images); $i++}
|
{for $i = 0; $i < count($item->imagePost->images); $i++}
|
||||||
<a class="slider-nav" href="#{$item->id}-image{$i + 1}">{$i + 1}</a>
|
<a class="slider-nav" href="#image-{$i + 1}">{$i + 1}</a>
|
||||||
{/for}
|
{/for}
|
||||||
</div>
|
</div>
|
||||||
<div class="carousel__skip-message" id="skip-link" tabindex="0"></div>
|
<div class="carousel__skip-message" id="skip-link" tabindex="0"></div>
|
||||||
</section>
|
</section>
|
||||||
{/if}
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
{foreach $challenges as $challenge}
|
{foreach $challenges as $challenge}
|
||||||
<a class="tag is-primary is-rounded" href="{path('/tag/' . $challenge->title)}">#{$challenge->title}</a>
|
<a class="tag is-rounded" href="{path('/tag/' . $challenge->title)}">#{$challenge->title}</a>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,30 +17,17 @@
|
||||||
{if !empty($item->challenges)}
|
{if !empty($item->challenges)}
|
||||||
<p>{include './common/tags.latte', challenges: $item->challenges}</p>
|
<p>{include './common/tags.latte', challenges: $item->challenges}</p>
|
||||||
{/if}
|
{/if}
|
||||||
<p n:ifcontent>{render_desc($item->desc, $item->textExtra ?? [])|noescape}</p>
|
<p n:ifcontent>{render_desc($item->desc, $item->textExtra)|noescape}</p>
|
||||||
<p>Song: {$item->music->title}</p>
|
<p>Song: {$item->music->title}</p>
|
||||||
<audio controls preload="none" src="{url_stream($item->music->playUrl)}"></audio>
|
<audio controls preload="none" src="{url_stream($item->music->playUrl)}"></audio>
|
||||||
{include './common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount}
|
{include './common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount}
|
||||||
<div class="has-text-centered">
|
<div class="has-text-centered">
|
||||||
{include './common/content.latte', item: $item, isAutoplay: false, isBig: false}
|
{include './common/content.latte', item: $item, isAutoplay: false, isBig: false}
|
||||||
</div>
|
</div>
|
||||||
{if isset($item->video->playAddr) && $item->video->playAddr !== ""}
|
|
||||||
<!-- Download links, not shown if item is a gallery -->
|
|
||||||
<p class="has-text-centered"><b>Download video</b></p>
|
<p class="has-text-centered"><b>Download video</b></p>
|
||||||
{include './common/download.latte', playAddr: $item->video->playAddr, id: $item->id, uniqueId: $item->author->uniqueId}
|
{include './common/download.latte', playAddr: $item->video->playAddr, id: $item->id, uniqueId: $item->author->uniqueId}
|
||||||
{/if}
|
|
||||||
<p class="has-text-centered"><b>Share link</b></p>
|
<p class="has-text-centered"><b>Share link</b></p>
|
||||||
{include './common/share.latte', uniqueId: $item->author->uniqueId, id: $item->id}
|
{include './common/share.latte', uniqueId: $item->author->uniqueId, id: $item->id}
|
||||||
<div class="has-text-centered">
|
|
||||||
{embed '../details.latte', title: "Details"}
|
|
||||||
{block content}
|
|
||||||
<p>Is Ad: {bool_to_str($item->isAd)}
|
|
||||||
<p>Can duet: {bool_to_str($item->duetEnabled)}</p>
|
|
||||||
<p>Can stitch (add this video to other ones): {bool_to_str($item->stitchEnabled)}</p>
|
|
||||||
<p>Can be shared: {bool_to_str($item->shareEnabled)}
|
|
||||||
{/block}
|
|
||||||
{/embed}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{contentType application/rss+xml}
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
<channel>
|
<channel>
|
||||||
|
@ -8,7 +9,7 @@
|
||||||
{foreach $items as $item}
|
{foreach $items as $item}
|
||||||
<item>
|
<item>
|
||||||
<title>{$item->desc}</title>
|
<title>{$item->desc}</title>
|
||||||
<description><![CDATA[<p n:ifcontent>{render_desc($item->desc, $item->textExtra ?? [])|noescape}</p>{include '../components/themes/common/content.latte', item: $item, isAutoplay: false, isSimple: true}]]></description>
|
<description><![CDATA[<p>{$item->desc}</p><video controls="controls" preload="auto" src="{url_stream($item->video->playAddr)}"></video>]]></description>
|
||||||
<link>{url_video_internal($item->author->uniqueId, $item->id)}</link>
|
<link>{url_video_internal($item->author->uniqueId, $item->id)}</link>
|
||||||
<pubDate>{date('r', $item->createTime)}</pubDate>
|
<pubDate>{date('r', $item->createTime)}</pubDate>
|
||||||
<guid isPermaLink="false">{$item->id}</guid>
|
<guid isPermaLink="false">{$item->id}</guid>
|
||||||
|
|
|
@ -14,12 +14,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
<p class="title">{$info->detail->title}</p>
|
<p class="title">{$info->detail->title}</p>
|
||||||
<p class="subtitle">{include '../components/rss.latte'}</p>
|
<p class="subtitle">{include '../components/rss.latte'}</p>
|
||||||
<p>Views: {number($info->stats->viewCount)}</p>
|
<p>Videos: {number($info->stats->videoCount)} / Views: {number($info->stats->viewCount)}</p>
|
||||||
{embed '../components/details.latte', title: 'Details'}
|
|
||||||
{block content}
|
|
||||||
<p>Is commerce: {bool_to_str($info->detail->isCommerce)}</p>
|
|
||||||
{/block}
|
|
||||||
{/embed}
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
|
|
|
@ -10,33 +10,17 @@
|
||||||
<figure class="image is-inline-block is-128x128">
|
<figure class="image is-inline-block is-128x128">
|
||||||
<img class="is-rounded" src="{url_stream($info->detail->avatarLarger)}" />
|
<img class="is-rounded" src="{url_stream($info->detail->avatarLarger)}" />
|
||||||
</figure>
|
</figure>
|
||||||
<p class="title">
|
<p class="title">{$info->detail->uniqueId}</p>
|
||||||
{if $info->detail->verified}
|
|
||||||
{include '../components/icon.latte', icon: 'check-o', text: $info->detail->uniqueId}
|
|
||||||
{else}
|
|
||||||
{$info->detail->uniqueId}
|
|
||||||
{/if}
|
|
||||||
</p>
|
|
||||||
<p class="subtitle">{include '../components/rss.latte'}</p>
|
<p class="subtitle">{include '../components/rss.latte'}</p>
|
||||||
{if $info->detail->privateAccount}
|
{if $info->detail->privateAccount}
|
||||||
<p><strong>Private account</strong></p>
|
<p><strong>Private account</strong></p>
|
||||||
{/if}
|
{/if}
|
||||||
<b>Description</b>
|
<p>{$info->detail->signature}</p>
|
||||||
<p class="new-line">{$info->detail->signature}</p>
|
|
||||||
{if isset($info->detail->bioLink)}
|
{if isset($info->detail->bioLink)}
|
||||||
<p>Link: <a href="{$info->detail->bioLink->link}">{$info->detail->bioLink->link}</a></p>
|
<p>Link: <a href="{$info->detail->bioLink->link}">{$info->detail->bioLink->link}</a></p>
|
||||||
{/if}
|
{/if}
|
||||||
<b>Stats</b>
|
|
||||||
<p>Following: {number($info->stats->followingCount)} / Followers: {number($info->stats->followerCount)}</p>
|
<p>Following: {number($info->stats->followingCount)} / Followers: {number($info->stats->followerCount)}</p>
|
||||||
<p>Hearts: {number($info->stats->heartCount)} / Videos: {$info->stats->videoCount}</p>
|
<p>Hearts: {number($info->stats->heartCount)} / Videos: {$info->stats->videoCount}</p>
|
||||||
{embed '../components/details.latte', title: "Details"}
|
|
||||||
{block content}
|
|
||||||
<p>Region: {$info->detail->region}</p>
|
|
||||||
{if $info->detail->commerceUserInfo->commerceUser}
|
|
||||||
<p>Category: {$info->detail->commerceUserInfo->category}</p>
|
|
||||||
{/if}
|
|
||||||
{/block}
|
|
||||||
{/embed}
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
|
|
|
@ -33,16 +33,13 @@
|
||||||
<p>{include '../components/themes/common/tags.latte', challenges: $item->challenges}</p>
|
<p>{include '../components/themes/common/tags.latte', challenges: $item->challenges}</p>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p n:ifcontent>{render_desc($item->desc, $item->textExtra ?? [])|noescape}</p>
|
<p n:ifcontent>{render_desc($item->desc, $item->textExtra)|noescape}</p>
|
||||||
<p>Song: {$item->music->title}</p>
|
<p>Song: {$item->music->title}</p>
|
||||||
<audio controls preload="none" src="{url_stream($item->music->playUrl)}"></audio>
|
<audio controls preload="none" src="{url_stream($item->music->playUrl)}"></audio>
|
||||||
{include '../components/themes/common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount}
|
{include '../components/themes/common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount}
|
||||||
<div class="has-text-centered">
|
<div class="has-text-centered">
|
||||||
{include '../components/themes/common/share.latte', uniqueId: $info->detail->uniqueId, id: $item->id}
|
{include '../components/themes/common/share.latte', uniqueId: $info->detail->uniqueId, id: $item->id}
|
||||||
{if isset($item->video->playAddr) && $item->video->playAddr !== ""}
|
|
||||||
<!-- Download links, not shown if item is a gallery -->
|
|
||||||
{include '../components/themes/common/download.latte', playAddr: $item->video->playAddr, id: $item->id, uniqueId: $info->detail->uniqueId}
|
{include '../components/themes/common/download.latte', playAddr: $item->video->playAddr, id: $item->id, uniqueId: $info->detail->uniqueId}
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue