This commit is contained in:
Jay Trees 2022-03-01 10:47:22 +01:00
parent 95b1788367
commit f06902a703
3 changed files with 42 additions and 11 deletions

View file

@ -167,12 +167,22 @@ class Page
/** Fomantic UI */
$stylesheetFomantic = 'semantic/dist/semantic.min.css';
$stylesheetFomanticModified = filemtime($stylesheetFomantic);
echo '<link rel="stylesheet" type="text/css" href="/' . $stylesheetFomantic . '?m=' . $stylesheetFomanticModified . '" />';
?>
<link rel="stylesheet"
type="text/css"
href="/<?= $stylesheetFomantic ?>?m=<?= $stylesheetFomanticModified ?>"
/>
<?php
/** Default */
$stylesheetDefault = 'src/assets/css/default.css';
$stylesheetDefaultModified = filemtime($stylesheetDefault);
echo '<link rel="stylesheet" type="text/css" href="/' . $stylesheetDefault . '?m=' . $stylesheetDefaultModified . '" />';
?>
<link rel="stylesheet"
type="text/css"
href="/<?= $stylesheetDefault ?>?m=<?= $stylesheetDefaultModified ?>"
/>';
<?php
/** Page */
$stylesheetPage = 'src/assets/css/' . $this->name . '.css';
@ -180,7 +190,12 @@ class Page
if (file_exists($stylesheetPage)) {
$stylesheetPageModified = filemtime($stylesheetPage);
echo '<link rel="stylesheet" type="text/css" href="/' . $stylesheetPage . '?m=' . $stylesheetPageModified . '" />';
?>
<link rel="stylesheet"
type="text/css"
href="/<?= $stylesheetPage ?>?m=<?= $stylesheetPageModified ?>"
/>
<?php
}
/**
@ -195,17 +210,23 @@ class Page
/** jQuery */
$scriptjQuery = 'node_modules/jquery/dist/jquery.min.js';
$scriptjQueryModified = filemtime($scriptjQuery);
echo '<script defer src="/' . $scriptjQuery . '?m=' . $scriptjQueryModified . '"></script>';
?>
<script defer src="/<?= $scriptjQuery ?>?m=<?= $scriptjQueryModified ?>"></script>
<?php
/** Fomantic */
$scriptFomantic = 'semantic/dist/semantic.min.js';
$scriptFomanticModified = filemtime($scriptFomantic);
echo '<script defer src="/' . $scriptFomantic . '?m=' . $scriptFomanticModified . '"></script>';
?>
<script defer src="/<?= $scriptFomantic ?>?m=<?= $scriptFomanticModified ?>'"></script>
<?php
/** Default */
$scriptDefault = 'src/assets/js/default.js';
$scriptDefaultModified = filemtime($scriptDefault);
echo '<script defer src="/' . $scriptDefault . '?m=' . $scriptDefaultModified . '"></script>';
?>
<script defer src="/<?= $scriptDefault ?>?m=<?= $scriptDefaultModified ?>"></script>
<?php
/** Page */
$scriptPage = 'src/assets/js/' . $this->name . '.js';
@ -213,7 +234,9 @@ class Page
if (file_exists($scriptPage)) {
$scriptPageModified = filemtime($scriptPage);
echo '<script defer src="/' . $scriptPage . '?m=' . $scriptPageModified . '"></script>';
?>
<script defer src="/<?= $scriptPage ?>?m=<?= $scriptPageModified ?>"></script>
<?php
}
?>

View file

@ -10,7 +10,8 @@ namespace wishthis;
class URL
{
public function __construct(private string $url) {
public function __construct(private string $url)
{
}
public function getPretty(): string
@ -29,7 +30,7 @@ class URL
$rewriteRule = rtrim($rewriteRule, '$');
$target = $parts[2];
$keys = array_map(
function($item) {
function ($item) {
return explode('=', $item)[0];
},
explode('&', parse_url($target, PHP_URL_QUERY))

View file

@ -111,7 +111,10 @@ $page->navigation();
It will save all your passwords and allow you to access them with one master password.
Never forget a password ever again.
</p>
<p><a href="https://bitwarden.com/" target="_blank">Bitwarden</a> is the most trusted open source password manager.</p>
<p>
<a href="https://bitwarden.com/" target="_blank">Bitwarden</a>
is the most trusted open source password manager.
</p>
<p>
<form class="ui form reset" method="post">
@ -122,7 +125,11 @@ $page->navigation();
<i class="envelope icon"></i>
</div>
<input class="ui primary button" type="submit" name="reset" value="Send email" />
<input class="ui primary button"
type="submit"
name="reset"
value="Send email"
/>
</div>
</div>