From c4f387d21147b91e708345fc6f7405fb1a2b6271 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 1 Feb 2025 10:18:06 +0200 Subject: feat: Move single archive item code to a separate file --- views/archive/index.php | 34 +++++----------------------------- views/archive/item.php | 20 ++++++++++++++++++++ views/archive/item_show.php | 8 ++++++++ views/profile/index.php | 36 ++++++------------------------------ 4 files changed, 39 insertions(+), 59 deletions(-) create mode 100644 views/archive/item.php create mode 100644 views/archive/item_show.php (limited to 'views') diff --git a/views/archive/index.php b/views/archive/index.php index 846f910..f7c427f 100644 --- a/views/archive/index.php +++ b/views/archive/index.php @@ -24,36 +24,12 @@

Archives by date:

- allArchives() as $page): ?> -
-
-
- - URL ?> - Date ?> -
-
- Visits: Visits ?> - RequesterUID)->Username ?> -
-
- -
- - + include_once __DIR__ . '/item_show.php'; + ?>

"" Does not exist!

diff --git a/views/archive/item.php b/views/archive/item.php new file mode 100644 index 0000000..4d3db12 --- /dev/null +++ b/views/archive/item.php @@ -0,0 +1,20 @@ +
+
+
+ + URL ?> + Date ?> +
+
+ Visits: Visits ?> + RequesterUID)->Username ?> +
+
+ +
diff --git a/views/archive/item_show.php b/views/archive/item_show.php new file mode 100644 index 0000000..1a31f4b --- /dev/null +++ b/views/archive/item_show.php @@ -0,0 +1,8 @@ + diff --git a/views/profile/index.php b/views/profile/index.php index 0a10e4a..58a43e2 100644 --- a/views/profile/index.php +++ b/views/profile/index.php @@ -18,36 +18,12 @@

Archives

Lists

- archives() as $page): ?> -
-
-
- - URL ?> - Date ?> -
-
- Visits: Visits ?> - RequesterUID)->Username ?> -
-
- -
- - + archives() as $page) { + include $VIEWS_DIR . '/archive/item.php'; + } + include_once $VIEWS_DIR . '/archive/item_show.php'; + ?>