1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<?php /* Copyright (c) 2024 Freya Murphy */
// CONFIG
// config values needed across the website
//
// domain - the default domain for the website
//
// allowed_hosts - accepted domains to use for the website
//
// base_path - the base path the website is located at
//
// theme_color - html hex color used for browser metadata
//
// routes - array of regex keys that match the request path and
// - place it with the value if it matches
// - e.g. '' => 'home' sends / to /home
//
// style - single or list of css styles to load on specific routes
//
// js - single or list of js script to load on specific routes
//
// autoload - list of directories to autoload all PHP files in them
//
define('SITE_CONFIG', array(
/* core settings */
'domain' => 'xssbook.com',
'allowed_hosts' => ['xssbook.com'],
'base_path' => '/',
'theme_color' => '#1778f2',
/* route overides */
'routes' => array(
'manifest.json' => '_meta/manifest',
),
/* css to load on each route */
'style' => array(
'' => 'css/common.css',
'home' => ['css/home.css', 'css/post.css'],
'auth' => 'css/auth.css',
'people' => 'css/people.css',
'profile' => ['css/profile.css', 'css/people.css', 'css/post.css'],
'settings' => 'css/settings.css',
'error' => 'css/error.css',
),
/* js to load on each route */
'js' => array(
'' => ['js/thirdparty/jquery.min.js', 'js/lib.js', 'js/modal.js'],
'home' => 'js/post.js',
'profile' => 'js/post.js',
),
/* directories to autoload php code */
'autoload' => array('/lib'),
));
define('POST_PAGE_SIZE', 10);
define('COMMENT_PAGE_SIZE', 5);
define('PEOPLE_PAGE_SIZE', 24);
|