mirror of
https://github.com/sigmasternchen/drnk.me
synced 2025-03-15 09:48:54 +00:00
refactor: Change component to fragments
This commit is contained in:
parent
358447514f
commit
6a77e6636c
5 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ return function (array &$context) {
|
|||
$data = [];
|
||||
|
||||
if (key_exists("formonly", $_GET)) {
|
||||
require(ROOT . "/templates/pages/components/url-form.php");
|
||||
require(ROOT . "/templates/pages/fragments/url-form.php");
|
||||
} else {
|
||||
require(ROOT . "/templates/pages/homepage.php");
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ function validateInput(string $url) {
|
|||
"error" => $error,
|
||||
"url" => $url,
|
||||
];
|
||||
require(ROOT . "/templates/pages/components/url-form.php");
|
||||
require(ROOT . "/templates/pages/fragments/url-form.php");
|
||||
return null;
|
||||
} else {
|
||||
return $url;
|
||||
|
@ -124,5 +124,5 @@ return function (array &$context) {
|
|||
"url" => "https://drnk.me/" . $result->slug,
|
||||
"accessKey" => $result->accessKey,
|
||||
];
|
||||
require(ROOT . "/templates/pages/components/creation-successful.php");
|
||||
require(ROOT . "/templates/pages/fragments/creation-successful.php");
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@ require(__DIR__ . "/../layout/top.php");
|
|||
<img class="bottle" src="/static/img/bottle.png" alt="picture of a vile with a tag 'Drnk Me'" />
|
||||
|
||||
<div class="center-panel">
|
||||
<?php require(__DIR__ . "/components/url-form.php"); ?>
|
||||
<?php require(__DIR__ . "/fragments/url-form.php"); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
|
Loading…
Reference in a new issue