From 65ef7bc6c9a18e7421468d0853d0c67369c01f97 Mon Sep 17 00:00:00 2001 From: moderndevslulw Date: Sun, 6 Jul 2025 02:06:25 +0500 Subject: feat: channel pages --- lib/partials.php | 5 +++++ lib/utils.php | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 lib/utils.php (limited to 'lib') diff --git a/lib/partials.php b/lib/partials.php index 0fec678..f957cb5 100644 --- a/lib/partials.php +++ b/lib/partials.php @@ -1,4 +1,6 @@ @@ -11,6 +13,9 @@ function html_navigation_bar()
home wiki + + channels +
1 ? "s" : ""); + } else if ($years == 0 && $days == 0 && $hours == 0) { + return "$minutes minute" . ($minutes > 1 ? "s" : ""); + } else if ($years == 0 && $days == 0) { + return "$hours hour" . ($hours > 1 ? "s" : ""); + } else if ($years == 0) { + return "$days day" . ($days > 1 ? "s" : ""); + } else { + return "$years year" . ($years > 1 ? "s" : ""); + } +} \ No newline at end of file -- cgit v1.2.3