Add single-user password utils (#9)

- Constrain images to reading viewport
This commit is contained in:
2024-04-27 16:34:59 -04:00
parent 0df40f3cfd
commit 9611893da3
6 changed files with 75 additions and 25 deletions

View File

@@ -43,12 +43,10 @@ function add_info(string $message): void {
* @param string $title The title of the page being displayed
*/
function page_head(string $title): void {
if (str_ends_with(FRC_VERSION, '.0.0')) {
$version = substr(FRC_VERSION, 0, strlen(FRC_VERSION) - 4);
} elseif (str_ends_with(FRC_VERSION, '.0')) {
$version = substr(FRC_VERSION, 0, strlen(FRC_VERSION) - 2);
} else {
$version = FRC_VERSION;
$version = match (true) {
str_ends_with(FRC_VERSION, '.0.0') => substr(FRC_VERSION, 0, strlen(FRC_VERSION) - 4),
str_ends_with(FRC_VERSION, '.0') => substr(FRC_VERSION, 0, strlen(FRC_VERSION) - 2),
default => FRC_VERSION
} ?>
<!DOCTYPE html>
<html lang=en>