Permalink
Browse files

update to new version

  • Loading branch information...
1 parent 511721e commit fcdedfed3f71b04fd5620407a0e378bcf8528696 @Vrtak-CZ Vrtak-CZ committed Jan 18, 2012
Showing with 2,526 additions and 3,238 deletions.
  1. +11 −7 README.txt
  2. +28 −32 app/bootstrap.php
  3. +0 −26 app/config.neon
  4. +8 −0 app/config/config.neon
  5. +10 −0 app/config/local.neon
  6. +1 −5 app/presenters/BasePresenter.php
  7. +38 −19 app/templates/@layout.latte
  8. +27 −112 app/templates/Homepage/default.latte
  9. +26 −0 app/templates/maintenance.phtml
  10. +3 −0 libs/DoctrineExtensions/.gitignore
  11. +1 −0 libs/DoctrineExtensions/README.txt
  12. +546 −0 www/adminer/adminer.css
  13. +1,501 −0 www/adminer/index.php
  14. BIN www/css/images/ui-bg_flat_0_aaaaaa_40x100.png
  15. BIN www/css/images/ui-bg_flat_75_ffffff_40x100.png
  16. BIN www/css/images/ui-bg_glass_55_fbf9ee_1x400.png
  17. BIN www/css/images/ui-bg_glass_65_ffffff_1x400.png
  18. BIN www/css/images/ui-bg_glass_75_dadada_1x400.png
  19. BIN www/css/images/ui-bg_glass_75_e6e6e6_1x400.png
  20. BIN www/css/images/ui-bg_glass_95_fef1ec_1x400.png
  21. BIN www/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  22. BIN www/css/images/ui-icons_222222_256x240.png
  23. BIN www/css/images/ui-icons_2e83ff_256x240.png
  24. BIN www/css/images/ui-icons_454545_256x240.png
  25. BIN www/css/images/ui-icons_888888_256x240.png
  26. BIN www/css/images/ui-icons_cd0a0a_256x240.png
  27. +0 −584 www/css/jquery-ui-1.8.13.custom.css
  28. +0 −32 www/css/screen.css
  29. +285 −0 www/css/style.css
  30. +20 −0 www/humans.txt
  31. +8 −16 www/index.php
  32. +0 −8 www/js/head.min.js
  33. +0 −18 www/js/jquery-1.6.1.min.js
  34. +4 −0 www/js/jquery-1.7.1.min.js
  35. +0 −784 www/js/jquery-ui-1.8.13.custom.min.js
  36. +0 −985 www/js/jquery-ui-timepicker-addon.js
  37. +4 −0 www/js/modernizr-2.5.3.min.js
  38. +0 −38 www/js/nella.js
  39. +0 −262 www/js/nellaMfu.js
  40. +0 −309 www/js/netteForms.js
  41. +5 −1 www/robots.txt
View
@@ -1,21 +1,25 @@
-Welcome to Nella Framework
-==========================
+Nella Framework's Sandbox
+=========================
Nella Framework is a powerful Nette Framework overlay for creating web applications and services in PHP 5.3. Nella Framework is designed with simplicity, speed and flexibility in mind. It allows developers to easy built better websites.
-Nella Framework focuses on security and performance and is definitely one of the safest and fastest PHP frameworks. Nella Framework support the latest technologies and approaches like AJAX, HTML5, SEO, DRY, KISS, MVC, etc.
+Nella Framework focuses on security and performance and is definitely one of the safest and fastest PHP frameworks. Nella Framework support the latest technologies and approaches like AJAX, HTML5, SEO, DRY, KISS, MVC, etc.
Requirements
------------
-Nella Framework prequires PHP 5.3.0 or later. Please run Nette Framework "Requirements Checker" to obtain more detailed information.
+Nella Framework requires PHP 5.3.2 with PDO.
+
+- Nette Framework 2.0.x
+- Doctrine ORM 2.2.x
+- Symfony Console 2.0.x
Installation
------------
-After downloading the latest distribution package from http://nellacms.com/download, extract it to a directory accessible by web server. The installation is done!
+After downloading the latest distribution package from http://nellafw.org/download, extract it to a directory accessible by web server. The installation is done!
The source tree includes the following directories:
@@ -30,5 +34,5 @@ The source tree includes the following directories:
-----
-homepage: http://nellacms.com
-repository: http://github.com/nella/nella
+Nella Framework: homepage http://nellafw.org and repository http://github.com/nella/framework
+Sandbox, pre-packaged and configured project: http://github.com/nella/framework-sandbox
View
@@ -1,45 +1,41 @@
<?php
+
/**
- * This file is part of the Nella Framework.
- *
- * Copyright (c) 2006, 2011 Patrik Votoček (http://patrik.votocek.cz)
- *
- * This source file is subject to the GNU Lesser General Public License. For more information please see http://nella-project.org
+ * My Application bootstrap file.
*/
+use Nette\Application\Routers\Route;
-use Nette\Diagnostics\Debugger,
- Nette\Application\Routers\Route;
+// Load Nette Framework
+require LIBS_DIR . '/Nette/loader.php';
+// Load Nella Framework
+require LIBS_DIR . '/Nella/loader.php';
-require_once $params['libsDir'] . "/Nella/loader.php";
-// Setup debugger
-Debugger::$logDirectory = $params['rootDir'] . '/log';
-Debugger::enable();
+// Configure application
+$configurator = new Nella\Config\Configurator;
-// Load configurations
-$configurator = new Nella\Configurator($params);
-$context = $configurator->loadConfig();
+// Enable Nette Debugger for error visualisation & logging
+//$configurator->setProductionMode($configurator::AUTO);
+$configurator->enableDebugger(__DIR__ . '/../log');
+// Enable RobotLoader - this will load all classes automatically
+$configurator->setTempDirectory(__DIR__ . '/../temp');
+$configurator->getSplClassLoader()
+ ->addAlias('Symfony', LIBS_DIR . "/Symfony")
+ ->addAlias('Doctrine', LIBS_DIR . "/Doctrine")
-// Setup application
-$application = $context->application;
-//$application->errorPresenter = 'Error';
-$application->catchExceptions = Debugger::$productionMode;
+// Create Dependency Injection container from config.neon file
+$configurator->addConfig(__DIR__ . '/config/config.neon');
+if (file_exists($file = __DIR__ . '/config/local.neon')) {
+ $configurator->addConfig(__DIR__ . '/config/local.neon');
+}
+$container = $configurator->createContainer();
-// Router
-$router = $application->router;
-// Homepage
-$router[] = new Route("index.php", "Homepage:default", Route::ONE_WAY);
-// Media
-$route = $router[] = new Nella\Media\FileRoute(
- 'files/<file>', "Media:Media:file", 0, $context->doctrineContainer
-);
-$route = $router[] = new Nella\Media\ImageRoute(
- 'images/<format>/<image>.<type>', "Media:Media:image", 0, $context->doctrineContainer
-);
-// Default
-$router[] = new Route("<presenter>/<action>[/<id>]", "Homepage:default");
+// Setup router
+$container->router[] = new Route('index.php', 'Homepage:default', Route::ONE_WAY);
+$container->router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default');
-$application->run();
+// Configure and run the application!
+$container->application->run();
View
@@ -1,26 +0,0 @@
-#
-# SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser!
-#
-# If you don't protect this directory from direct web access, anybody will be able to see your passwords.
-# http://nette.org/security-warning
-#
-common:
- php: # PHP configuration
- date.timezone: Europe/Prague
- # php.zlib.output_compression = yes
- # php.default_charset = "UTF-8"
-
-production < common:
-
-development < common:
- services:
- cacheStorage:
- class: Nette\Caching\Storages\MemoryStorage
- #templateCacheStorage:
- # class: Nette\Caching\Storages\MemoryStorage
- database:
- driver: pdo_sqlite
- path: %storageDir%/db.sqlite
-
-console < common:
-
View
@@ -0,0 +1,8 @@
+#
+# SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser!
+#
+# If you don't protect this directory from direct web access, anybody will be able to see your passwords.
+# http://nette.org/security-warning
+#
+php:
+ date.timezone: Europe/Prague
View
@@ -0,0 +1,10 @@
+services:
+ cacheStorage:
+ class: Nette\Caching\Storages\MemoryStorage
+ templateCacheStorage:
+ class: Nette\Caching\Storages\MemoryStorage
+
+doctrine:
+ database:
+ driver: pdo_sqlite
+ path: %storageDir%/db.sqlite
@@ -16,9 +16,5 @@
*/
abstract class BasePresenter extends \Nella\Application\UI\Presenter
{
- protected function beforeRender()
- {
- parent::beforeRender();
- $this->template->siteName = $this->getContext()->params['appName'];
- }
+
}
@@ -8,38 +8,57 @@
* @param string $robots tell robots how to index the content of a page (optional)
* @param array $flashes flash messages
*}
-
-<!DOCTYPE html>
-<html>
+<!doctype html>
+<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en"><![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <meta http-equiv="Content-Language" content="en">
- <meta name="description" content="Nellae Framework web application skeleton">
+ <meta name="description" content="Nella Framework web application skeleton">
<meta name="robots" content="{$robots}" n:ifset="$robots">
- <title>{$siteName}</title>
+ <title>Nella Framework Skeleton</title>
+
+ <meta name="description" content="Nella Framework - official website">
- <link rel="stylesheet" media="screen,projection,tv" href="{$basePath}/css/screen.css">
+ <link rel="stylesheet" media="screen,projection,tv" href="{$basePath}/css/style.css">
<link rel="stylesheet" media="print" href="{$basePath}/css/print.css">
<link rel="shortcut icon" href="{$basePath}/favicon.ico" type="image/x-icon">
- <link rel="stylesheet" href="{$basePath}/css/jquery-ui-1.8.13.custom.css">
- <script src="{$basePath}/js/head.min.js"></script>
- <script>
- head.js(
- {$basePath}+'/js/jquery-1.6.1.min.js',
- {$basePath}+'/js/jquery-ui-1.8.13.custom.min.js',
- {$basePath}+'/js/jquery-ui-timepicker-addon.js',
- {$basePath}+'/js/netteForms.js',
- {$basePath}+'/js/nellaMfu.js',
- {$basePath}+'/js/nella.js'
- );
- </script>
+ <script src="{$basePath}/js/modernizr-2.5.3.min.js"></script>
+
+ {block head}{/block}
</head>
<body>
<div n:foreach="$flashes as $flash" class="flash {$flash->type}">{$flash->message}</div>
{include #content}
+
+ <script>
+ window._gaq = [['_setAccount','UA-1234567-9'],['_trackPageview'],['_trackPageLoadTime']];
+
+ Modernizr.load([{
+ load: '//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js',
+ complete: function () {
+ if ( !window.jQuery ) {
+ Modernizr.load('{$basePath}/js/jquery-1.7.1.min.js');
+ }
+ }
+ },{
+ load: '{$basePath}/js/netteForms.js'
+ },{
+ load: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'
+ }]);
+ </script>
+
+ <!--[if lt IE 7 ]>
+ <script defer src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
+ <script defer>window.attachEvent('onload',function(){ CFInstall.check({ mode:'overlay' }) })</script>
+ <![endif]-->
</body>
</html>
Oops, something went wrong.

0 comments on commit fcdedfe

Please sign in to comment.