diff --git a/CHANGELOG.md b/CHANGELOG.md index 8caed869..09e79c88 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# Flextype 0.7.3, 2018-12-13 +* Content: visibility hidden for pages - added +* Settings merged into one settings.yaml file +* Using Imagine library for image manipulation +* Flextype Component - I18n updated to 1.2.0 +* Flextype Component - Filesystem updated to 1.1.3 +* Symfony YAML - updated to 4.2.1 + # Flextype 0.7.2, 2018-11-24 * Flextype Component - Cookie updated to 1.2.0 * Flextype Component - Filesystem updated to 1.1.2 diff --git a/README.md b/README.md index 7b883bbe..d32305e6 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Flextype -![Version](https://img.shields.io/badge/version-0.7.2-brightgreen.svg?style=flat-square) +[![Discord](https://img.shields.io/discord/423097982498635778.svg?logo=discord&colorB=728ADA&label=Discord%20Chat&style=flat-square)](https://discordapp.com/invite/CCKPKVG) +![Version](https://img.shields.io/badge/version-0.7.3-brightgreen.svg?style=flat-square) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square) Flextype is Open Source, fast and flexible file-based Content Management System. @@ -96,4 +97,4 @@ Flextype is an open source project and community contributions are essential to ## LICENSE -See [LICENSE](https://github.com/flextype/flextype/blob/master/LICENSE.md) +See [LICENSE](https://github.com/flextype/flextype/blob/master/LICENSE.txt) diff --git a/composer.json b/composer.json index 9e2aa2eb..6ade4a2e 100755 --- a/composer.json +++ b/composer.json @@ -18,8 +18,9 @@ "require": { "php": ">=7.1.3", "doctrine/cache": "1.8.0", - "symfony/yaml": "4.1.1", + "symfony/yaml": "4.2.1", "thunderer/shortcode": "0.6.5", + "imagine/imagine": "1.2.0", "flextype-components/arr" : "1.2.3", "flextype-components/assets" : "1.0.1", "flextype-components/cookie" : "1.2.0", @@ -27,9 +28,9 @@ "flextype-components/debug" : "1.0.0", "flextype-components/event" : "1.0.4", "flextype-components/errorhandler" : "1.0.4", - "flextype-components/filesystem" : "1.1.2", + "flextype-components/filesystem" : "1.1.3", "flextype-components/form" : "1.0.1", - "flextype-components/i18n" : "1.1.1", + "flextype-components/i18n" : "1.2.0", "flextype-components/http" : "1.1.1", "flextype-components/html" : "1.0.0", "flextype-components/number" : "1.0.0", diff --git a/flextype/Cache.php b/flextype/Cache.php index 8aac452c..4fc7fb94 100755 --- a/flextype/Cache.php +++ b/flextype/Cache.php @@ -12,7 +12,8 @@ namespace Flextype; -use Flextype\Component\{Filesystem\Filesystem, Registry\Registry}; +use Flextype\Component\Filesystem\Filesystem; +use Flextype\Component\Registry\Registry; use \Doctrine\Common\Cache as DoctrineCache; class Cache @@ -58,14 +59,18 @@ class Cache * * @access private */ - private function __clone() { } + private function __clone() + { + } /** * Private wakeup method to enforce singleton behavior. * * @access private */ - private function __wakeup() { } + private function __wakeup() + { + } /** * Private construct method to enforce singleton behavior. @@ -89,7 +94,7 @@ class Cache Cache::$now = time(); // Create cache key to allow invalidate all cache on configuration changes. - Cache::$key = (Registry::get('system.cache.prefix') ?? 'flextype') . '-' . md5(PATH['site'] . Flextype::VERSION); + Cache::$key = (Registry::get('settings.cache.prefix') ?? 'flextype') . '-' . md5(PATH['site'] . Flextype::VERSION); // Get Cache Driver Cache::$driver = Cache::getCacheDriver(); @@ -106,7 +111,7 @@ class Cache */ public static function getCacheDriver() { - $driver_name = Registry::get('system.cache.driver'); + $driver_name = Registry::get('settings.cache.driver'); if (!$driver_name || $driver_name == 'auto') { if (extension_loaded('apcu')) { @@ -137,28 +142,34 @@ class Cache break; case 'memcache': $memcache = new \Memcache(); - $memcache->connect(Registry::get('system.cache.memcache.server', 'localhost'), - Registry::get('system.cache.memcache.port', 11211)); + $memcache->connect( + Registry::get('settings.cache.memcache.server', 'localhost'), + Registry::get('settings.cache.memcache.port', 11211) + ); $driver = new DoctrineCache\MemcacheCache(); $driver->setMemcache($memcache); break; case 'memcached': $memcached = new \Memcached(); - $memcached->addServer(Registry::get('system.cache.memcached.server', 'localhost'), - Registry::get('system.cache.memcache.port', 11211)); + $memcached->addServer( + Registry::get('settings.cache.memcached.server', 'localhost'), + Registry::get('settings.cache.memcache.port', 11211) + ); $driver = new DoctrineCache\MemcachedCache(); $driver->setMemcached($memcached); break; case 'redis': $redis = new \Redis(); - $socket = Registry::get('system.cache.redis.socket', false); - $password = Registry::get('system.cache.redis.password', false); + $socket = Registry::get('settings.cache.redis.socket', false); + $password = Registry::get('settings.cache.redis.password', false); if ($socket) { $redis->connect($socket); } else { - $redis->connect(Registry::get('system.cache.redis.server', 'localhost'), - Registry::get('system.cache.redis.port', 6379)); + $redis->connect( + Registry::get('settings.cache.redis.server', 'localhost'), + Registry::get('settings.cache.redis.port', 6379) + ); } // Authenticate with password if set @@ -209,7 +220,7 @@ class Cache */ public static function fetch(string $id) { - if (Registry::get('system.cache.enabled')) { + if (Registry::get('settings.cache.enabled')) { return Cache::$driver->fetch($id); } else { return false; @@ -224,7 +235,7 @@ class Cache */ public static function contains($id) { - if (Registry::get('system.cache.enabled')) { + if (Registry::get('settings.cache.enabled')) { return Cache::$driver->contains(($id)); } else { return false; @@ -243,7 +254,7 @@ class Cache */ public static function save(string $id, $data, $lifetime = null) { - if (Registry::get('system.cache.enabled')) { + if (Registry::get('settings.cache.enabled')) { if ($lifetime === null) { $lifetime = Cache::getLifetime(); } @@ -294,7 +305,7 @@ class Cache public static function getLifetime() { if (Cache::$lifetime === null) { - Cache::$lifetime = Registry::get('system.cache.lifetime') ?: 604800; + Cache::$lifetime = Registry::get('settings.cache.lifetime') ?: 604800; } return Cache::$lifetime; @@ -306,12 +317,12 @@ class Cache * @access public * @return object */ - public static function getInstance() - { + public static function getInstance() + { if (is_null(Cache::$instance)) { Cache::$instance = new self; } return Cache::$instance; - } + } } diff --git a/flextype/Content.php b/flextype/Content.php index 4324456d..3fa685b2 100755 --- a/flextype/Content.php +++ b/flextype/Content.php @@ -12,7 +12,11 @@ namespace Flextype; -use Flextype\Component\{Arr\Arr, Http\Http, Filesystem\Filesystem, Event\Event, Registry\Registry}; +use Flextype\Component\Arr\Arr; +use Flextype\Component\Http\Http; +use Flextype\Component\Filesystem\Filesystem; +use Flextype\Component\Event\Event; +use Flextype\Component\Registry\Registry; use Symfony\Component\Yaml\Yaml; use Thunder\Shortcode\ShortcodeFacade; use Thunder\Shortcode\Shortcode\ShortcodeInterface; @@ -48,14 +52,18 @@ class Content * * @access private */ - private function __clone() { } + private function __clone() + { + } /** * Private wakeup method to enforce singleton behavior. * * @access private */ - private function __wakeup() { } + private function __wakeup() + { + } /** * Private construct method to enforce singleton behavior. @@ -150,7 +158,7 @@ class Content { // if $url is empty then set path for defined main page if ($url === '') { - $file_path = PATH['pages'] . '/' . Registry::get('system.pages.main') . '/page.html'; + $file_path = PATH['pages'] . '/' . Registry::get('settings.pages.main') . '/page.html'; } else { $file_path = PATH['pages'] . '/' . $url . '/page.html'; } @@ -186,7 +194,7 @@ class Content $page = Content::processPage($file_path); // Get 404 page if page is not published - if (isset($page['visibility']) && $page['visibility'] === 'draft') { + if (isset($page['visibility']) && ($page['visibility'] === 'draft' || $page['visibility'] === 'hidden')) { if (Filesystem::fileExists($file_path = PATH['pages'] . '/404/page.html')) { $page = Content::processPage($file_path); Http::setResponseStatus(404); @@ -234,7 +242,7 @@ class Content if ($url === '') { // Get pages list - $pages_list = Filesystem::getFilesList($file_path , 'html'); + $pages_list = Filesystem::getFilesList($file_path, 'html'); // Create pages cached id foreach ($pages_list as $key => $page) { @@ -251,7 +259,6 @@ class Content Cache::save($pages_cache_id, $pages); } - } else { // Get pages list @@ -293,7 +300,6 @@ class Content // Return pages array return $pages; - } /** @@ -318,7 +324,7 @@ class Content * @param bool $ignore_content Ignore content parsing * @return array|string */ - public static function processPage(string $file_path, bool $raw = false, $ignore_content = false) + public static function processPage(string $file_path, bool $raw = false, bool $ignore_content = false) { // Get page from file $page = trim(Filesystem::getFileContent($file_path)); @@ -340,7 +346,7 @@ class Content $_page = Yaml::parse(Content::processShortcodes($page_frontmatter)); // Create page url item - $url = str_replace(PATH['pages'] , Http::getBaseUrl(), $file_path); + $url = str_replace(PATH['pages'], Http::getBaseUrl(), $file_path); $url = str_replace('page.html', '', $url); $url = str_replace('.html', '', $url); $url = str_replace('\\', '/', $url); @@ -348,7 +354,6 @@ class Content $url = str_replace('//', '/', $url); $url = str_replace('http:/', 'http://', $url); $url = str_replace('https:/', 'https://', $url); - $url = str_replace('/'.Registry::get('system.pages.main'), '', $url); $url = rtrim($url, '/'); $_page['url'] = $url; @@ -358,8 +363,11 @@ class Content $url = rtrim($url, '/'); $_page['slug'] = str_replace(Http::getBaseUrl(), '', $url); + // Create page template item + $_page['template'] = $_page['template'] ?? 'default'; + // Create page date item - $_page['date'] = $_page['date'] ?? date(Registry::get('system.date_format'), filemtime($file_path)); + $_page['date'] = $_page['date'] ?? date(Registry::get('settings.date_format'), filemtime($file_path)); // Create page content item with $page_content if ($ignore_content) { @@ -436,7 +444,7 @@ class Content */ private static function displayCurrentPage() : void { - Http::setRequestHeaders('Content-Type: text/html; charset='.Registry::get('system.charset')); + Http::setRequestHeaders('Content-Type: text/html; charset='.Registry::get('settings.charset')); Themes::view(empty(Content::$page['template']) ? 'templates/default' : 'templates/' . Content::$page['template']) ->assign('page', Content::$page, true) ->display(); @@ -448,12 +456,12 @@ class Content * @access public * @return object */ - public static function getInstance() - { + public static function getInstance() + { if (is_null(Content::$instance)) { Content::$instance = new self; } return Content::$instance; - } + } } diff --git a/flextype/Flextype.php b/flextype/Flextype.php index f2c9f42f..cff843af 100755 --- a/flextype/Flextype.php +++ b/flextype/Flextype.php @@ -12,7 +12,11 @@ namespace Flextype; -use Flextype\Component\{Http\Http, Session\Session, ErrorHandler\ErrorHandler, Registry\Registry, Filesystem\Filesystem}; +use Flextype\Component\Http\Http; +use Flextype\Component\Session\Session; +use Flextype\Component\ErrorHandler\ErrorHandler; +use Flextype\Component\Registry\Registry; +use Flextype\Component\Filesystem\Filesystem; use Symfony\Component\Yaml\Yaml; class Flextype @@ -22,7 +26,7 @@ class Flextype * * @var string */ - const VERSION = '0.7.2'; + const VERSION = '0.7.3'; /** * An instance of the Flextype class @@ -37,14 +41,18 @@ class Flextype * * @access private */ - private function __clone() { } + private function __clone() + { + } /** * Private wakeup method to enforce singleton behavior. * * @access private */ - private function __wakeup() { } + private function __wakeup() + { + } /** * Private construct method to enforce singleton behavior. @@ -66,19 +74,18 @@ class Flextype // Turn on output buffering ob_start(); - Flextype::setSiteConfig(); + Flextype::setConfig(); // Set internal encoding function_exists('mb_language') and mb_language('uni'); - function_exists('mb_regex_encoding') and mb_regex_encoding(Registry::get('system.charset')); - function_exists('mb_internal_encoding') and mb_internal_encoding(Registry::get('system.charset')); + function_exists('mb_regex_encoding') and mb_regex_encoding(Registry::get('settings.charset')); + function_exists('mb_internal_encoding') and mb_internal_encoding(Registry::get('settings.charset')); // Set error handler Flextype::setErrorHandler(); // Set default timezone - date_default_timezone_set(Registry::get('system.timezone')); - + date_default_timezone_set(Registry::get('settings.timezone')); // Start the session Session::start(); @@ -107,7 +114,7 @@ class Flextype private static function setErrorHandler() : void { // Display Errors - if (Registry::get('system.errors.display')) { + if (Registry::get('settings.errors.display')) { define('DEVELOPMENT', true); error_reporting(-1); } else { @@ -125,30 +132,20 @@ class Flextype } /** - * Set site config + * Set config * * @access private */ - private static function setSiteConfig() : void + private static function setConfig() : void { // Set empty site item - Registry::set('site', []); + Registry::set('settings', []); - // Set site items if site config exists - if (Filesystem::fileExists($site_config = PATH['config'] . '/' . 'site.yaml')) { - Registry::set('site', Yaml::parseFile($site_config)); + // Set settings items if settings config exists + if (Filesystem::fileExists($settings_config = PATH['config'] . '/' . 'settings.yaml')) { + Registry::set('settings', Yaml::parseFile($settings_config)); } else { - throw new \RuntimeException("Flextype site config file does not exist."); - } - - // Set empty system item - Registry::set('system', []); - - // Set site items if system config exists - if (Filesystem::fileExists($system_config = PATH['config'] . '/' . 'system.yaml')) { - Registry::set('system', Yaml::parseFile($system_config)); - } else { - throw new \RuntimeException("Flextype system config file does not exist."); + throw new \RuntimeException("Flextype settings config file does not exist."); } } @@ -158,12 +155,12 @@ class Flextype * @access public * @return object */ - public static function getInstance() - { + public static function getInstance() + { if (is_null(Flextype::$instance)) { Flextype::$instance = new self; } return Flextype::$instance; - } + } } diff --git a/flextype/Plugins.php b/flextype/Plugins.php index 23bde314..8a26231d 100755 --- a/flextype/Plugins.php +++ b/flextype/Plugins.php @@ -12,7 +12,10 @@ namespace Flextype; -use Flextype\Component\{Filesystem\Filesystem, Event\Event, I18n\I18n, Registry\Registry}; +use Flextype\Component\Filesystem\Filesystem; +use Flextype\Component\Event\Event; +use Flextype\Component\I18n\I18n; +use Flextype\Component\Registry\Registry; use Symfony\Component\Yaml\Yaml; class Plugins @@ -50,6 +53,7 @@ class Plugins 'id' => 'Bahasa Indonesia', 'ja' => '日本語', 'lt' => 'Lietuvių', + 'hr' => 'Hrvatski', 'nl' => 'Nederlands', 'no' => 'Norsk', 'pl' => 'Polski', @@ -70,14 +74,18 @@ class Plugins * * @access private */ - private function __clone() { } + private function __clone() + { + } /** * Private wakeup method to enforce singleton behavior. * * @access private */ - private function __wakeup() { } + private function __wakeup() + { + } /** * Private construct method to enforce singleton behavior. @@ -131,7 +139,6 @@ class Plugins // Go through... foreach ($plugins_list as $plugin) { - if (Filesystem::fileExists($_plugin_settings = PATH['plugins'] . '/' . $plugin . '/settings.yaml')) { $plugin_settings = Yaml::parseFile($_plugin_settings); } @@ -177,12 +184,12 @@ class Plugins * Get locales. * * @access public - * @return object + * @return array */ - public static function getLocales() - { + public static function getLocales() : array + { return Plugins::$locales; - } + } /** * Get the Plugins instance. @@ -190,12 +197,12 @@ class Plugins * @access public * @return object */ - public static function getInstance() - { + public static function getInstance() + { if (is_null(Plugins::$instance)) { Plugins::$instance = new self; } return Plugins::$instance; - } + } } diff --git a/flextype/Themes.php b/flextype/Themes.php index 70b7ef9b..a0df9f41 100644 --- a/flextype/Themes.php +++ b/flextype/Themes.php @@ -12,7 +12,9 @@ namespace Flextype; -use Flextype\Component\{Filesystem\Filesystem, View\View, Registry\Registry}; +use Flextype\Component\Filesystem\Filesystem; +use Flextype\Component\View\View; +use Flextype\Component\Registry\Registry; use Symfony\Component\Yaml\Yaml; class Themes @@ -29,14 +31,18 @@ class Themes * * @access private */ - private function __clone() { } + private function __clone() + { + } /** * Private wakeup method to enforce singleton behavior. * * @access private */ - private function __wakeup() { } + private function __wakeup() + { + } /** * Private construct method to enforce singleton behavior. @@ -63,7 +69,7 @@ class Themes $theme_cache_id = ''; // Get current theme - $theme = Registry::get('system.theme'); + $theme = Registry::get('settings.theme'); // Set empty themes items Registry::set('themes', []); @@ -72,16 +78,16 @@ class Themes $theme_cache_id = md5('theme' . filemtime(PATH['themes'] .'/'. $theme . '/' . 'settings.yaml') . filemtime(PATH['themes'] .'/'. $theme . '/' . $theme . '.yaml')); - // Get Theme mafifest file and write to site.themes array + // Get Theme mafifest file and write to settings.themes array if (Cache::contains($theme_cache_id)) { - Registry::set('themes.'.Registry::get('system.theme'), Cache::fetch($theme_cache_id)); + Registry::set('themes.'.Registry::get('settings.theme'), Cache::fetch($theme_cache_id)); } else { if (Filesystem::fileExists($theme_settings = PATH['themes'] . '/' . $theme . '/' . 'settings.yaml') and Filesystem::fileExists($theme_config = PATH['themes'] . '/' . $theme . '/' . $theme . '.yaml')) { $theme_settings = Yaml::parseFile($theme_settings); $theme_config = Yaml::parseFile($theme_config); $_theme = array_merge($theme_settings, $theme_config); - Registry::set('themes.'.Registry::get('system.theme'), $_theme); + Registry::set('themes.'.Registry::get('settings.theme'), $_theme); Cache::save($theme_cache_id, $_theme); } } @@ -99,8 +105,8 @@ class Themes { // Set view file // From current theme folder or from plugin folder - if (Filesystem::fileExists(PATH['themes'] . '/' . Registry::get('system.theme') . '/views/' . $template . View::$view_ext)) { - $template = PATH['themes'] . '/' . Registry::get('system.theme') . '/views/' . $template; + if (Filesystem::fileExists(PATH['themes'] . '/' . Registry::get('settings.theme') . '/views/' . $template . View::$view_ext)) { + $template = PATH['themes'] . '/' . Registry::get('settings.theme') . '/views/' . $template; } else { $template = PATH['plugins'] . '/' . $template; } @@ -109,18 +115,85 @@ class Themes return new View($template, $variables); } + /** + * Get templates for current theme + * + * @access public + * @return array + */ + public static function getTemplates() : array + { + $templates = []; + + // Get templates files + $_templates = Filesystem::getFilesList(PATH['themes'] . '/' . Registry::get('settings.theme') . '/views/templates/', 'php'); + + // If there is any template file then go... + if (count($_templates) > 0) { + foreach ($_templates as $template) { + if (!is_bool(Themes::_strrevpos($template, '/templates/'))) { + $template_name = str_replace('.php', '', substr($template, Themes::_strrevpos($template, '/templates/')+strlen('/templates/'))); + $templates[$template_name] = $template_name; + } + } + } + + // return templates + return $templates; + } + + /** + * Get templates blueprints for current theme + * + * @access public + * @return array + */ + public static function getTemplatesBlueprints() : array + { + $blueprints = []; + + // Get blueprints files + $_blueprints = Filesystem::getFilesList(PATH['themes'] . '/' . Registry::get('settings.theme') . '/blueprints/', 'yaml'); + + // If there is any template file then go... + if (count($_blueprints) > 0) { + foreach ($_blueprints as $blueprint) { + if (!is_bool(Themes::_strrevpos($blueprint, '/blueprints/'))) { + $blueprint_name = str_replace('.yaml', '', substr($blueprint, Themes::_strrevpos($blueprint, '/blueprints/')+strlen('/blueprints/'))); + $blueprints[$blueprint_name] = $blueprint_name; + } + } + } + + // return blueprints + return $blueprints; + } + + /** + * _strrevpos + */ + private static function _strrevpos($instr, $needle) + { + $rev_pos = strpos(strrev($instr), strrev($needle)); + if ($rev_pos === false) { + return false; + } else { + return strlen($instr) - $rev_pos - strlen($needle); + } + } + /** * Get the Themes instance. * * @access public * @return object */ - public static function getInstance() - { + public static function getInstance() + { if (is_null(Themes::$instance)) { Themes::$instance = new self; } return Themes::$instance; - } + } } diff --git a/site/config/settings.yaml b/site/config/settings.yaml new file mode 100644 index 00000000..2bd4c329 --- /dev/null +++ b/site/config/settings.yaml @@ -0,0 +1,21 @@ +title: Flextype +description: 'Modern Open Source Flat-File Content Management System' +keywords: 'flextype, php, cms, flat-file cms, flat cms, flatfile cms, html' +robots: 'index, follow' +author: + name: '' + email: '' +timezone: UTC +date_format: 'F d Y H:i:s' +charset: UTF-8 +theme: simple +locale: en +pages: + main: home +errors: + display: true +cache: + enabled: true + prefix: flextype + driver: auto + lifetime: 604800 diff --git a/site/config/site.yaml b/site/config/site.yaml deleted file mode 100755 index fd90ec51..00000000 --- a/site/config/site.yaml +++ /dev/null @@ -1,7 +0,0 @@ -title: 'Flextype' -description: 'Modern Open Source Flat-File Content Management System' -keywords: 'flextype, php, cms, flat-file cms, flat cms, flatfile cms, html' -robots: 'index, follow' -author: - name: '' - email: '' diff --git a/site/config/system.yaml b/site/config/system.yaml deleted file mode 100755 index 91d621be..00000000 --- a/site/config/system.yaml +++ /dev/null @@ -1,19 +0,0 @@ -timezone: UTC -date_format: 'F d Y H:i:s.' -charset: UTF-8 - -theme: simple - -locale: 'en' - -pages: - main: home - -errors: - display: false - -cache: - enabled: true - prefix: flextype - driver: auto - lifetime: 604800 diff --git a/site/pages/404/page.html b/site/pages/404/page.html old mode 100644 new mode 100755 diff --git a/site/pages/home/page.html b/site/pages/home/page.html old mode 100644 new mode 100755 index 63bd4602..e8c41ea5 --- a/site/pages/home/page.html +++ b/site/pages/home/page.html @@ -1,15 +1,12 @@ --- title: Welcome description: 'Flextype is a simple and light-weighted Content Management System' -date: 'June 27 2018 14:54:22.' -visibility: visible -template: default ---

Flextype is succesfully installed!

You can start editing the content and customising your site.

Edit this Page

-

To edit this page, simply go to the folder you installed Flextype, and then browse to the `/site/pages/home/` folder and open the `page.md` file in your editor.

+

To edit this page, simply go to the folder you installed Flextype, and then browse to the `/site/pages/home/` folder and open the `page.html` file in your editor.

Create a New page

Creating a new page is very simple in Flextype.

@@ -24,6 +21,6 @@ title: My New Page

This is the body of My New Page

-2. Save this file in the /site/pages/my-new-page/ folder as page.md and its will be available by this url: http://your_site_url/my-new-page +2. Save this file in the /site/pages/my-new-page/ folder as page.html and its will be available by this url: http://your_site_url/my-new-page

That is it!

diff --git a/site/themes/simple/blueprints/default.yaml b/site/themes/simple/blueprints/default.yaml new file mode 100644 index 00000000..5f0ced9a --- /dev/null +++ b/site/themes/simple/blueprints/default.yaml @@ -0,0 +1,19 @@ +fields: + title: + title: "admin_pages_title" + type: text + content: + title: "admin_pages_content" + type: html + template: + title: "admin_pages_template" + type: template_select + size: col-4 + visibility: + title: "admin_pages_visibility" + type: visibility_select + size: col-4 + date: + title: "admin_pages_date" + type: text + size: col-4 diff --git a/site/themes/simple/views/partials/head.php b/site/themes/simple/views/partials/head.php index 6bc0ef18..c12e4b39 100755 --- a/site/themes/simple/views/partials/head.php +++ b/site/themes/simple/views/partials/head.php @@ -3,23 +3,23 @@ use Flextype\Component\{Event\Event, Http\Http, Registry\Registry, Assets\Assets, Text\Text, Html\Html}; ?> - + - + - - - + + + - <?php echo Html::toText($page['title']); ?> | <?php echo Html::toText(Registry::get('site.title')); ?> + <?php echo Html::toText($page['title']); ?> | <?php echo Html::toText(Registry::get('settings.title')); ?> - - + + diff --git a/site/themes/simple/views/partials/navigation.php b/site/themes/simple/views/partials/navigation.php index 7a33dbdc..53309223 100755 --- a/site/themes/simple/views/partials/navigation.php +++ b/site/themes/simple/views/partials/navigation.php @@ -4,7 +4,7 @@ ?>