aboutsummaryrefslogtreecommitdiff
path: root/app/class/Model.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-04-27 10:56:24 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-04-28 20:21:34 +0200
commitc832f91ca41490f69f478045c86038f9ef4a5cb5 (patch)
treeb371e504c04660bbabb79721c5db7b086888ec01 /app/class/Model.php
parentd66de69ba57f00079ab8d5e4b9a1d1f73093e76a (diff)
downloadwcms-c832f91ca41490f69f478045c86038f9ef4a5cb5.tar.gz
wcms-c832f91ca41490f69f478045c86038f9ef4a5cb5.zip
move fonts into media
move global css into media
Diffstat (limited to 'app/class/Model.php')
-rw-r--r--app/class/Model.php38
1 files changed, 13 insertions, 25 deletions
diff --git a/app/class/Model.php b/app/class/Model.php
index 7e891f1..60983bc 100644
--- a/app/class/Model.php
+++ b/app/class/Model.php
@@ -7,19 +7,19 @@ abstract class Model
public const CONFIG_FILE = 'config.json';
public const MAN_FILE = 'MANUAL.md';
- public const CSS_DIR = 'assets/css/';
- public const COLORS_FILE = self::CSS_DIR . 'tagcolors.css';
+ public const ASSETS_CSS_DIR = 'assets/css/';
+ public const COLORS_FILE = self::ASSETS_CSS_DIR . 'tagcolors.css';
public const JS_DIR = 'assets/js/';
public const ICONS_DIR = 'assets/icons/';
- public const FONT_DIR = 'fonts/';
public const MEDIA_DIR = 'media/';
public const FAVICON_DIR = self::MEDIA_DIR . 'favicon/';
public const THUMBNAIL_DIR = self::MEDIA_DIR . 'thumbnail/';
+ public const FONT_DIR = self::MEDIA_DIR . 'fonts/';
+ public const CSS_DIR = self::MEDIA_DIR . 'css/';
public const TEMPLATES_DIR = './app/view/templates/';
public const RENDER_DIR = 'assets/render/';
public const HTML_RENDER_DIR = 'render/';
- public const GLOBAL_DIR = 'assets/global/';
- public const GLOBAL_CSS_FILE = self::GLOBAL_DIR . 'global.css';
+ public const GLOBAL_CSS_FILE = self::CSS_DIR . 'global.css';
public const DATABASE_DIR = './database/';
public const PAGES_DIR = self::DATABASE_DIR . 'pages/';
@@ -81,9 +81,9 @@ abstract class Model
];
public const BOOKMARK_ICONS = [
- '🌘', '☂️', '⭐️', '✈️', '🚲', '💡', '💾', '💿', '💎', '🎞', ' ⚒', '💊', '📜', '📌', '🔍', '📦', '🔒',
- '📒', '🔓', '🌡', '☎️', '🖤', '✝️', '☢️', '✅', '🌐', '🌍', '✳️', '🏴', '😎', '👻', '💩', '👍', '⚡️', '🍸',
- '🍴', '⚽️', '🏭', '🚀', '⚓️'
+ '⭐️', '🖤', '🏴', '👍', '📌', '💡', '🌘', '☂️', '✈️', '🚲', '💾', '💿', '💎', '🎞', ' ⚒', '💊', '📜',
+ '📒', '🔓', '🌡', '☎️', '✝️', '☢️', '✅', '🌐', '🌍', '✳️', '🏴', '😎', '👻', '💩', '⚡️', '🍸', '🔍', '📦',
+ '🍴', '⚽️', '🏭', '🚀', '⚓️', '🔒'
];
public const LIST_STYLES = [
@@ -158,6 +158,11 @@ abstract class Model
return self::dirtopath(Model::CSS_DIR);
}
+ public static function assetscsspath()
+ {
+ return self::dirtopath(Model::ASSETS_CSS_DIR);
+ }
+
public static function jspath()
{
return self::dirtopath(Model::JS_DIR);
@@ -189,23 +194,6 @@ abstract class Model
}
/**
- * Check if dir exist. If not, create it
- *
- * @param string $dir Directory to check
- * @return bool return true if the dir already exist or was created succesfullt. Otherwise return false
- * @throws \InvalidArgumentException If folder creation is impossible
- */
- public static function dircheck(string $dir): bool
- {
- if (!is_dir($dir)) {
- if (!mkdir($dir)) {
- throw new \InvalidArgumentException("Cannot create directory : $dir");
- }
- }
- return true;
- }
-
- /**
*
*/
public static function mediatypes()