small fixes

This commit is contained in:
Pablo Ferreiro 2022-01-03 17:06:25 +01:00
parent 340f500206
commit fe3ae82100
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
4 changed files with 5 additions and 6 deletions

View file

@ -20,7 +20,7 @@ function getApi(array $proxy_elements): \Sovit\TikTok\Api {
function getLatte(): \Latte\Engine {
$subdir = getSubdir();
$latte = new Latte\Engine;
$latte->setTempDirectory('./cache/views');
$latte->setTempDirectory(__DIR__ . '/../cache/views');
$latte->addFunction('assets', function (string $name, string $type) use ($subdir) {
$path = "{$subdir}/{$type}/{$name}";
return $path;
@ -33,7 +33,7 @@ function getLatte(): \Latte\Engine {
}
function getView(string $template): string {
return "./views/{$template}.latte";
return __DIR__ . "/../views/{$template}.latte";
}
Route::add('/', function () {

View file

@ -3,5 +3,5 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/bulmaswatch/superhero/bulmaswatch.min.css">
<title>{$title} - Tiktok Viewer</title>
<title>{$title} - Tiktok Alt-Frontend</title>
</head>

View file

@ -8,8 +8,7 @@
<section class="hero is-fullheight-with-navbar">
<div class="hero-body">
<div class="container has-text-centered">
<p class="title">Welcome to TikTok Viewer!</p>
<p class="subtitle">Alternative TikTok Frontend</p>
<p class="title">Welcome to TikTok Alt-Frontend!</p>
<p>Search user:</p>
<form id="username_form">
<div class="field has-addons has-addons-centered">

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
{include 'components/head.latte', title: 'Challenge'}
{include 'components/head.latte', title: 'Tag'}
<body>
{include 'components/navbar.latte'}