aboutsummaryrefslogtreecommitdiff
path: root/app/class/model.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/model.php')
-rw-r--r--app/class/model.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/app/class/model.php b/app/class/model.php
index 3f4be4a..d7f34da 100644
--- a/app/class/model.php
+++ b/app/class/model.php
@@ -3,16 +3,34 @@ class Model
{
const CONFIG_FILE = 'config.json';
- const GLOBAL_CSS_DIR = '.' . DIRECTORY_SEPARATOR . 'css' . DIRECTORY_SEPARATOR . 'global' . DIRECTORY_SEPARATOR . 'global.css';
+ const CSS_DIR = 'assets' . DIRECTORY_SEPARATOR .'css' . DIRECTORY_SEPARATOR;
const MEDIA_DIR = '.' . DIRECTORY_SEPARATOR . 'media' . DIRECTORY_SEPARATOR;
const TEMPLATES_DIR = '.'. DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;
- const RENDER_DIR = '.'. DIRECTORY_SEPARATOR . 'assets'. DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR;
+ const RENDER_DIR = 'assets'. DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR;
const DATABASE_DIR = '.' . DIRECTORY_SEPARATOR . 'database' . DIRECTORY_SEPARATOR;
const MEDIA_EXTENSIONS = array('jpeg', 'jpg', 'JPG', 'png', 'gif', 'mp3', 'mp4', 'mov', 'wav', 'flac', 'pdf');
const MEDIA_TYPES = ['image', 'video', 'sound', 'other'];
const TEXT_ELEMENTS = ['header', 'nav', 'section', 'aside', 'footer'];
+ public static function renderpath()
+ {
+ $basepath = '';
+ if(!empty(Config::basepath())) {
+ $basepath = Config::basepath() . DIRECTORY_SEPARATOR ;
+ }
+ return DIRECTORY_SEPARATOR . $basepath . Model::RENDER_DIR;
+ }
+
+ public static function csspath()
+ {
+ $basepath = '';
+ if(!empty(Config::basepath())) {
+ $basepath = Config::basepath() . DIRECTORY_SEPARATOR ;
+ }
+ return DIRECTORY_SEPARATOR . $basepath . Model::CSS_DIR;
+ }
+
}