From 7c368957bcba7503d95e030e0f1e78f8c39da4a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Nicou=C3=A9?= Date: Tue, 22 Nov 2022 12:49:43 +0100 Subject: [PATCH] Remove gallery and exhibitions controllers --- site/controllers/exhibitions.php | 26 -------------------------- site/controllers/gallery.php | 15 --------------- site/controllers/home.php | 1 - 3 files changed, 42 deletions(-) delete mode 100644 site/controllers/exhibitions.php delete mode 100644 site/controllers/gallery.php diff --git a/site/controllers/exhibitions.php b/site/controllers/exhibitions.php deleted file mode 100644 index dd5553b..0000000 --- a/site/controllers/exhibitions.php +++ /dev/null @@ -1,26 +0,0 @@ -homePage(); - - // Get exhibitions field content (stored as yaml) and parse it to return an array - $exhibitions = $page->exhibitions()->yaml(); - - // Add url based title to each exhibition - foreach ($exhibitions as &$exhibition) { - $exhibition['title'] = str_replace(['http://', 'https://', 'www.'], '', $exhibition['url']); - } - - // Get contact fields content - $email = $page->email(); - $instagram = $page->instagram(); - - return [ - 'homePage' => $homePage, - 'exhibitions' => $exhibitions, - 'email' => $email, - 'instagram' => $instagram - ]; -}; diff --git a/site/controllers/gallery.php b/site/controllers/gallery.php deleted file mode 100644 index b32dac5..0000000 --- a/site/controllers/gallery.php +++ /dev/null @@ -1,15 +0,0 @@ -template('exhibitions')->first(); - - // Get image files section content - $images = $page->files()->template("full_screen_image")->sortBy('sort'); - - return [ - 'exhibitionsPage' => $exhibitionsPage, - 'images' => $images - ]; -}; diff --git a/site/controllers/home.php b/site/controllers/home.php index 107b645..d590ae9 100644 --- a/site/controllers/home.php +++ b/site/controllers/home.php @@ -15,7 +15,6 @@ return function ($page) { $instagram = $page->instagram(); // Get image files section content - // $images = $page->files()->template("full_screen_image")->sortBy('sort'); $images = $page->files()->template("full_screen_image")->shuffle(); return [