From 944b6b0526032ad8c1b4a2612d6723bec75e0e4c Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Fri, 29 Mar 2024 22:29:56 -0400 Subject: start database (user and post), and initial barebones home page --- web/core/aesthetic.php | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 web/core/aesthetic.php (limited to 'web/core/aesthetic.php') diff --git a/web/core/aesthetic.php b/web/core/aesthetic.php new file mode 100644 index 0000000..1180ad1 --- /dev/null +++ b/web/core/aesthetic.php @@ -0,0 +1,55 @@ +config = array( + '_common' => array( + 'js' => [ + 'js/jquery-3.7.1.min.js', + 'js/lib.js', + 'js/modal.js', + ], + 'css' => [ + 'css/common.css' + ], + ), + 'error' => array( + 'css' => [ + 'css/error.css' + ], + ), + 'home' => array( + 'js' => [ + 'js/post.js', + ], + 'css' => [ + 'css/home.css', + 'css/post.css' + ], + ), + ); + } + + function get_files($route) { + $js_files = $this->config['_common']['js']; + $css_files = $this->config['_common']['css']; + + if (array_key_exists($route, $this->config)) { + $config = $this->config[$route]; + if (array_key_exists('js', $config)) { + $js_files = array_merge($js_files, $config['js']); + } + if (array_key_exists('css', $config)) { + $css_files = array_merge($css_files, $config['css']); + } + } + + return array( + 'js_files' => $js_files, + 'css_files' => $css_files, + ); + } + +} -- cgit v1.2.3-freya