From 52b679b33f500903a4ca0bfd27c30bcb47fb23c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Goetz?= Date: Thu, 23 Apr 2015 10:24:50 +0200 Subject: [PATCH] New templating system --- Gruntfile.js | 8 +- composer.json | 3 +- composer.lock | 77 ++++- default.json | 26 +- libs/Daux.php | 29 +- libs/DauxHelper.php | 43 +-- libs/Generator/Helper.php | 12 - libs/MarkdownPage.php | 21 +- libs/Server/ErrorPage.php | 10 +- libs/Template.php | 117 +++++++ {js => resources/js}/bootstrap.min.js | 0 {js => resources/js}/custom.js | 0 {js => resources/js}/editor.js | 0 {js => resources/js}/highlight.min.js | 0 {js => resources/js}/jquery-1.11.0.min.js | 0 .../themes/_common/less/bootstrap/alerts.less | 0 .../themes/_common/less/bootstrap/badges.less | 0 .../_common/less/bootstrap/bootstrap.less | 0 .../_common/less/bootstrap/breadcrumbs.less | 0 .../_common/less/bootstrap/button-groups.less | 0 .../_common/less/bootstrap/buttons.less | 0 .../_common/less/bootstrap/carousel.less | 0 .../themes/_common/less/bootstrap/close.less | 0 .../themes/_common/less/bootstrap/code.less | 0 .../less/bootstrap/component-animations.less | 0 .../_common/less/bootstrap/dropdowns.less | 0 .../themes/_common/less/bootstrap/forms.less | 0 .../_common/less/bootstrap/glyphicons.less | 0 .../themes/_common/less/bootstrap/grid.less | 0 .../_common/less/bootstrap/input-groups.less | 0 .../_common/less/bootstrap/jumbotron.less | 0 .../themes/_common/less/bootstrap/labels.less | 0 .../_common/less/bootstrap/list-group.less | 0 .../themes/_common/less/bootstrap/media.less | 0 .../themes/_common/less/bootstrap/mixins.less | 0 .../_common/less/bootstrap/mixins/alerts.less | 0 .../bootstrap/mixins/background-variant.less | 0 .../less/bootstrap/mixins/border-radius.less | 0 .../less/bootstrap/mixins/buttons.less | 0 .../less/bootstrap/mixins/center-block.less | 0 .../less/bootstrap/mixins/clearfix.less | 0 .../_common/less/bootstrap/mixins/forms.less | 0 .../less/bootstrap/mixins/gradients.less | 0 .../less/bootstrap/mixins/grid-framework.less | 0 .../_common/less/bootstrap/mixins/grid.less | 0 .../less/bootstrap/mixins/hide-text.less | 0 .../_common/less/bootstrap/mixins/image.less | 0 .../_common/less/bootstrap/mixins/labels.less | 0 .../less/bootstrap/mixins/list-group.less | 0 .../less/bootstrap/mixins/nav-divider.less | 0 .../bootstrap/mixins/nav-vertical-align.less | 0 .../less/bootstrap/mixins/opacity.less | 0 .../less/bootstrap/mixins/pagination.less | 0 .../_common/less/bootstrap/mixins/panels.less | 0 .../less/bootstrap/mixins/progress-bar.less | 0 .../less/bootstrap/mixins/reset-filter.less | 0 .../_common/less/bootstrap/mixins/resize.less | 0 .../mixins/responsive-visibility.less | 0 .../_common/less/bootstrap/mixins/size.less | 0 .../less/bootstrap/mixins/tab-focus.less | 0 .../less/bootstrap/mixins/table-row.less | 0 .../less/bootstrap/mixins/text-emphasis.less | 0 .../less/bootstrap/mixins/text-overflow.less | 0 .../bootstrap/mixins/vendor-prefixes.less | 0 .../themes/_common/less/bootstrap/modals.less | 0 .../themes/_common/less/bootstrap/navbar.less | 0 .../themes/_common/less/bootstrap/navs.less | 0 .../_common/less/bootstrap/normalize.less | 0 .../themes/_common/less/bootstrap/pager.less | 0 .../_common/less/bootstrap/pagination.less | 0 .../themes/_common/less/bootstrap/panels.less | 0 .../_common/less/bootstrap/popovers.less | 0 .../themes/_common/less/bootstrap/print.less | 0 .../_common/less/bootstrap/progress-bars.less | 0 .../less/bootstrap/responsive-embed.less | 0 .../less/bootstrap/responsive-utilities.less | 0 .../_common/less/bootstrap/scaffolding.less | 0 .../themes/_common/less/bootstrap/tables.less | 0 .../themes/_common/less/bootstrap/theme.less | 0 .../_common/less/bootstrap/thumbnails.less | 0 .../_common/less/bootstrap/tooltip.less | 0 .../themes/_common/less/bootstrap/type.less | 0 .../_common/less/bootstrap/utilities.less | 0 .../_common/less/bootstrap/variables.less | 0 .../themes/_common/less/bootstrap/wells.less | 0 .../themes/_common/less/components.less | 0 .../themes/_common/less/daux-base.less | 0 .../themes/_common/less/highlight.less | 0 .../themes/_common/less/mixins.less | 0 .../themes/_common/less/structure.less | 0 .../themes/_common/less/tools.less | 0 .../themes/daux-blue/config.json | 0 .../themes/daux-blue/css/theme.min.css | 0 .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.svg | 0 .../fonts/glyphicons-halflings-regular.ttf | Bin .../fonts/glyphicons-halflings-regular.woff | Bin .../themes/daux-blue/img/favicon-blue.png | Bin .../themes/daux-blue/less/theme.less | 0 .../themes/daux-green/config.json | 0 .../themes/daux-green/css/theme.min.css | 0 .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.svg | 0 .../fonts/glyphicons-halflings-regular.ttf | Bin .../fonts/glyphicons-halflings-regular.woff | Bin .../themes/daux-green/img/favicon-green.png | Bin .../themes/daux-green/less/theme.less | 0 .../themes/daux-navy/config.json | 0 .../themes/daux-navy/css/theme.min.css | 0 .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.svg | 0 .../fonts/glyphicons-halflings-regular.ttf | Bin .../fonts/glyphicons-halflings-regular.woff | Bin .../themes/daux-navy/img/favicon-navy.png | Bin .../themes/daux-navy/less/theme.less | 0 .../themes/daux-red/config.json | 0 .../themes/daux-red/css/theme.min.css | 0 .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.svg | 0 .../fonts/glyphicons-halflings-regular.ttf | Bin .../fonts/glyphicons-halflings-regular.woff | Bin .../themes/daux-red/img/favicon-red.png | Bin .../themes/daux-red/less/theme.less | 0 templates/content.php | 43 +++ templates/default/default.php | 308 ------------------ templates/default/error.php | 150 --------- templates/error.php | 9 + templates/home.php | 77 +++++ templates/layout/00_layout.php | 56 ++++ templates/layout/05_page.php | 53 +++ templates/partials/google_analytics.php | 9 + templates/partials/piwik_analytics.php | 15 + vendor/composer/autoload_psr4.php | 1 + vendor/composer/installed.json | 54 +++ 134 files changed, 529 insertions(+), 592 deletions(-) create mode 100644 libs/Template.php rename {js => resources/js}/bootstrap.min.js (100%) rename {js => resources/js}/custom.js (100%) rename {js => resources/js}/editor.js (100%) rename {js => resources/js}/highlight.min.js (100%) rename {js => resources/js}/jquery-1.11.0.min.js (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/alerts.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/badges.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/bootstrap.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/breadcrumbs.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/button-groups.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/buttons.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/carousel.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/close.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/code.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/component-animations.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/dropdowns.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/forms.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/glyphicons.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/grid.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/input-groups.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/jumbotron.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/labels.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/list-group.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/media.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/alerts.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/background-variant.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/border-radius.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/buttons.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/center-block.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/clearfix.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/forms.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/gradients.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/grid-framework.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/grid.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/hide-text.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/image.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/labels.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/list-group.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/nav-divider.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/nav-vertical-align.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/opacity.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/pagination.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/panels.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/progress-bar.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/reset-filter.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/resize.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/responsive-visibility.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/size.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/tab-focus.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/table-row.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/text-emphasis.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/text-overflow.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/mixins/vendor-prefixes.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/modals.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/navbar.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/navs.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/normalize.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/pager.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/pagination.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/panels.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/popovers.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/print.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/progress-bars.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/responsive-embed.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/responsive-utilities.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/scaffolding.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/tables.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/theme.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/thumbnails.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/tooltip.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/type.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/utilities.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/variables.less (100%) rename {templates/default => resources}/themes/_common/less/bootstrap/wells.less (100%) rename {templates/default => resources}/themes/_common/less/components.less (100%) rename {templates/default => resources}/themes/_common/less/daux-base.less (100%) rename {templates/default => resources}/themes/_common/less/highlight.less (100%) rename {templates/default => resources}/themes/_common/less/mixins.less (100%) rename {templates/default => resources}/themes/_common/less/structure.less (100%) rename {templates/default => resources}/themes/_common/less/tools.less (100%) rename {templates/default => resources}/themes/daux-blue/config.json (100%) rename {templates/default => resources}/themes/daux-blue/css/theme.min.css (100%) rename {templates/default => resources}/themes/daux-blue/fonts/glyphicons-halflings-regular.eot (100%) rename {templates/default => resources}/themes/daux-blue/fonts/glyphicons-halflings-regular.svg (100%) rename {templates/default => resources}/themes/daux-blue/fonts/glyphicons-halflings-regular.ttf (100%) rename {templates/default => resources}/themes/daux-blue/fonts/glyphicons-halflings-regular.woff (100%) rename {templates/default => resources}/themes/daux-blue/img/favicon-blue.png (100%) rename {templates/default => resources}/themes/daux-blue/less/theme.less (100%) rename {templates/default => resources}/themes/daux-green/config.json (100%) rename {templates/default => resources}/themes/daux-green/css/theme.min.css (100%) rename {templates/default => resources}/themes/daux-green/fonts/glyphicons-halflings-regular.eot (100%) rename {templates/default => resources}/themes/daux-green/fonts/glyphicons-halflings-regular.svg (100%) rename {templates/default => resources}/themes/daux-green/fonts/glyphicons-halflings-regular.ttf (100%) rename {templates/default => resources}/themes/daux-green/fonts/glyphicons-halflings-regular.woff (100%) rename {templates/default => resources}/themes/daux-green/img/favicon-green.png (100%) rename {templates/default => resources}/themes/daux-green/less/theme.less (100%) rename {templates/default => resources}/themes/daux-navy/config.json (100%) rename {templates/default => resources}/themes/daux-navy/css/theme.min.css (100%) rename {templates/default => resources}/themes/daux-navy/fonts/glyphicons-halflings-regular.eot (100%) rename {templates/default => resources}/themes/daux-navy/fonts/glyphicons-halflings-regular.svg (100%) rename {templates/default => resources}/themes/daux-navy/fonts/glyphicons-halflings-regular.ttf (100%) rename {templates/default => resources}/themes/daux-navy/fonts/glyphicons-halflings-regular.woff (100%) rename {templates/default => resources}/themes/daux-navy/img/favicon-navy.png (100%) rename {templates/default => resources}/themes/daux-navy/less/theme.less (100%) rename {templates/default => resources}/themes/daux-red/config.json (100%) rename {templates/default => resources}/themes/daux-red/css/theme.min.css (100%) rename {templates/default => resources}/themes/daux-red/fonts/glyphicons-halflings-regular.eot (100%) rename {templates/default => resources}/themes/daux-red/fonts/glyphicons-halflings-regular.svg (100%) rename {templates/default => resources}/themes/daux-red/fonts/glyphicons-halflings-regular.ttf (100%) rename {templates/default => resources}/themes/daux-red/fonts/glyphicons-halflings-regular.woff (100%) rename {templates/default => resources}/themes/daux-red/img/favicon-red.png (100%) rename {templates/default => resources}/themes/daux-red/less/theme.less (100%) create mode 100644 templates/content.php delete mode 100644 templates/default/default.php delete mode 100644 templates/default/error.php create mode 100644 templates/error.php create mode 100644 templates/home.php create mode 100644 templates/layout/00_layout.php create mode 100644 templates/layout/05_page.php create mode 100644 templates/partials/google_analytics.php create mode 100644 templates/partials/piwik_analytics.php diff --git a/Gruntfile.js b/Gruntfile.js index 3971702..827541d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -22,10 +22,10 @@ module.exports = function (grunt) { report: 'min' }, files: { - "templates/default/themes/daux-blue/css/theme.min.css": "templates/default/themes/daux-blue/less/theme.less", - "templates/default/themes/daux-green/css/theme.min.css": "templates/default/themes/daux-green/less/theme.less", - "templates/default/themes/daux-navy/css/theme.min.css": "templates/default/themes/daux-navy/less/theme.less", - "templates/default/themes/daux-red/css/theme.min.css": "templates/default/themes/daux-red/less/theme.less" + "resources/themes/daux-blue/css/theme.min.css": "resources/themes/daux-blue/less/theme.less", + "resources/themes/daux-green/css/theme.min.css": "resources/themes/daux-green/less/theme.less", + "resources/themes/daux-navy/css/theme.min.css": "resources/themes/daux-navy/less/theme.less", + "resources/themes/daux-red/css/theme.min.css": "resources/themes/daux-red/less/theme.less" } } }, diff --git a/composer.json b/composer.json index e561988..594c8c7 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,8 @@ ], "require": { "php": ">=5.4", - "erusev/parsedown": "~1.0" + "erusev/parsedown": "~1.0", + "league/plates": "~3.1" }, "autoload": { "psr-4": {"Todaymade\\Daux\\": "libs/"} diff --git a/composer.lock b/composer.lock index 3fa81cd..542feec 100644 --- a/composer.lock +++ b/composer.lock @@ -1,9 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" ], - "hash": "21bea6f01fcb0695632cbacb5a3988a1", + "hash": "183de90aad5bcf722f046eb01453cdc0", "packages": [ { "name": "erusev/parsedown", @@ -43,22 +44,68 @@ "parser" ], "time": "2014-05-14 10:14:49" + }, + { + "name": "league/plates", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/plates.git", + "reference": "c39d8fbcbeb07a0948d5e1cf8d78c6e1ef3e81a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/plates/zipball/c39d8fbcbeb07a0948d5e1cf8d78c6e1ef3e81a8", + "reference": "c39d8fbcbeb07a0948d5e1cf8d78c6e1ef3e81a8", + "shasum": "" + }, + "require-dev": { + "mikey179/vfsstream": "~1.4.0", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Plates\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Reinink", + "email": "jonathan@reinink.ca", + "role": "Developer" + } + ], + "description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.", + "homepage": "http://platesphp.com", + "keywords": [ + "league", + "package", + "templates", + "templating", + "views" + ], + "time": "2014-10-21 12:06:12" } ], - "packages-dev": [ - - ], - "aliases": [ - - ], + "packages-dev": [], + "aliases": [], "minimum-stability": "stable", - "stability-flags": [ - - ], + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, "platform": { - "php": ">=5.3" + "php": ">=5.4" }, - "platform-dev": [ - - ] + "platform-dev": [] } diff --git a/default.json b/default.json index ae7c8c8..999a593 100755 --- a/default.json +++ b/default.json @@ -3,25 +3,27 @@ "tagline": "My Stylish Documentation", "author": "I, Me & Myself", "image": "", + "repo": "", + "twitter": [], + "links": { + }, + + "languages": {}, "theme": "daux-blue", + "ignore": { + "files": [], + "folders": [] + }, + "breadcrumbs": false, - "template": "default", "clean_urls": false, "toggle_code": false, "date_modified": false, "float": false, "file_editor": false, - "repo": "", - "twitter": [], - "google_analytics": "", "timezone": "America/Los_Angeles", + + "google_analytics": false, "piwik_analytics": false, - "piwik_analytics_id": "0", - "languages": {}, - "ignore": { - "files": [], - "folders": [] - }, - "links": { - } + "piwik_analytics_id": "0" } diff --git a/libs/Daux.php b/libs/Daux.php index 610c120..a2a58de 100644 --- a/libs/Daux.php +++ b/libs/Daux.php @@ -111,36 +111,15 @@ class Daux public function getParams() { - $params = array( - //Informations - 'tagline' => $this->options['tagline'], - 'title' => $this->options['title'], - 'author' => $this->options['author'], - 'image' => $this->options['image'], - 'repo' => $this->options['repo'], - 'links' => $this->options['links'], - 'twitter' => $this->options['twitter'], - + $params = $this->options += array( //Features - 'google_analytics' => ($g = $this->options['google_analytics']) ? - DauxHelper::googleAnalytics($g, $this->host) : '', - 'piwik_analytics' => ($p = $this->options['piwik_analytics']) ? - DauxHelper::piwikAnalytics($p, $this->options['piwik_analytics_id']) : '', - 'toggle_code' => $this->options['toggle_code'], - 'float' => $this->options['float'], - 'date_modified' => $this->options['date_modified'], - 'file_editor' => false, - 'breadcrumbs' => $this->options['breadcrumbs'], - 'breadcrumb_separator' => $this->options['breadcrumb_separator'], 'multilanguage' => !empty($this->options['languages']), - 'languages' => $this->options['languages'], - //Paths and tree 'mode' => $this->mode, 'local_base' => $this->local_base, 'docs_path' => $this->docs_path, - 'template' => $this->options['template'], + 'templates' => $this->local_base . DS . 'templates', ); if ($this->tree) { @@ -172,10 +151,10 @@ class Daux } $params['theme'] = DauxHelper::getTheme( - $this->local_base . DS . 'templates' . DS . $this->options['template'] . DS . 'themes' . DS . $this->options['theme'], + $this->local_base . DS . 'resources' . DS . 'themes' . DS . $this->options['theme'], $params['base_url'], $this->local_base, - $params['base_url'] . "templates/" . $params['template'] . "/themes/" . $this->options['theme'] . '/' + $params['base_url'] . "resources/themes/" . $this->options['theme'] . '/' ); return $params; diff --git a/libs/DauxHelper.php b/libs/DauxHelper.php index 27432ec..aeedb30 100644 --- a/libs/DauxHelper.php +++ b/libs/DauxHelper.php @@ -47,15 +47,13 @@ class DauxHelper 'require-jquery' => false, 'bootstrap-js' => false, 'favicon' => 'resources/img/favicon.png', - 'template' => $local_base . DS . 'templates' . DS . 'default/default.php', - 'error-template' => $local_base . DS . 'templates' . DS . 'default/error.php', + 'templates' => $theme_folder . DS . 'templates', ]; $substitutions = ['' => $local_base, '' => $base_url, '' => $theme_url]; // Substitute some placeholders - $theme['template'] = strtr($theme['template'], $substitutions); - $theme['error-template'] = strtr($theme['error-template'], $substitutions); + $theme['templates'] = strtr($theme['templates'], $substitutions); $theme['favicon'] = utf8_encode(strtr($theme['favicon'], $substitutions)); foreach ($theme['css'] as $key => $css) { @@ -73,43 +71,6 @@ class DauxHelper return $theme; } - public static function googleAnalytics($analytics, $host) - { - $ga = << - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); -EOT; - $ga .= "ga('create', '" . $analytics . "', '" . $host . "');"; - $ga .= "ga('send', 'pageview');"; - $ga .= ''; - return $ga; - } - - public static function piwikAnalytics($analytics_url, $analytics_id) - { - $pa = << - var _paq = _paq || []; - _paq.push(["trackPageView"]); - _paq.push(["enableLinkTracking"]); - (function() { -EOT; - $pa .= 'var u=(("https:" == document.location.protocol) ? "https" : "http") + "://' . $analytics_url . '/";'; - $pa .= '_paq.push(["setTrackerUrl", u+"piwik.php"]);'; - $pa .= '_paq.push(["setSiteId", ' . $analytics_id . ']);'; - $pa .= << -EOT; - return $pa; - } - public static function pathinfo($path) { preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im', $path, $m); diff --git a/libs/Generator/Helper.php b/libs/Generator/Helper.php index e56b941..8d6ce6a 100644 --- a/libs/Generator/Helper.php +++ b/libs/Generator/Helper.php @@ -10,18 +10,6 @@ class Helper @mkdir($path . DS . 'resources'); static::copyRecursive($local_base . DS . 'resources', $path . DS . 'resources'); - @mkdir($path . DS . 'js'); - static::copyRecursive($local_base . DS . 'js', $path . DS . 'js'); - - //added and changed these in order to fetch the theme files and put them in the right place - @mkdir($path . DS . 'templates'); - @mkdir($path . DS . 'templates' . DS . 'default'); - @mkdir($path . DS . 'templates' . DS . 'default' . DS . 'themes'); - - static::copyRecursive( - $local_base . DS . 'templates' . DS . 'default' . DS . 'themes', - $path . DS . 'templates' . DS . 'default' . DS . 'themes' - ); } private static function rmdir($dir) diff --git a/libs/MarkdownPage.php b/libs/MarkdownPage.php index 45f7c4f..5897d5e 100644 --- a/libs/MarkdownPage.php +++ b/libs/MarkdownPage.php @@ -9,7 +9,6 @@ class MarkdownPage extends SimplePage private $language; private $homepage; private $breadcrumb_trail; - private static $template; public function __construct() { @@ -51,10 +50,6 @@ class MarkdownPage extends SimplePage $language_dir = current($file->getParents()); $this->language = $language_dir->name; } - if (is_null(static::$template)) { - include_once($params['theme']['template']); - static::$template = new Template(); - } } private function buildBreadcrumbTrail($parents, $multilanguage) @@ -89,20 +84,18 @@ class MarkdownPage extends SimplePage if ($params['request'] === $params['index_key']) { if ($params['multilanguage']) { foreach ($params['languages'] as $key => $name) { - $entry_page[utf8_encode($name)] = utf8_encode($params['base_page'] . $params['entry_page'][$key]->getUrl()); + $entry_page[$name] = $params['base_page'] . $params['entry_page'][$key]->getUrl(); } } else { - $entry_page['View Documentation'] = utf8_encode($params['base_page'] . $params['entry_page']->getUri()); + $entry_page['View Documentation'] = $params['base_page'] . $params['entry_page']->getUri(); } } elseif ($params['file_uri'] === 'index') { - $entry_page[utf8_encode($params['entry_page']->title)] = utf8_encode($params['base_page'] . $params['entry_page']->getUrl()); + $entry_page[$params['entry_page']->title] = $params['base_page'] . $params['entry_page']->getUrl(); } $page['entry_page'] = $entry_page; $page['homepage'] = $this->homepage; $page['title'] = $this->file->getTitle(); - $page['tagline'] = $params['tagline']; - $page['author'] = $params['author']; $page['filename'] = $this->file->getName(); if ($page['breadcrumbs'] = $params['breadcrumbs']) { $page['breadcrumb_trail'] = $this->breadcrumb_trail; @@ -110,17 +103,13 @@ class MarkdownPage extends SimplePage } $page['language'] = $this->language; $page['path'] = $this->file->getPath(); - $page['request'] = utf8_encode($params['request']); - $page['theme'] = $params['theme']; $page['modified_time'] = filemtime($this->file->getPath()); $page['markdown'] = $this->content; - $page['file_editor'] = $params['file_editor']; - $page['google_analytics'] = $params['google_analytics']; - $page['piwik_analytics'] = $params['piwik_analytics']; $Parsedown = new \Parsedown(); $page['content'] = $Parsedown->text($this->content); - return static::$template->get_content($page, $params); + $template = new Template($params['templates'], $params['theme']['templates']); + return $template->render($this->homepage? 'home' : 'content', ['page' => $page, 'params' => $params]); } } diff --git a/libs/Server/ErrorPage.php b/libs/Server/ErrorPage.php index 9546b65..7520877 100644 --- a/libs/Server/ErrorPage.php +++ b/libs/Server/ErrorPage.php @@ -10,7 +10,6 @@ class ErrorPage extends SimplePage const FATAL_ERROR_TYPE = 'FATAL_ERROR'; private $params; - private static $template; public function __construct($title, $content, $params) { @@ -26,9 +25,6 @@ class ErrorPage extends SimplePage public function getContent() { - include_once($this->params['theme']['error-template']); - static::$template = new Template(); - if (is_null($this->html)) { $this->html = $this->generatePage(); } @@ -40,11 +36,9 @@ class ErrorPage extends SimplePage { $params = $this->params; $page['title'] = $this->title; - $page['theme'] = $params['theme']; $page['content'] = $this->content; - $page['google_analytics'] = $params['google_analytics']; - $page['piwik_analytics'] = $params['piwik_analytics']; - return static::$template->get_content($page, $params); + $template = new Template($params['templates'], $params['theme']['templates']); + return $template->render('error', ['page' => $page, 'params' => $params]); } } diff --git a/libs/Template.php b/libs/Template.php new file mode 100644 index 0000000..3bb7c59 --- /dev/null +++ b/libs/Template.php @@ -0,0 +1,117 @@ +engine = new Engine($base); + if (!is_dir($theme)) { + $theme = $base; + } + $this->engine->addFolder('theme', $theme, true); + + $this->registerFunctions(); + } + + public function render($name, array $data = array()) + { + + $this->engine->addData([ + 'index' => utf8_encode($data['params']['base_page'] . $data['params']['index']->value), + 'base_url' => $data['params']['base_url'], + 'base_page' => $data['params']['base_page'], + 'page' => $data['page'], + 'params' => $data['params'], + //'homepage' => $data['params']['homepage'], + //'project_title' => utf8_encode($data['params']['title']), + 'tree' => $data['params']['tree'], + //'entry_page' => $data['page']['entry_page'], + ]); + + return $this->engine->render($name, $data); + } + + protected function registerFunctions() + { + $this->engine->registerFunction('get_navigation', function($tree, $path, $current_url, $base_page, $mode) { + $nav = ''; + return $nav; + }); + + $this->engine->registerFunction('get_breadcrumb_title', function($page, $base_page) { + $title = ''; + $breadcrumb_trail = $page['breadcrumb_trail']; + $separator = $this->getSeparator($page['breadcrumb_separator']); + foreach ($breadcrumb_trail as $key => $value) { + $title .= '' . $key . '' . $separator; + } + if ($page['filename'] === 'index' || $page['filename'] === '_index') { + if ($page['title'] != '') { + $title = substr($title, 0, -1 * strlen($separator)); + } + } else { + $title .= '' . $page['title'] . ''; + } + return $title; + }); + } + + private function buildNavigation($tree, $path, $current_url, $base_page, $mode) + { + $nav = ''; + foreach ($tree->value as $node) { + $url = $node->getUri(); + if ($node instanceof \Todaymade\Daux\Tree\Content) { + if ($node->value === 'index') { + continue; + } + $nav .= '' . $node->getTitle() . ''; + } + if ($node instanceof \Todaymade\Daux\Tree\Directory) { + $nav .= 'getIndexPage()) { + $nav .= '' . + $node->getTitle() . ''; + } else { + $nav .= '' . $node->getTitle() . ''; + } + $nav .= ''; + } + } + return $nav; + } + + private function getSeparator($separator) + { + switch ($separator) { + case 'Chevrons': + return ' '; + default: + return $separator; + } + } +} diff --git a/js/bootstrap.min.js b/resources/js/bootstrap.min.js similarity index 100% rename from js/bootstrap.min.js rename to resources/js/bootstrap.min.js diff --git a/js/custom.js b/resources/js/custom.js similarity index 100% rename from js/custom.js rename to resources/js/custom.js diff --git a/js/editor.js b/resources/js/editor.js similarity index 100% rename from js/editor.js rename to resources/js/editor.js diff --git a/js/highlight.min.js b/resources/js/highlight.min.js similarity index 100% rename from js/highlight.min.js rename to resources/js/highlight.min.js diff --git a/js/jquery-1.11.0.min.js b/resources/js/jquery-1.11.0.min.js similarity index 100% rename from js/jquery-1.11.0.min.js rename to resources/js/jquery-1.11.0.min.js diff --git a/templates/default/themes/_common/less/bootstrap/alerts.less b/resources/themes/_common/less/bootstrap/alerts.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/alerts.less rename to resources/themes/_common/less/bootstrap/alerts.less diff --git a/templates/default/themes/_common/less/bootstrap/badges.less b/resources/themes/_common/less/bootstrap/badges.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/badges.less rename to resources/themes/_common/less/bootstrap/badges.less diff --git a/templates/default/themes/_common/less/bootstrap/bootstrap.less b/resources/themes/_common/less/bootstrap/bootstrap.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/bootstrap.less rename to resources/themes/_common/less/bootstrap/bootstrap.less diff --git a/templates/default/themes/_common/less/bootstrap/breadcrumbs.less b/resources/themes/_common/less/bootstrap/breadcrumbs.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/breadcrumbs.less rename to resources/themes/_common/less/bootstrap/breadcrumbs.less diff --git a/templates/default/themes/_common/less/bootstrap/button-groups.less b/resources/themes/_common/less/bootstrap/button-groups.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/button-groups.less rename to resources/themes/_common/less/bootstrap/button-groups.less diff --git a/templates/default/themes/_common/less/bootstrap/buttons.less b/resources/themes/_common/less/bootstrap/buttons.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/buttons.less rename to resources/themes/_common/less/bootstrap/buttons.less diff --git a/templates/default/themes/_common/less/bootstrap/carousel.less b/resources/themes/_common/less/bootstrap/carousel.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/carousel.less rename to resources/themes/_common/less/bootstrap/carousel.less diff --git a/templates/default/themes/_common/less/bootstrap/close.less b/resources/themes/_common/less/bootstrap/close.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/close.less rename to resources/themes/_common/less/bootstrap/close.less diff --git a/templates/default/themes/_common/less/bootstrap/code.less b/resources/themes/_common/less/bootstrap/code.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/code.less rename to resources/themes/_common/less/bootstrap/code.less diff --git a/templates/default/themes/_common/less/bootstrap/component-animations.less b/resources/themes/_common/less/bootstrap/component-animations.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/component-animations.less rename to resources/themes/_common/less/bootstrap/component-animations.less diff --git a/templates/default/themes/_common/less/bootstrap/dropdowns.less b/resources/themes/_common/less/bootstrap/dropdowns.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/dropdowns.less rename to resources/themes/_common/less/bootstrap/dropdowns.less diff --git a/templates/default/themes/_common/less/bootstrap/forms.less b/resources/themes/_common/less/bootstrap/forms.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/forms.less rename to resources/themes/_common/less/bootstrap/forms.less diff --git a/templates/default/themes/_common/less/bootstrap/glyphicons.less b/resources/themes/_common/less/bootstrap/glyphicons.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/glyphicons.less rename to resources/themes/_common/less/bootstrap/glyphicons.less diff --git a/templates/default/themes/_common/less/bootstrap/grid.less b/resources/themes/_common/less/bootstrap/grid.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/grid.less rename to resources/themes/_common/less/bootstrap/grid.less diff --git a/templates/default/themes/_common/less/bootstrap/input-groups.less b/resources/themes/_common/less/bootstrap/input-groups.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/input-groups.less rename to resources/themes/_common/less/bootstrap/input-groups.less diff --git a/templates/default/themes/_common/less/bootstrap/jumbotron.less b/resources/themes/_common/less/bootstrap/jumbotron.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/jumbotron.less rename to resources/themes/_common/less/bootstrap/jumbotron.less diff --git a/templates/default/themes/_common/less/bootstrap/labels.less b/resources/themes/_common/less/bootstrap/labels.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/labels.less rename to resources/themes/_common/less/bootstrap/labels.less diff --git a/templates/default/themes/_common/less/bootstrap/list-group.less b/resources/themes/_common/less/bootstrap/list-group.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/list-group.less rename to resources/themes/_common/less/bootstrap/list-group.less diff --git a/templates/default/themes/_common/less/bootstrap/media.less b/resources/themes/_common/less/bootstrap/media.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/media.less rename to resources/themes/_common/less/bootstrap/media.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins.less b/resources/themes/_common/less/bootstrap/mixins.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins.less rename to resources/themes/_common/less/bootstrap/mixins.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/alerts.less b/resources/themes/_common/less/bootstrap/mixins/alerts.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/alerts.less rename to resources/themes/_common/less/bootstrap/mixins/alerts.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/background-variant.less b/resources/themes/_common/less/bootstrap/mixins/background-variant.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/background-variant.less rename to resources/themes/_common/less/bootstrap/mixins/background-variant.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/border-radius.less b/resources/themes/_common/less/bootstrap/mixins/border-radius.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/border-radius.less rename to resources/themes/_common/less/bootstrap/mixins/border-radius.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/buttons.less b/resources/themes/_common/less/bootstrap/mixins/buttons.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/buttons.less rename to resources/themes/_common/less/bootstrap/mixins/buttons.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/center-block.less b/resources/themes/_common/less/bootstrap/mixins/center-block.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/center-block.less rename to resources/themes/_common/less/bootstrap/mixins/center-block.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/clearfix.less b/resources/themes/_common/less/bootstrap/mixins/clearfix.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/clearfix.less rename to resources/themes/_common/less/bootstrap/mixins/clearfix.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/forms.less b/resources/themes/_common/less/bootstrap/mixins/forms.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/forms.less rename to resources/themes/_common/less/bootstrap/mixins/forms.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/gradients.less b/resources/themes/_common/less/bootstrap/mixins/gradients.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/gradients.less rename to resources/themes/_common/less/bootstrap/mixins/gradients.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/grid-framework.less b/resources/themes/_common/less/bootstrap/mixins/grid-framework.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/grid-framework.less rename to resources/themes/_common/less/bootstrap/mixins/grid-framework.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/grid.less b/resources/themes/_common/less/bootstrap/mixins/grid.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/grid.less rename to resources/themes/_common/less/bootstrap/mixins/grid.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/hide-text.less b/resources/themes/_common/less/bootstrap/mixins/hide-text.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/hide-text.less rename to resources/themes/_common/less/bootstrap/mixins/hide-text.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/image.less b/resources/themes/_common/less/bootstrap/mixins/image.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/image.less rename to resources/themes/_common/less/bootstrap/mixins/image.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/labels.less b/resources/themes/_common/less/bootstrap/mixins/labels.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/labels.less rename to resources/themes/_common/less/bootstrap/mixins/labels.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/list-group.less b/resources/themes/_common/less/bootstrap/mixins/list-group.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/list-group.less rename to resources/themes/_common/less/bootstrap/mixins/list-group.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/nav-divider.less b/resources/themes/_common/less/bootstrap/mixins/nav-divider.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/nav-divider.less rename to resources/themes/_common/less/bootstrap/mixins/nav-divider.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/nav-vertical-align.less b/resources/themes/_common/less/bootstrap/mixins/nav-vertical-align.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/nav-vertical-align.less rename to resources/themes/_common/less/bootstrap/mixins/nav-vertical-align.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/opacity.less b/resources/themes/_common/less/bootstrap/mixins/opacity.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/opacity.less rename to resources/themes/_common/less/bootstrap/mixins/opacity.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/pagination.less b/resources/themes/_common/less/bootstrap/mixins/pagination.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/pagination.less rename to resources/themes/_common/less/bootstrap/mixins/pagination.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/panels.less b/resources/themes/_common/less/bootstrap/mixins/panels.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/panels.less rename to resources/themes/_common/less/bootstrap/mixins/panels.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/progress-bar.less b/resources/themes/_common/less/bootstrap/mixins/progress-bar.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/progress-bar.less rename to resources/themes/_common/less/bootstrap/mixins/progress-bar.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/reset-filter.less b/resources/themes/_common/less/bootstrap/mixins/reset-filter.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/reset-filter.less rename to resources/themes/_common/less/bootstrap/mixins/reset-filter.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/resize.less b/resources/themes/_common/less/bootstrap/mixins/resize.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/resize.less rename to resources/themes/_common/less/bootstrap/mixins/resize.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/responsive-visibility.less b/resources/themes/_common/less/bootstrap/mixins/responsive-visibility.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/responsive-visibility.less rename to resources/themes/_common/less/bootstrap/mixins/responsive-visibility.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/size.less b/resources/themes/_common/less/bootstrap/mixins/size.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/size.less rename to resources/themes/_common/less/bootstrap/mixins/size.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/tab-focus.less b/resources/themes/_common/less/bootstrap/mixins/tab-focus.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/tab-focus.less rename to resources/themes/_common/less/bootstrap/mixins/tab-focus.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/table-row.less b/resources/themes/_common/less/bootstrap/mixins/table-row.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/table-row.less rename to resources/themes/_common/less/bootstrap/mixins/table-row.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/text-emphasis.less b/resources/themes/_common/less/bootstrap/mixins/text-emphasis.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/text-emphasis.less rename to resources/themes/_common/less/bootstrap/mixins/text-emphasis.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/text-overflow.less b/resources/themes/_common/less/bootstrap/mixins/text-overflow.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/text-overflow.less rename to resources/themes/_common/less/bootstrap/mixins/text-overflow.less diff --git a/templates/default/themes/_common/less/bootstrap/mixins/vendor-prefixes.less b/resources/themes/_common/less/bootstrap/mixins/vendor-prefixes.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/mixins/vendor-prefixes.less rename to resources/themes/_common/less/bootstrap/mixins/vendor-prefixes.less diff --git a/templates/default/themes/_common/less/bootstrap/modals.less b/resources/themes/_common/less/bootstrap/modals.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/modals.less rename to resources/themes/_common/less/bootstrap/modals.less diff --git a/templates/default/themes/_common/less/bootstrap/navbar.less b/resources/themes/_common/less/bootstrap/navbar.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/navbar.less rename to resources/themes/_common/less/bootstrap/navbar.less diff --git a/templates/default/themes/_common/less/bootstrap/navs.less b/resources/themes/_common/less/bootstrap/navs.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/navs.less rename to resources/themes/_common/less/bootstrap/navs.less diff --git a/templates/default/themes/_common/less/bootstrap/normalize.less b/resources/themes/_common/less/bootstrap/normalize.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/normalize.less rename to resources/themes/_common/less/bootstrap/normalize.less diff --git a/templates/default/themes/_common/less/bootstrap/pager.less b/resources/themes/_common/less/bootstrap/pager.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/pager.less rename to resources/themes/_common/less/bootstrap/pager.less diff --git a/templates/default/themes/_common/less/bootstrap/pagination.less b/resources/themes/_common/less/bootstrap/pagination.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/pagination.less rename to resources/themes/_common/less/bootstrap/pagination.less diff --git a/templates/default/themes/_common/less/bootstrap/panels.less b/resources/themes/_common/less/bootstrap/panels.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/panels.less rename to resources/themes/_common/less/bootstrap/panels.less diff --git a/templates/default/themes/_common/less/bootstrap/popovers.less b/resources/themes/_common/less/bootstrap/popovers.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/popovers.less rename to resources/themes/_common/less/bootstrap/popovers.less diff --git a/templates/default/themes/_common/less/bootstrap/print.less b/resources/themes/_common/less/bootstrap/print.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/print.less rename to resources/themes/_common/less/bootstrap/print.less diff --git a/templates/default/themes/_common/less/bootstrap/progress-bars.less b/resources/themes/_common/less/bootstrap/progress-bars.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/progress-bars.less rename to resources/themes/_common/less/bootstrap/progress-bars.less diff --git a/templates/default/themes/_common/less/bootstrap/responsive-embed.less b/resources/themes/_common/less/bootstrap/responsive-embed.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/responsive-embed.less rename to resources/themes/_common/less/bootstrap/responsive-embed.less diff --git a/templates/default/themes/_common/less/bootstrap/responsive-utilities.less b/resources/themes/_common/less/bootstrap/responsive-utilities.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/responsive-utilities.less rename to resources/themes/_common/less/bootstrap/responsive-utilities.less diff --git a/templates/default/themes/_common/less/bootstrap/scaffolding.less b/resources/themes/_common/less/bootstrap/scaffolding.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/scaffolding.less rename to resources/themes/_common/less/bootstrap/scaffolding.less diff --git a/templates/default/themes/_common/less/bootstrap/tables.less b/resources/themes/_common/less/bootstrap/tables.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/tables.less rename to resources/themes/_common/less/bootstrap/tables.less diff --git a/templates/default/themes/_common/less/bootstrap/theme.less b/resources/themes/_common/less/bootstrap/theme.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/theme.less rename to resources/themes/_common/less/bootstrap/theme.less diff --git a/templates/default/themes/_common/less/bootstrap/thumbnails.less b/resources/themes/_common/less/bootstrap/thumbnails.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/thumbnails.less rename to resources/themes/_common/less/bootstrap/thumbnails.less diff --git a/templates/default/themes/_common/less/bootstrap/tooltip.less b/resources/themes/_common/less/bootstrap/tooltip.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/tooltip.less rename to resources/themes/_common/less/bootstrap/tooltip.less diff --git a/templates/default/themes/_common/less/bootstrap/type.less b/resources/themes/_common/less/bootstrap/type.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/type.less rename to resources/themes/_common/less/bootstrap/type.less diff --git a/templates/default/themes/_common/less/bootstrap/utilities.less b/resources/themes/_common/less/bootstrap/utilities.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/utilities.less rename to resources/themes/_common/less/bootstrap/utilities.less diff --git a/templates/default/themes/_common/less/bootstrap/variables.less b/resources/themes/_common/less/bootstrap/variables.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/variables.less rename to resources/themes/_common/less/bootstrap/variables.less diff --git a/templates/default/themes/_common/less/bootstrap/wells.less b/resources/themes/_common/less/bootstrap/wells.less similarity index 100% rename from templates/default/themes/_common/less/bootstrap/wells.less rename to resources/themes/_common/less/bootstrap/wells.less diff --git a/templates/default/themes/_common/less/components.less b/resources/themes/_common/less/components.less similarity index 100% rename from templates/default/themes/_common/less/components.less rename to resources/themes/_common/less/components.less diff --git a/templates/default/themes/_common/less/daux-base.less b/resources/themes/_common/less/daux-base.less similarity index 100% rename from templates/default/themes/_common/less/daux-base.less rename to resources/themes/_common/less/daux-base.less diff --git a/templates/default/themes/_common/less/highlight.less b/resources/themes/_common/less/highlight.less similarity index 100% rename from templates/default/themes/_common/less/highlight.less rename to resources/themes/_common/less/highlight.less diff --git a/templates/default/themes/_common/less/mixins.less b/resources/themes/_common/less/mixins.less similarity index 100% rename from templates/default/themes/_common/less/mixins.less rename to resources/themes/_common/less/mixins.less diff --git a/templates/default/themes/_common/less/structure.less b/resources/themes/_common/less/structure.less similarity index 100% rename from templates/default/themes/_common/less/structure.less rename to resources/themes/_common/less/structure.less diff --git a/templates/default/themes/_common/less/tools.less b/resources/themes/_common/less/tools.less similarity index 100% rename from templates/default/themes/_common/less/tools.less rename to resources/themes/_common/less/tools.less diff --git a/templates/default/themes/daux-blue/config.json b/resources/themes/daux-blue/config.json similarity index 100% rename from templates/default/themes/daux-blue/config.json rename to resources/themes/daux-blue/config.json diff --git a/templates/default/themes/daux-blue/css/theme.min.css b/resources/themes/daux-blue/css/theme.min.css similarity index 100% rename from templates/default/themes/daux-blue/css/theme.min.css rename to resources/themes/daux-blue/css/theme.min.css diff --git a/templates/default/themes/daux-blue/fonts/glyphicons-halflings-regular.eot b/resources/themes/daux-blue/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from templates/default/themes/daux-blue/fonts/glyphicons-halflings-regular.eot rename to resources/themes/daux-blue/fonts/glyphicons-halflings-regular.eot diff --git a/templates/default/themes/daux-blue/fonts/glyphicons-halflings-regular.svg b/resources/themes/daux-blue/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from templates/default/themes/daux-blue/fonts/glyphicons-halflings-regular.svg rename to resources/themes/daux-blue/fonts/glyphicons-halflings-regular.svg diff --git a/templates/default/themes/daux-blue/fonts/glyphicons-halflings-regular.ttf b/resources/themes/daux-blue/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from templates/default/themes/daux-blue/fonts/glyphicons-halflings-regular.ttf rename to resources/themes/daux-blue/fonts/glyphicons-halflings-regular.ttf diff --git a/templates/default/themes/daux-blue/fonts/glyphicons-halflings-regular.woff b/resources/themes/daux-blue/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from templates/default/themes/daux-blue/fonts/glyphicons-halflings-regular.woff rename to resources/themes/daux-blue/fonts/glyphicons-halflings-regular.woff diff --git a/templates/default/themes/daux-blue/img/favicon-blue.png b/resources/themes/daux-blue/img/favicon-blue.png similarity index 100% rename from templates/default/themes/daux-blue/img/favicon-blue.png rename to resources/themes/daux-blue/img/favicon-blue.png diff --git a/templates/default/themes/daux-blue/less/theme.less b/resources/themes/daux-blue/less/theme.less similarity index 100% rename from templates/default/themes/daux-blue/less/theme.less rename to resources/themes/daux-blue/less/theme.less diff --git a/templates/default/themes/daux-green/config.json b/resources/themes/daux-green/config.json similarity index 100% rename from templates/default/themes/daux-green/config.json rename to resources/themes/daux-green/config.json diff --git a/templates/default/themes/daux-green/css/theme.min.css b/resources/themes/daux-green/css/theme.min.css similarity index 100% rename from templates/default/themes/daux-green/css/theme.min.css rename to resources/themes/daux-green/css/theme.min.css diff --git a/templates/default/themes/daux-green/fonts/glyphicons-halflings-regular.eot b/resources/themes/daux-green/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from templates/default/themes/daux-green/fonts/glyphicons-halflings-regular.eot rename to resources/themes/daux-green/fonts/glyphicons-halflings-regular.eot diff --git a/templates/default/themes/daux-green/fonts/glyphicons-halflings-regular.svg b/resources/themes/daux-green/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from templates/default/themes/daux-green/fonts/glyphicons-halflings-regular.svg rename to resources/themes/daux-green/fonts/glyphicons-halflings-regular.svg diff --git a/templates/default/themes/daux-green/fonts/glyphicons-halflings-regular.ttf b/resources/themes/daux-green/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from templates/default/themes/daux-green/fonts/glyphicons-halflings-regular.ttf rename to resources/themes/daux-green/fonts/glyphicons-halflings-regular.ttf diff --git a/templates/default/themes/daux-green/fonts/glyphicons-halflings-regular.woff b/resources/themes/daux-green/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from templates/default/themes/daux-green/fonts/glyphicons-halflings-regular.woff rename to resources/themes/daux-green/fonts/glyphicons-halflings-regular.woff diff --git a/templates/default/themes/daux-green/img/favicon-green.png b/resources/themes/daux-green/img/favicon-green.png similarity index 100% rename from templates/default/themes/daux-green/img/favicon-green.png rename to resources/themes/daux-green/img/favicon-green.png diff --git a/templates/default/themes/daux-green/less/theme.less b/resources/themes/daux-green/less/theme.less similarity index 100% rename from templates/default/themes/daux-green/less/theme.less rename to resources/themes/daux-green/less/theme.less diff --git a/templates/default/themes/daux-navy/config.json b/resources/themes/daux-navy/config.json similarity index 100% rename from templates/default/themes/daux-navy/config.json rename to resources/themes/daux-navy/config.json diff --git a/templates/default/themes/daux-navy/css/theme.min.css b/resources/themes/daux-navy/css/theme.min.css similarity index 100% rename from templates/default/themes/daux-navy/css/theme.min.css rename to resources/themes/daux-navy/css/theme.min.css diff --git a/templates/default/themes/daux-navy/fonts/glyphicons-halflings-regular.eot b/resources/themes/daux-navy/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from templates/default/themes/daux-navy/fonts/glyphicons-halflings-regular.eot rename to resources/themes/daux-navy/fonts/glyphicons-halflings-regular.eot diff --git a/templates/default/themes/daux-navy/fonts/glyphicons-halflings-regular.svg b/resources/themes/daux-navy/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from templates/default/themes/daux-navy/fonts/glyphicons-halflings-regular.svg rename to resources/themes/daux-navy/fonts/glyphicons-halflings-regular.svg diff --git a/templates/default/themes/daux-navy/fonts/glyphicons-halflings-regular.ttf b/resources/themes/daux-navy/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from templates/default/themes/daux-navy/fonts/glyphicons-halflings-regular.ttf rename to resources/themes/daux-navy/fonts/glyphicons-halflings-regular.ttf diff --git a/templates/default/themes/daux-navy/fonts/glyphicons-halflings-regular.woff b/resources/themes/daux-navy/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from templates/default/themes/daux-navy/fonts/glyphicons-halflings-regular.woff rename to resources/themes/daux-navy/fonts/glyphicons-halflings-regular.woff diff --git a/templates/default/themes/daux-navy/img/favicon-navy.png b/resources/themes/daux-navy/img/favicon-navy.png similarity index 100% rename from templates/default/themes/daux-navy/img/favicon-navy.png rename to resources/themes/daux-navy/img/favicon-navy.png diff --git a/templates/default/themes/daux-navy/less/theme.less b/resources/themes/daux-navy/less/theme.less similarity index 100% rename from templates/default/themes/daux-navy/less/theme.less rename to resources/themes/daux-navy/less/theme.less diff --git a/templates/default/themes/daux-red/config.json b/resources/themes/daux-red/config.json similarity index 100% rename from templates/default/themes/daux-red/config.json rename to resources/themes/daux-red/config.json diff --git a/templates/default/themes/daux-red/css/theme.min.css b/resources/themes/daux-red/css/theme.min.css similarity index 100% rename from templates/default/themes/daux-red/css/theme.min.css rename to resources/themes/daux-red/css/theme.min.css diff --git a/templates/default/themes/daux-red/fonts/glyphicons-halflings-regular.eot b/resources/themes/daux-red/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from templates/default/themes/daux-red/fonts/glyphicons-halflings-regular.eot rename to resources/themes/daux-red/fonts/glyphicons-halflings-regular.eot diff --git a/templates/default/themes/daux-red/fonts/glyphicons-halflings-regular.svg b/resources/themes/daux-red/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from templates/default/themes/daux-red/fonts/glyphicons-halflings-regular.svg rename to resources/themes/daux-red/fonts/glyphicons-halflings-regular.svg diff --git a/templates/default/themes/daux-red/fonts/glyphicons-halflings-regular.ttf b/resources/themes/daux-red/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from templates/default/themes/daux-red/fonts/glyphicons-halflings-regular.ttf rename to resources/themes/daux-red/fonts/glyphicons-halflings-regular.ttf diff --git a/templates/default/themes/daux-red/fonts/glyphicons-halflings-regular.woff b/resources/themes/daux-red/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from templates/default/themes/daux-red/fonts/glyphicons-halflings-regular.woff rename to resources/themes/daux-red/fonts/glyphicons-halflings-regular.woff diff --git a/templates/default/themes/daux-red/img/favicon-red.png b/resources/themes/daux-red/img/favicon-red.png similarity index 100% rename from templates/default/themes/daux-red/img/favicon-red.png rename to resources/themes/daux-red/img/favicon-red.png diff --git a/templates/default/themes/daux-red/less/theme.less b/resources/themes/daux-red/less/theme.less similarity index 100% rename from templates/default/themes/daux-red/less/theme.less rename to resources/themes/daux-red/less/theme.less diff --git a/templates/content.php b/templates/content.php new file mode 100644 index 0000000..6bbcf62 --- /dev/null +++ b/templates/content.php @@ -0,0 +1,43 @@ +layout('theme::layout/05_page') ?> +
+ + + + + + + + +
+

You are editing  Close

+ + +
+
+ +
+ diff --git a/templates/default/default.php b/templates/default/default.php deleted file mode 100644 index b78cc38..0000000 --- a/templates/default/default.php +++ /dev/null @@ -1,308 +0,0 @@ -'; - $nav .= $this->build_navigation($tree, $path, $current_url, $base_page, $mode); - $nav .= ''; - return $nav; - } - - private function build_navigation($tree, $path, $current_url, $base_page, $mode) { - $nav = ''; - foreach ($tree->value as $node) { - $url = $node->getUri(); - if ($node instanceof \Todaymade\Daux\Tree\Content) { - - if ($node->value === 'index') continue; - $nav .= '' . $node->getTitle() . ''; - } - if ($node instanceof \Todaymade\Daux\Tree\Directory) { - $nav .= 'getIndexPage()) $nav .= '' . - $node->getTitle() . ''; - else $nav .= '' . $node->getTitle() . ''; - $nav .= ''; - } - } - return $nav; - } - - private function get_breadcrumb_title($page, $base_page) { - $title = ''; - $breadcrumb_trail = $page['breadcrumb_trail']; - $separator = $this->get_separator($page['breadcrumb_separator']); - foreach ($breadcrumb_trail as $key => $value) { - $title .= '' . $key . '' . $separator; - } - if ($page['filename'] === 'index' || $page['filename'] === '_index') { - if ($page['title'] != '') $title = substr($title, 0, -1 * strlen($separator)); - } else $title .= '' . $page['title'] . ''; - return $title; - } - - private function get_separator($separator) { - switch ($separator) { - case 'Chevrons': - return ' '; - default: - return $separator; - } - } - - public function get_content($page, $params) { - $base_url = $params['base_url']; - $base_page = $params['base_page']; - $homepage = $page['homepage']; - $project_title = utf8_encode($params['title']); - $index = utf8_encode($base_page . $params['index']->value); - $tree = $params['tree']; - $entry_page = $page['entry_page']; - ob_start(); -?> - - - - - - - <?php echo $page['title']; ?> - - - - - - - - - - "; ?> - - - "; ?> - - - - - - - - Fork me on GitHub - - -
-
-
-
- ' . $page['tagline'] . ''; ?> -
-
-
-
- '; ?> -
-
-
-
- -
-
-
-
- View On GitHub'; - foreach ($entry_page as $key => $node) echo '' . $key . ''; - ?> -
-
-
-
- -
-
-
-
- -
-
-
-
- - - - - - Fork me on GitHub - -
- -
-
- -
- -
- -
-
-
-
- - - - - - - - -
-

You are editing  Close

- - -
-
- -
-
-
-
-
- - - - - - - - - - - '; - ?> - - - - - - - '; ?> - - - '; ?> - - - - - - - diff --git a/templates/default/error.php b/templates/default/error.php deleted file mode 100644 index 1cbd59b..0000000 --- a/templates/default/error.php +++ /dev/null @@ -1,150 +0,0 @@ -'; - $nav .= $this->build_navigation($tree, $path, $base_page); - $nav .= ''; - return $nav; - } - - private function build_navigation($tree, $path, $base_page) { - $nav = ''; - foreach ($tree->value as $url => $node) { - if ($node instanceof \Todaymade\Daux\Tree\Content) { - if ($node->value === 'index') continue; - $link = ($path === '') ? $url : $path . '/' . $url; - $nav .= '
  • ' . $node->title . '
  • '; - } - if ($node instanceof \Todaymade\Daux\Tree\Directory) { - $nav .= '
  • '; - $link = ($path === '') ? $url : $path . '/' . $url; - if ($node->index_page) $nav .= '' . $node->title . ''; - else $nav .= '' . $node->title . ''; - $nav .= '
  • '; - } - } - return $nav; - } - - public function get_content($page, $params) { - $base_url = $params['base_url']; - $base_page = $params['base_page']; - $project_title = utf8_encode($params['title']); - $index = utf8_encode($base_page . $params['index']->value); - $tree = $params['tree']; - ob_start(); -?> - - - - - - - <?php echo $page['title']; ?> - - - - - - - - "; ?> - - - "; ?> - - - - - Fork me on GitHub - -
    - -
    -
    - -
    - -
    - -
    -
    -
    -
    - - - -
    -
    -
    -
    -
    - - - - - - - - - - '; - ?> - - - '; ?> - - - - - - - - diff --git a/templates/error.php b/templates/error.php new file mode 100644 index 0000000..67d16a4 --- /dev/null +++ b/templates/error.php @@ -0,0 +1,9 @@ +layout('theme::layout/05_page') ?> + +
    + + + +
    diff --git a/templates/home.php b/templates/home.php new file mode 100644 index 0000000..0d2b5aa --- /dev/null +++ b/templates/home.php @@ -0,0 +1,77 @@ +layout('theme::layout/00_layout') ?> + + + Fork me on GitHub + + +
    +
    +
    +
    + ' . $params['tagline'] . ''; ?> +
    +
    +
    +
    + '; ?> +
    +
    +
    +
    + +
    +
    +
    +
    + View On GitHub'; + foreach ($page['entry_page'] as $key => $node) echo '' . $key . ''; + ?> +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + + diff --git a/templates/layout/00_layout.php b/templates/layout/00_layout.php new file mode 100644 index 0000000..f0eea18 --- /dev/null +++ b/templates/layout/00_layout.php @@ -0,0 +1,56 @@ + + + + + + + <?php echo $page['title']; ?> + + + + + + + + + + "; ?> + + + "; ?> + + + + + + + section('content'); ?> + + insert('partials/google_analytics', ['analytics' => $params['google_analytics'], 'host' => array_key_exists('host', $params)? $params['host'] : '']); + } ?> + insert('partials/piwik_analytics', ['url' => $params['piwik_analytics'], 'id' => $params['piwik_analytics_id']]); + } ?> + + + + '; + if ($params['theme']['bootstrap-js']) echo ''; + ?> + + + + + + + '; ?> + + + '; ?> + + + diff --git a/templates/layout/05_page.php b/templates/layout/05_page.php new file mode 100644 index 0000000..d5244bc --- /dev/null +++ b/templates/layout/05_page.php @@ -0,0 +1,53 @@ +layout('theme::layout/00_layout') ?> + + + Fork me on GitHub + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + section('content'); ?> +
    +
    +
    +
    diff --git a/templates/partials/google_analytics.php b/templates/partials/google_analytics.php new file mode 100644 index 0000000..2f6328b --- /dev/null +++ b/templates/partials/google_analytics.php @@ -0,0 +1,9 @@ + diff --git a/templates/partials/piwik_analytics.php b/templates/partials/piwik_analytics.php new file mode 100644 index 0000000..32ddcac --- /dev/null +++ b/templates/partials/piwik_analytics.php @@ -0,0 +1,15 @@ + + diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 0b3843c..27c0cb8 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -7,4 +7,5 @@ $baseDir = dirname($vendorDir); return array( 'Todaymade\\Daux\\' => array($baseDir . '/libs'), + 'League\\Plates\\' => array($vendorDir . '/league/plates/src'), ); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 6a4b553..038a10c 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -39,5 +39,59 @@ "markdown", "parser" ] + }, + { + "name": "league/plates", + "version": "3.1.0", + "version_normalized": "3.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/plates.git", + "reference": "c39d8fbcbeb07a0948d5e1cf8d78c6e1ef3e81a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/plates/zipball/c39d8fbcbeb07a0948d5e1cf8d78c6e1ef3e81a8", + "reference": "c39d8fbcbeb07a0948d5e1cf8d78c6e1ef3e81a8", + "shasum": "" + }, + "require-dev": { + "mikey179/vfsstream": "~1.4.0", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "time": "2014-10-21 12:06:12", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "League\\Plates\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Reinink", + "email": "jonathan@reinink.ca", + "role": "Developer" + } + ], + "description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.", + "homepage": "http://platesphp.com", + "keywords": [ + "league", + "package", + "templates", + "templating", + "views" + ] } ]