Drop .0 or .0.0 from version for display
This commit is contained in:
@@ -50,13 +50,9 @@ function nav_link(string $link, bool $isFirst = false) {
|
||||
* Render the title bar for the page
|
||||
*/
|
||||
function title_bar(): void {
|
||||
$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
|
||||
}; ?>
|
||||
$version = display_version();; ?>
|
||||
<header hx-target=#main hx-push-url=true>
|
||||
<div><a href=/ class=title>Feed Reader Central</a><span class=version>v<?=$version?></span></div>
|
||||
<div><a href=/ class=title>Feed Reader Central</a><span class=version><?=$version?></span></div>
|
||||
<nav><?php
|
||||
if (key_exists(Key::USER_ID, $_SESSION)) {
|
||||
$db = Data::getConnection();
|
||||
|
||||
Reference in New Issue
Block a user