diff --git a/app/Constants/CacheMethods.php b/app/Constants/CacheMethods.php index f4ec604..1f5796a 100644 --- a/app/Constants/CacheMethods.php +++ b/app/Constants/CacheMethods.php @@ -1,7 +1,7 @@ discover(); if ($feed->meta->success) { - $latte = Wrappers::latte(); - $latte->render(Misc::getView('discover'), new FeedTemplate('Discover', $feed)); + Wrappers::latte('discover', new FeedTemplate('Discover', $feed)); } else { ErrorHandler::showMeta($feed->meta); } diff --git a/app/Controllers/EmbedController.php b/app/Controllers/EmbedController.php index 7dfe694..50b394e 100644 --- a/app/Controllers/EmbedController.php +++ b/app/Controllers/EmbedController.php @@ -2,7 +2,6 @@ namespace App\Controllers; use App\Helpers\ErrorHandler; -use App\Helpers\Misc; use App\Helpers\Wrappers; use App\Models\VideoTemplate; @@ -13,8 +12,7 @@ class EmbedController { $video->feed(); if ($video->ok()) { $data = $video->getFull(); - $latte = Wrappers::latte(); - $latte->render(Misc::getView('video'), new VideoTemplate($data->feed->items[0], $data->info->detail, true)); + Wrappers::latte('video', new VideoTemplate($data->feed->items[0], $data->info->detail, true)); } else { ErrorHandler::showMeta($video->error()); } diff --git a/app/Controllers/MusicController.php b/app/Controllers/MusicController.php index a43435a..4d79eba 100644 --- a/app/Controllers/MusicController.php +++ b/app/Controllers/MusicController.php @@ -15,8 +15,7 @@ class MusicController { $music->feed($cursor); if ($music->ok()) { $data = $music->getFull(); - $latte = Wrappers::latte(); - $latte->render(Misc::getView('music'), new FullTemplate('Music', $data)); + Wrappers::latte('music', new FullTemplate('Music', $data)); } else { ErrorHandler::showMeta($music->error()); } diff --git a/app/Controllers/SettingsController.php b/app/Controllers/SettingsController.php index f3fb979..6c9f8dd 100644 --- a/app/Controllers/SettingsController.php +++ b/app/Controllers/SettingsController.php @@ -8,8 +8,7 @@ use App\Models\SettingsTemplate; class SettingsController { static public function index() { - $latte = Wrappers::latte(); - $latte->render(Misc::getView('settings'), new SettingsTemplate()); + Wrappers::latte('settings', new SettingsTemplate()); } static public function general() { diff --git a/app/Controllers/TagController.php b/app/Controllers/TagController.php index 002a65e..bf6e808 100644 --- a/app/Controllers/TagController.php +++ b/app/Controllers/TagController.php @@ -3,6 +3,7 @@ namespace App\Controllers; use App\Helpers\ErrorHandler; use App\Helpers\Misc; +use App\Helpers\UrlBuilder; use App\Helpers\Wrappers; use App\Models\FullTemplate; use App\Models\RSSTemplate; @@ -15,8 +16,7 @@ class TagController { $hashtag->feed($cursor); if ($hashtag->ok()) { $data = $hashtag->getFull(); - $latte = Wrappers::latte(); - $latte->render(Misc::getView('tag'), new FullTemplate($data->info->detail->title, $data)); + Wrappers::latte('tag', new FullTemplate($data->info->detail->title, $data)); } else { ErrorHandler::showMeta($hashtag->error()); } @@ -28,8 +28,8 @@ class TagController { $hashtag->feed(); if ($hashtag->ok()) { $data = $hashtag->getFull(); - $latte = Wrappers::latte(); - $latte->render(Misc::getView('rss'), new RSSTemplate($name, $data->info->detail->desc, "/tag/{$name}", $data->feed->items)); + Misc::rss($name); + Wrappers::latte('rss', new RSSTemplate($name, $data->info->detail->desc, UrlBuilder::tag($name), $data->feed->items)); } } } diff --git a/app/Controllers/TrendingController.php b/app/Controllers/TrendingController.php index 6c4e5a9..6c85207 100644 --- a/app/Controllers/TrendingController.php +++ b/app/Controllers/TrendingController.php @@ -17,8 +17,7 @@ class TrendingController { $feed = $trending->getFeed(); if ($feed && $feed->meta->success) { - $latte = Wrappers::latte(); - $latte->render(Misc::getView('trending'), new FeedTemplate('Trending', $feed)); + Wrappers::latte('trending', new FeedTemplate('Trending', $feed)); } else { ErrorHandler::showMeta($trending->error()); } @@ -31,8 +30,8 @@ class TrendingController { $feed = $trending->getFeed(); if ($feed && $feed->meta->success) { - $latte = Wrappers::latte(); - $latte->render(Misc::getView('rss'), new RSSTemplate('Trending', 'Trending on TikTok', '/trending', $feed->items)); + Misc::rss('Trending'); + Wrappers::latte('rss', new RSSTemplate('Trending', 'Trending on TikTok', Misc::url('/trending'), $feed->items)); } } } diff --git a/app/Controllers/UserController.php b/app/Controllers/UserController.php index 7ece1d9..3706b24 100644 --- a/app/Controllers/UserController.php +++ b/app/Controllers/UserController.php @@ -3,6 +3,7 @@ namespace App\Controllers; use App\Helpers\ErrorHandler; use App\Helpers\Misc; +use App\Helpers\UrlBuilder; use App\Helpers\Wrappers; use App\Models\FullTemplate; use App\Models\RSSTemplate; @@ -20,8 +21,7 @@ class UserController { ErrorHandler::showText(401, "Private account detected! Not supported"); return; } - $latte = Wrappers::latte(); - $latte->render(Misc::getView('user'), new FullTemplate($data->info->detail->nickname, $data)); + Wrappers::latte('user', new FullTemplate($data->info->detail->nickname, $data)); } else { ErrorHandler::showMeta($user->error()); } @@ -33,8 +33,7 @@ class UserController { $video->feed(); if ($video->ok()) { $data = $video->getFull(); - $latte = Wrappers::latte(); - $latte->render(Misc::getView('video'), new VideoTemplate($data->feed->items[0], $data->info->detail)); + Wrappers::latte('video', new VideoTemplate($data->feed->items[0], $data->info->detail)); } else { ErrorHandler::showMeta($video->error()); } @@ -46,8 +45,8 @@ class UserController { $user->feed(); if ($user->ok()) { $data = $user->getFull(); - $latte = Wrappers::latte(); - $latte->render(Misc::getView('rss'), new RSSTemplate($username, $data->info->detail->signature, '/@' . $username, $data->feed->items)); + Misc::rss($username); + Wrappers::latte('rss', new RSSTemplate($username, $data->info->detail->signature, UrlBuilder::user($username), $data->feed->items)); } } } diff --git a/app/Helpers/ErrorHandler.php b/app/Helpers/ErrorHandler.php index 3bd0d64..71eec85 100644 --- a/app/Helpers/ErrorHandler.php +++ b/app/Helpers/ErrorHandler.php @@ -7,13 +7,11 @@ use TikScraper\Models\Meta; class ErrorHandler { static public function showMeta(Meta $meta) { http_response_code($meta->http_code); - $latte = Wrappers::latte(); - $latte->render(Misc::getView('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)); } static public function showText(int $code, string $msg) { http_response_code($code); - $latte = Wrappers::latte(); - $latte->render(Misc::getView('error'), new ErrorTemplate($code, $msg)); + Wrappers::latte('error', new ErrorTemplate($code, $msg)); } } diff --git a/app/Helpers/Misc.php b/app/Helpers/Misc.php index 3cd8932..73b500a 100644 --- a/app/Helpers/Misc.php +++ b/app/Helpers/Misc.php @@ -24,4 +24,11 @@ class Misc { static public function getView(string $template): string { return __DIR__ . "/../../templates/views/{$template}.latte"; } + + /** + * Common method for rss feeds + */ + static public function rss(string $title) { + header('Content-Disposition: attachment; filename="' . $title . '.rss' . '"'); + } } diff --git a/app/Helpers/UrlBuilder.php b/app/Helpers/UrlBuilder.php index 62bff30..d7a58a8 100644 --- a/app/Helpers/UrlBuilder.php +++ b/app/Helpers/UrlBuilder.php @@ -7,7 +7,6 @@ class UrlBuilder { } static public function download(string $url, string $username, string $id, bool $watermark): string { - // {path('/download?url=' . urlencode($playAddr) . '&id=' . $id . '&user=' . $uniqueId) . '&watermark=1'} $down_url = Misc::url('/download?url=' . urlencode($url) . '&id=' . $id . '&user=' . $username); if ($watermark) $down_url .= '&watermark=1'; return $down_url; @@ -17,6 +16,10 @@ class UrlBuilder { return Misc::url('/@' . $username); } + static public function tag(string $tag): string { + return Misc::url('/tag/' . $tag); + } + static public function video_internal(string $username, string $id): string { return Misc::url('/@' . $username . "/video/" . $id); } diff --git a/app/Helpers/Wrappers.php b/app/Helpers/Wrappers.php index 1c8f10f..9507fef 100644 --- a/app/Helpers/Wrappers.php +++ b/app/Helpers/Wrappers.php @@ -4,12 +4,13 @@ namespace App\Helpers; use App\Cache\JSONCache; use App\Cache\RedisCache; use App\Constants\CacheMethods; +use App\Models\BaseTemplate; class Wrappers { /** * Setup of Latte template engine */ - static public function latte(): \Latte\Engine { + static public function latte(string $template, BaseTemplate $base) { $latte = new \Latte\Engine; $cache_path = Misc::env('LATTE_CACHE', __DIR__ . '/../../cache/latte'); $latte->setTempDirectory($cache_path); @@ -19,6 +20,32 @@ class Wrappers { $latte->addFunction('path', function (string $endpoint = ''): string { return Misc::url($endpoint); }); + + // Static assets + $latte->addFunction('static', function (string $type, string $file, bool $isVendor = false): string { + $endpoint = ''; + switch ($type) { + case 'js': + $endpoint .= '/scripts'; + break; + case 'css': + $endpoint .= '/styles'; + break; + default: + throw new \Exception('Invalid static asset type'); + } + + if ($isVendor) $endpoint .= '/vendor'; + + $endpoint .= '/' . $file; + + return Misc::url($endpoint); + }); + + $latte->addFunction('theme', function(): string { + return Cookies::theme(); + }); + // Version being used $latte->addFunction('version_frontend', function (): string { return \Composer\InstalledVersions::getVersion('pablouser1/proxitok'); @@ -26,8 +53,20 @@ class Wrappers { $latte->addFunction('version_scraper', function (): string { return \Composer\InstalledVersions::getVersion('pablouser1/tikscraper'); }); - $latte->addFunction('theme', function(): string { - return Cookies::theme(); + + // https://stackoverflow.com/a/36365553 + $latte->addFunction('number', function (float $x) { + if($x > 1000) { + $x_number_format = number_format($x); + $x_array = explode(',', $x_number_format); + $x_parts = array('K', 'M', 'B', 'T'); + $x_count_parts = count($x_array) - 1; + $x_display = $x; + $x_display = $x_array[0] . ((int) $x_array[1][0] !== 0 ? '.' . $x_array[1][0] : ''); + $x_display .= $x_parts[$x_count_parts - 1]; + return $x_display; + } + return $x; }); // UrlBuilder @@ -46,21 +85,8 @@ class Wrappers { $latte->addFunction('url_download', function (string $url, string $username, string $id, bool $watermark): string { return UrlBuilder::download($url, $username, $id, $watermark); }); - // https://stackoverflow.com/a/36365553 - $latte->addFunction('number', function (float $x) { - if($x > 1000) { - $x_number_format = number_format($x); - $x_array = explode(',', $x_number_format); - $x_parts = array('K', 'M', 'B', 'T'); - $x_count_parts = count($x_array) - 1; - $x_display = $x; - $x_display = $x_array[0] . ((int) $x_array[1][0] !== 0 ? '.' . $x_array[1][0] : ''); - $x_display .= $x_parts[$x_count_parts - 1]; - return $x_display; - } - return $x; - }); - return $latte; + + $latte->render(Misc::getView($template), $base); } /** diff --git a/app/Models/BaseTemplate.php b/app/Models/BaseTemplate.php index a399b2a..793f1d4 100644 --- a/app/Models/BaseTemplate.php +++ b/app/Models/BaseTemplate.php @@ -6,7 +6,6 @@ namespace App\Models; */ class BaseTemplate { public string $title; - public string $version; function __construct(string $title) { $this->title = $title; diff --git a/app/Models/RSSTemplate.php b/app/Models/RSSTemplate.php index ef1b72e..1de8522 100644 --- a/app/Models/RSSTemplate.php +++ b/app/Models/RSSTemplate.php @@ -1,14 +1,13 @@ title = $title; + parent::__construct($title); $this->desc = $desc; $this->link = $link; $this->items = $items; diff --git a/composer.json b/composer.json index a9a5a5f..e582919 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "pablouser1/proxitok", "description": "An alternative frontend for TikTok", - "version": "2.4.2.3", + "version": "2.4.3.0", "license": "AGPL-3.0-or-later", "type": "project", "authors": [ diff --git a/composer.lock b/composer.lock index d2004f4..ffca478 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0b40437551f24ae25f01113a85564867", + "content-hash": "7dc0bdf9fcecc4c3a73fb2fb1eece6f4", "packages": [ { "name": "bramus/router", @@ -117,22 +117,22 @@ }, { "name": "latte/latte", - "version": "v2.11.5", + "version": "v2.11.6", "source": { "type": "git", "url": "https://github.com/nette/latte.git", - "reference": "89e647e51213af8a270fe9903b8735a2f6c83ad1" + "reference": "af4dbb23a6044b1cf4904830a9b00246318c93d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/latte/zipball/89e647e51213af8a270fe9903b8735a2f6c83ad1", - "reference": "89e647e51213af8a270fe9903b8735a2f6c83ad1", + "url": "https://api.github.com/repos/nette/latte/zipball/af4dbb23a6044b1cf4904830a9b00246318c93d4", + "reference": "af4dbb23a6044b1cf4904830a9b00246318c93d4", "shasum": "" }, "require": { "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.1 <8.2" + "php": ">=7.1 <8.3" }, "conflict": { "nette/application": "<2.4.1" @@ -195,9 +195,9 @@ ], "support": { "issues": "https://github.com/nette/latte/issues", - "source": "https://github.com/nette/latte/tree/v2.11.5" + "source": "https://github.com/nette/latte/tree/v2.11.6" }, - "time": "2022-06-26T10:12:18+00:00" + "time": "2022-11-04T14:53:52+00:00" }, { "name": "m1/env", @@ -263,16 +263,16 @@ }, { "name": "pablouser1/tikscraper", - "version": "v2.3.2.0", + "version": "v2.3.2.1", "source": { "type": "git", "url": "https://github.com/pablouser1/TikScraperPHP.git", - "reference": "4b3c5952e1f9e126e2e1c80d006e70e759338c45" + "reference": "b67340e62cda1fb117b518e4f812e327aec094d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/4b3c5952e1f9e126e2e1c80d006e70e759338c45", - "reference": "4b3c5952e1f9e126e2e1c80d006e70e759338c45", + "url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/b67340e62cda1fb117b518e4f812e327aec094d6", + "reference": "b67340e62cda1fb117b518e4f812e327aec094d6", "shasum": "" }, "require": { @@ -305,9 +305,9 @@ "description": "Get data from TikTok API", "support": { "issues": "https://github.com/pablouser1/TikScraperPHP/issues", - "source": "https://github.com/pablouser1/TikScraperPHP/tree/v2.3.2.0" + "source": "https://github.com/pablouser1/TikScraperPHP/tree/v2.3.2.1" }, - "time": "2022-10-24T18:36:21+00:00" + "time": "2022-11-04T18:45:45+00:00" }, { "name": "php-webdriver/webdriver", diff --git a/routes.php b/routes.php index 9605eaa..760a42e 100644 --- a/routes.php +++ b/routes.php @@ -2,7 +2,6 @@ /** @var \Bramus\Router\Router $router */ use App\Helpers\ErrorHandler; -use App\Helpers\Misc; use App\Helpers\Wrappers; use App\Models\BaseTemplate; @@ -11,18 +10,15 @@ $router->set404(function () { }); $router->get('/', function () { - $latte = Wrappers::latte(); - $latte->render(Misc::getView('home'), new BaseTemplate('Home')); + Wrappers::latte('home', new BaseTemplate('Home')); }); $router->get('/about', function () { - $latte = Wrappers::latte(); - $latte->render(Misc::getView('about'), new BaseTemplate('About')); + Wrappers::latte('about', new BaseTemplate('About')); }); $router->get('/verify', function () { - $latte = Wrappers::latte(); - $latte->render(Misc::getView('verify'), new BaseTemplate('Verify')); + Wrappers::latte('verify', new BaseTemplate('verify')); }); $router->get('/stream', 'ProxyController@stream'); diff --git a/scss/cssgg.scss b/scss/cssgg.scss index 739032c..12d7f85 100644 --- a/scss/cssgg.scss +++ b/scss/cssgg.scss @@ -16,5 +16,8 @@ @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/lock.scss"; +@import "./node_modules/css.gg/icons/scss/lock-unlock.scss"; + // Video @import "./node_modules/css.gg/icons/scss/music.scss"; diff --git a/styles/vendor/cssgg.min.css b/styles/vendor/cssgg.min.css index a0bd8ba..ce5f674 100644 --- a/styles/vendor/cssgg.min.css +++ b/styles/vendor/cssgg.min.css @@ -1 +1 @@ -.gg-home{background:linear-gradient(to left, currentColor 5px, transparent 0) no-repeat 0 bottom/4px 2px,linear-gradient(to left, currentColor 5px, transparent 0) no-repeat right bottom/4px 2px;box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:18px;height:14px;border:2px solid;border-top:0;border-bottom:0;border-top-right-radius:3px;border-top-left-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;margin-bottom:-2px}.gg-home::after{content:"";display:block;box-sizing:border-box;position:absolute}.gg-home::before{content:"";display:block;box-sizing:border-box;position:absolute;border-top:2px solid;border-left:2px solid;border-top-left-radius:4px;transform:rotate(45deg);top:-5px;border-radius:3px;width:14px;height:14px;left:0}.gg-home::after{width:8px;height:10px;border:2px solid;border-radius:100px;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:0;left:3px;bottom:0}.gg-options{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:10px;height:2px;box-shadow:-3px 4px 0 0,3px -4px 0 0}.gg-options::after{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;border:2px solid;border-radius:100%}.gg-options::before{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;border:2px solid;border-radius:100%;top:-7px;left:-4px}.gg-options::after{bottom:-7px;right:-4px}.gg-info{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:20px;height:20px;border:2px solid;border-radius:40px}.gg-info::after,.gg-info::before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:2px;background:currentColor;left:7px}.gg-info::after{bottom:2px;height:8px}.gg-info::before{height:2px;top:2px}.gg-code-slash{display:block;position:relative;box-sizing:border-box;transform:rotate(15deg) scale(var(--ggs, 1));width:2px;height:16px;background:currentColor}.gg-code-slash::after{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;transform:rotate(-60deg)}.gg-code-slash::before{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;transform:rotate(-60deg);border-left:2px solid;border-top:2px solid;left:-8px;top:5px}.gg-code-slash::after{border-right:2px solid;border-bottom:2px solid;right:-8px;top:3px}.gg-search{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:16px;height:16px;border:2px solid;border-radius:100%;margin-left:-4px;margin-top:-4px}.gg-search::after{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:2px;height:8px;background:currentColor;transform:rotate(-45deg);top:10px;left:12px}.gg-feed{display:block;box-sizing:border-box;background:currentColor;box-shadow:0 10px 0 0;margin-left:-8px;margin-top:-8px;position:relative;transform:scale(var(--ggs, 1));width:7px;height:7px;border-radius:1px}.gg-feed::after,.gg-feed::before{display:block;box-sizing:border-box;background:currentColor;box-shadow:0 10px 0 0}.gg-feed::after,.gg-feed::before{content:"";position:absolute;border-radius:3px;width:12px;height:2px;top:1px;left:9px;opacity:.8}.gg-feed::after{width:8px;top:4px;opacity:.5}.gg-eye{position:relative;display:block;transform:scale(var(--ggs, 1));width:24px;height:18px;border-bottom-right-radius:100px;border-bottom-left-radius:100px;overflow:hidden;box-sizing:border-box}.gg-eye::after,.gg-eye::before{content:"";display:block;border-radius:100px;position:absolute;box-sizing:border-box}.gg-eye::after{top:2px;box-shadow:inset 0 -8px 0 2px,inset 0 0 0 2px;width:24px;height:24px}.gg-eye::before{width:8px;height:8px;border:2px solid;bottom:4px;left:8px}.gg-heart{border:2px solid;border-top-left-radius:100px;border-top-right-radius:100px;width:10px;height:8px;border-bottom:0;box-sizing:border-box;position:relative;transform:translate(calc(-5px * var(--ggs, 1)), calc(-3px * var(--ggs, 1))) rotate(-45deg) scale(var(--ggs, 1));display:block}.gg-heart::after{border:2px solid;border-top-left-radius:100px;border-top-right-radius:100px;width:10px;height:8px;border-bottom:0;content:"";display:block;box-sizing:border-box;position:absolute}.gg-heart::before{content:"";display:block;box-sizing:border-box;position:absolute}.gg-heart::after{right:-9px;transform:rotate(90deg);top:5px}.gg-heart::before{width:11px;height:11px;border-left:2px solid;border-bottom:2px solid;left:-2px;top:3px}.gg-comment{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:20px;height:16px;border:2px solid;border-bottom:0;box-shadow:-6px 8px 0 -6px,6px 8px 0 -6px}.gg-comment::after{content:"";display:block;box-sizing:border-box;position:absolute;width:8px}.gg-comment::before{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;border:2px solid;border-top-color:rgba(0,0,0,0);border-bottom-left-radius:20px;right:4px;bottom:-6px;height:6px}.gg-comment::after{height:2px;background:currentColor;box-shadow:0 4px 0 0;left:4px;top:4px}.gg-share{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:6px;height:6px;background:currentColor;border-radius:100px;box-shadow:10px -6px 0,10px 6px 0}.gg-share::after{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:10px;height:2px;background:currentColor;left:2px}.gg-share::before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:10px;height:2px;background:currentColor;left:2px;top:0;transform:rotate(-35deg)}.gg-share::after{bottom:0;transform:rotate(35deg)}.gg-software-download{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:16px;height:6px;border:2px solid;border-top:0;border-bottom-left-radius:2px;border-bottom-right-radius:2px;margin-top:8px}.gg-software-download::after{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;border-left:2px solid;border-bottom:2px solid;transform:rotate(-45deg);left:2px;bottom:4px}.gg-software-download::before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:2px;height:10px;background:currentColor;left:5px;bottom:5px}.gg-music{display:block;box-sizing:border-box;border:2px solid;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:0;margin-top:-4px;position:relative;transform:skewY(-15deg) scale(var(--ggs, 1));width:14px;height:16px}.gg-music::after,.gg-music::before{display:block;box-sizing:border-box;border:2px solid}.gg-music::after,.gg-music::before{content:"";position:absolute;width:7px;height:7px;top:9px;left:-7px;transform:skewY(15deg);border-radius:10px}.gg-music::after{left:5px}/*# sourceMappingURL=cssgg.min.css.map */ +.gg-home{background:linear-gradient(to left, currentColor 5px, transparent 0) no-repeat 0 bottom/4px 2px,linear-gradient(to left, currentColor 5px, transparent 0) no-repeat right bottom/4px 2px;box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:18px;height:14px;border:2px solid;border-top:0;border-bottom:0;border-top-right-radius:3px;border-top-left-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;margin-bottom:-2px}.gg-home::after{content:"";display:block;box-sizing:border-box;position:absolute}.gg-home::before{content:"";display:block;box-sizing:border-box;position:absolute;border-top:2px solid;border-left:2px solid;border-top-left-radius:4px;transform:rotate(45deg);top:-5px;border-radius:3px;width:14px;height:14px;left:0}.gg-home::after{width:8px;height:10px;border:2px solid;border-radius:100px;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:0;left:3px;bottom:0}.gg-options{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:10px;height:2px;box-shadow:-3px 4px 0 0,3px -4px 0 0}.gg-options::after{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;border:2px solid;border-radius:100%}.gg-options::before{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;border:2px solid;border-radius:100%;top:-7px;left:-4px}.gg-options::after{bottom:-7px;right:-4px}.gg-info{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:20px;height:20px;border:2px solid;border-radius:40px}.gg-info::after,.gg-info::before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:2px;background:currentColor;left:7px}.gg-info::after{bottom:2px;height:8px}.gg-info::before{height:2px;top:2px}.gg-code-slash{display:block;position:relative;box-sizing:border-box;transform:rotate(15deg) scale(var(--ggs, 1));width:2px;height:16px;background:currentColor}.gg-code-slash::after{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;transform:rotate(-60deg)}.gg-code-slash::before{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;transform:rotate(-60deg);border-left:2px solid;border-top:2px solid;left:-8px;top:5px}.gg-code-slash::after{border-right:2px solid;border-bottom:2px solid;right:-8px;top:3px}.gg-search{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:16px;height:16px;border:2px solid;border-radius:100%;margin-left:-4px;margin-top:-4px}.gg-search::after{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:2px;height:8px;background:currentColor;transform:rotate(-45deg);top:10px;left:12px}.gg-feed{display:block;box-sizing:border-box;background:currentColor;box-shadow:0 10px 0 0;margin-left:-8px;margin-top:-8px;position:relative;transform:scale(var(--ggs, 1));width:7px;height:7px;border-radius:1px}.gg-feed::after,.gg-feed::before{display:block;box-sizing:border-box;background:currentColor;box-shadow:0 10px 0 0}.gg-feed::after,.gg-feed::before{content:"";position:absolute;border-radius:3px;width:12px;height:2px;top:1px;left:9px;opacity:.8}.gg-feed::after{width:8px;top:4px;opacity:.5}.gg-eye{position:relative;display:block;transform:scale(var(--ggs, 1));width:24px;height:18px;border-bottom-right-radius:100px;border-bottom-left-radius:100px;overflow:hidden;box-sizing:border-box}.gg-eye::after,.gg-eye::before{content:"";display:block;border-radius:100px;position:absolute;box-sizing:border-box}.gg-eye::after{top:2px;box-shadow:inset 0 -8px 0 2px,inset 0 0 0 2px;width:24px;height:24px}.gg-eye::before{width:8px;height:8px;border:2px solid;bottom:4px;left:8px}.gg-heart{border:2px solid;border-top-left-radius:100px;border-top-right-radius:100px;width:10px;height:8px;border-bottom:0;box-sizing:border-box;position:relative;transform:translate(calc(-5px * var(--ggs, 1)), calc(-3px * var(--ggs, 1))) rotate(-45deg) scale(var(--ggs, 1));display:block}.gg-heart::after{border:2px solid;border-top-left-radius:100px;border-top-right-radius:100px;width:10px;height:8px;border-bottom:0;content:"";display:block;box-sizing:border-box;position:absolute}.gg-heart::before{content:"";display:block;box-sizing:border-box;position:absolute}.gg-heart::after{right:-9px;transform:rotate(90deg);top:5px}.gg-heart::before{width:11px;height:11px;border-left:2px solid;border-bottom:2px solid;left:-2px;top:3px}.gg-comment{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:20px;height:16px;border:2px solid;border-bottom:0;box-shadow:-6px 8px 0 -6px,6px 8px 0 -6px}.gg-comment::after{content:"";display:block;box-sizing:border-box;position:absolute;width:8px}.gg-comment::before{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;border:2px solid;border-top-color:rgba(0,0,0,0);border-bottom-left-radius:20px;right:4px;bottom:-6px;height:6px}.gg-comment::after{height:2px;background:currentColor;box-shadow:0 4px 0 0;left:4px;top:4px}.gg-share{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:6px;height:6px;background:currentColor;border-radius:100px;box-shadow:10px -6px 0,10px 6px 0}.gg-share::after{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:10px;height:2px;background:currentColor;left:2px}.gg-share::before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:10px;height:2px;background:currentColor;left:2px;top:0;transform:rotate(-35deg)}.gg-share::after{bottom:0;transform:rotate(35deg)}.gg-software-download{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:16px;height:6px;border:2px solid;border-top:0;border-bottom-left-radius:2px;border-bottom-right-radius:2px;margin-top:8px}.gg-software-download::after{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;border-left:2px solid;border-bottom:2px solid;transform:rotate(-45deg);left:2px;bottom:4px}.gg-software-download::before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:2px;height:10px;background:currentColor;left:5px;bottom:5px}.gg-lock{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:12px;height:11px;border:2px solid;border-top-right-radius:50%;border-top-left-radius:50%;border-bottom:rgba(0,0,0,0);margin-top:-12px}.gg-lock::after{content:"";display:block;box-sizing:border-box;position:absolute;width:16px;height:10px;border-radius:2px;border:2px solid rgba(0,0,0,0);box-shadow:0 0 0 2px;left:-4px;top:9px}.gg-lock-unlock{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:12px;height:6px;border:2px solid;border-top-right-radius:100px;border-top-left-radius:100px;border-bottom:rgba(0,0,0,0);margin-top:-18px;margin-left:-2px}.gg-lock-unlock::after,.gg-lock-unlock::before{content:"";display:block;box-sizing:border-box;position:absolute}.gg-lock-unlock::after{border:2px solid rgba(0,0,0,0);box-shadow:0 0 0 2px;width:16px;height:10px;border-radius:2px;left:-4px;top:10px}.gg-lock-unlock::before{width:2px;height:6px;background:currentColor;left:-2px;top:4px}.gg-music{display:block;box-sizing:border-box;border:2px solid;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:0;margin-top:-4px;position:relative;transform:skewY(-15deg) scale(var(--ggs, 1));width:14px;height:16px}.gg-music::after,.gg-music::before{display:block;box-sizing:border-box;border:2px solid}.gg-music::after,.gg-music::before{content:"";position:absolute;width:7px;height:7px;top:9px;left:-7px;transform:skewY(15deg);border-radius:10px}.gg-music::after{left:5px}/*# sourceMappingURL=cssgg.min.css.map */ diff --git a/styles/vendor/cssgg.min.css.map b/styles/vendor/cssgg.min.css.map index e908c59..53ce6de 100644 --- a/styles/vendor/cssgg.min.css.map +++ b/styles/vendor/cssgg.min.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../scss/node_modules/css.gg/icons/scss/home.scss","../../scss/node_modules/css.gg/icons/scss/options.scss","../../scss/node_modules/css.gg/icons/scss/info.scss","../../scss/node_modules/css.gg/icons/scss/code-slash.scss","../../scss/node_modules/css.gg/icons/scss/search.scss","../../scss/node_modules/css.gg/icons/scss/feed.scss","../../scss/node_modules/css.gg/icons/scss/eye.scss","../../scss/node_modules/css.gg/icons/scss/heart.scss","../../scss/node_modules/css.gg/icons/scss/comment.scss","../../scss/node_modules/css.gg/icons/scss/share.scss","../../scss/node_modules/css.gg/icons/scss/software-download.scss","../../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,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"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../scss/node_modules/css.gg/icons/scss/home.scss","../../scss/node_modules/css.gg/icons/scss/options.scss","../../scss/node_modules/css.gg/icons/scss/info.scss","../../scss/node_modules/css.gg/icons/scss/code-slash.scss","../../scss/node_modules/css.gg/icons/scss/search.scss","../../scss/node_modules/css.gg/icons/scss/feed.scss","../../scss/node_modules/css.gg/icons/scss/eye.scss","../../scss/node_modules/css.gg/icons/scss/heart.scss","../../scss/node_modules/css.gg/icons/scss/comment.scss","../../scss/node_modules/css.gg/icons/scss/share.scss","../../scss/node_modules/css.gg/icons/scss/software-download.scss","../../scss/node_modules/css.gg/icons/scss/lock.scss","../../scss/node_modules/css.gg/icons/scss/lock-unlock.scss","../../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"} \ No newline at end of file diff --git a/templates/components/head.latte b/templates/components/head.latte index 020ef33..87eefb9 100644 --- a/templates/components/head.latte +++ b/templates/components/head.latte @@ -13,7 +13,7 @@ {if isset($has_rss)} {/if} - - + + {$title} - ProxiTok diff --git a/templates/components/navbar.latte b/templates/components/navbar.latte index 3f8e7cd..04d7290 100644 --- a/templates/components/navbar.latte +++ b/templates/components/navbar.latte @@ -26,4 +26,4 @@ - + diff --git a/templates/components/settings/misc.latte b/templates/components/settings/misc.latte deleted file mode 100644 index 4ba494e..0000000 --- a/templates/components/settings/misc.latte +++ /dev/null @@ -1,18 +0,0 @@ -{embed '../form.latte', path: '/settings/misc', method: 'POST', submit: true} -{block fields} -
- -
- - -
-

This can be used to install the PWA version of ProxiTok

-
-{/block} -{/embed} diff --git a/templates/components/themes/card.latte b/templates/components/themes/card.latte index ce5629c..c317d19 100644 --- a/templates/components/themes/card.latte +++ b/templates/components/themes/card.latte @@ -1,4 +1,4 @@ - +
@@ -67,4 +67,4 @@
- + diff --git a/templates/components/themes/common/download.latte b/templates/components/themes/common/download.latte index 9886fda..3f57bb5 100644 --- a/templates/components/themes/common/download.latte +++ b/templates/components/themes/common/download.latte @@ -1,6 +1,6 @@