Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdc056f
commit 8ff7252
Showing
21 changed files
with
447 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ tests/_output/* | |
|
||
composer.lock | ||
|
||
tests/_output/* | ||
tests/_output/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
if (!defined("ROOT_DIR")) { | ||
define('ROOT_DIR', realpath(__DIR__ . '/..')); | ||
} | ||
if (!defined("PUBLIC_DIR")) { | ||
define('PUBLIC_DIR', ROOT_DIR . '/public'); | ||
} | ||
if (!defined("VENDOR_DIR")) { | ||
define('VENDOR_DIR', ROOT_DIR . '/vendor'); | ||
} | ||
if (!defined("DATA_DIR")) { | ||
define('DATA_DIR', ROOT_DIR . '/data'); | ||
} | ||
|
||
if (!is_dir(__DIR__ . "/../vendor")) { | ||
die("Access Denied: index script not inside root public dir"); | ||
} | ||
|
||
$loader = require ROOT_DIR . "/vendor/autoload.php"; | ||
|
||
$app = new \Akademiano\Core\Application(); | ||
$app->setLoader($loader); | ||
|
||
$app->getDiContainer()->extend('baseConfigLoader', function (\Akademiano\Config\ConfigLoader $configLoader, \Pimple\Container $pimple) { | ||
$configLoader->addConfigDir(ROOT_DIR . "/src/config"); | ||
return $configLoader; | ||
}); | ||
|
||
/*$app->getDiContainer()["baseConfig"] = new \Akademiano\Config\Config( | ||
[ | ||
'view' => [ | ||
'adapter' => 'twig', | ||
'options' => [ | ||
'cache' => false, | ||
"debug" => true, | ||
], | ||
"init" => [ | ||
"setLocale" => function ($c) { | ||
setlocale(LC_ALL, 'ru_RU.UTF-8'); | ||
setlocale(LC_NUMERIC, "en_US.UTF-8"); | ||
locale_set_default('ru'); | ||
} | ||
], | ||
"Acl" => [ | ||
"adapter" => "Akademiano\\Acl\\Model\\Adapter\\RegisteredAdapter", | ||
], | ||
"modules" => [ | ||
"Akademiano\\Core", | ||
], | ||
], | ||
] | ||
); | ||
*/ | ||
|
||
|
||
/*$app->getDiContainer()["routes"] = [ | ||
"root" => [ | ||
"patterns" => [ | ||
"type" => \Akademiano\Router\RoutePattern::TYPE_FIRST_PREFIX, | ||
"value" => "/", | ||
], | ||
"action" => ["index", "index"], | ||
], | ||
];*/ | ||
|
||
$app->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
namespace Sites\All\Controller; | ||
|
||
|
||
use Akademiano\Core\Controller\AbstractController; | ||
|
||
class IndexController extends AbstractController | ||
{ | ||
public function indexAction() | ||
{ | ||
echo "OK"; | ||
$this->autoRenderOff(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
|
||
namespace Sites\All; | ||
|
||
|
||
class Site | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
return [ | ||
'view' => [ | ||
'adapter' => 'twig', | ||
'options' => [ | ||
'cache' => true, | ||
"debug" => false, | ||
], | ||
"extensions" => [ | ||
"Twig_Extension_Debug", | ||
"Akademiano\\Twig\\Extensions\\AssetExtension", | ||
"Akademiano\\Twig\\Extensions\\UrlExtension", | ||
"Akademiano\\User\\Twig\\UserExtension", | ||
], | ||
"filters" => [ | ||
"cropBySpace" => [["\\Aademiano\\Utils\\StringUtils", "cropBySpace"], ['pre_escape' => 'html']], | ||
"urlToTag" => [ | ||
["\\Aademiano\\Utils\\StringUtils", "urlToTag"], | ||
['pre_escape' => 'html', 'is_safe' => array('html')] | ||
], | ||
"nl2p" => [["\\Aademiano\\Utils\\StringUtils", "nl2p"], ['pre_escape' => 'html', 'is_safe' => array('html')]], | ||
"cutStr" => [["\\Aademiano\\Utils\\StringUtils", "cutStr"], ['pre_escape' => 'html', 'is_safe' => array('html')]], | ||
"nl2Array" => [["\\Aademiano\\Utils\\StringUtils", "nl2Array"], []], | ||
"dechex" => [function($id) { | ||
if($id instanceof \Akademiano\Entity\UuidInterface) { | ||
$id = (string) $id->getHex(); | ||
return$id; | ||
} elseif (is_numeric($id)) { | ||
return dechex((int)$id); | ||
} else { | ||
throw new RuntimeException("Culd not convert to hex not numeric or uuid item"); | ||
} | ||
}, []], | ||
"dateIntl" => [["\\Aademiano\\Utils\\Time", "toStrIntl"], []], | ||
"date2Month" => [["\\Aademiano\\Utils\\Time", "calendarMonth"], ['is_safe' => array('html')]], | ||
], | ||
"urlExtension" => [ | ||
"routeGenerator" => [ | ||
\Akademiano\Config\Config::DYN_CONF => function ($c) { | ||
$router = $c["router"]; | ||
return [$router, "getUrl"]; | ||
} | ||
] | ||
], | ||
"userExtension" => [ | ||
"custodian" => [ | ||
\Akademiano\Config\Config::DYN_CONF => function ($c) { | ||
return $c["custodian"]; | ||
} | ||
] | ||
] | ||
], | ||
"init" => [ | ||
"setLocale" => function ($c) { | ||
setlocale(LC_ALL, 'ru_RU.UTF-8'); | ||
setlocale(LC_NUMERIC, "en_US.UTF-8"); | ||
locale_set_default('ru'); | ||
} | ||
], | ||
"Acl" => [ | ||
"adapter" => "Akademiano\\Acl\\Model\\Adapter\\RegisteredAdapter", | ||
], | ||
"modules" => [ | ||
"Akademiano\\User" | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
return [ | ||
"root" => [ | ||
"patterns" => [ | ||
"type" =>\Akademiano\Router\RoutePattern::TYPE_FIRST_PREFIX, | ||
"value" => "/", | ||
], | ||
"action" => ["index", "index"], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% extends "layoutAdmin.twig" %} | ||
|
||
{% block article %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
body { | ||
padding-top: 20px; | ||
padding-bottom: 40px; | ||
} | ||
|
||
/* Custom container */ | ||
.container-narrow { | ||
margin: 0 auto; | ||
max-width: 700px; | ||
} | ||
.container-narrow > hr { | ||
margin: 30px 0; | ||
} | ||
|
||
/* Main marketing message and sign up button */ | ||
.jumbotron { | ||
margin: 60px 0; | ||
text-align: center; | ||
background-color: #ffffff; | ||
} | ||
.jumbotron h1 { | ||
font-size: 72px; | ||
line-height: 1; | ||
} | ||
.jumbotron .btn { | ||
font-size: 21px; | ||
padding: 14px 24px; | ||
} | ||
|
||
/* Supporting marketing content */ | ||
.marketing { | ||
margin: 60px 0; | ||
} | ||
.marketing p + h4 { | ||
margin-top: 28px; | ||
} | ||
|
||
div.liDesc>p { | ||
height: 60px; | ||
} | ||
|
||
div.docs h4 { | ||
font-size: 12px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$(document).ready(function () { | ||
$(".photo-thumb").colorbox({ | ||
rel: 'photo-thumb', | ||
slideshow: true, | ||
slideshowSpeed: 4000, | ||
slideshowAuto: false, | ||
// transition:"none", | ||
speed: 400, | ||
maxWidth: "100%", maxHeight: "100%", | ||
"isFitWidth": true, | ||
|
||
current: "{current} из {total}", | ||
slideshowStart: "начать слайдшоу", | ||
slideshowStop: "остановить слайдшоу" | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{ asset_css_once([ | ||
"colorbox/example1/colorbox.css" | ||
], default, true) }} | ||
|
||
{{ asset_js_once([ | ||
"colorbox/jquery.colorbox-min.js", | ||
"colorbox/i18n/jquery.colorbox-ru.js", | ||
"assets/js/colorbox.init.js", | ||
], default, true) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% extends "layout.twig" %} | ||
|
||
{% block head %} | ||
{{ parent() }} | ||
|
||
<link href="/static/css/delta.css" rel="stylesheet"> | ||
|
||
{% endblock head %} | ||
|
||
{% block content %} | ||
<div class="container-narrow"> | ||
<div class="jumbotron"> | ||
<h1> | ||
Akademiano Default All Site Template | ||
</h1> | ||
|
||
<p class="lead"> | ||
Default start page of Akademiano framework. | ||
</p> | ||
<a class="btn btn-large btn-success" href="https://github.com/mrdatamapper/akademiano-application">Github</a> | ||
</div> | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!DOCTYPE html> | ||
<html lang={{ html.lang|default("ru") }}> | ||
<head> | ||
{% block head %} | ||
<title>{{ pageTitle | default('DeltaPHP Demo Site') }}</title> | ||
<meta name="description" | ||
content="{{ pageDescription | default('Simple and fast PHP 5.4+ MVC framework with a modular organization') }}"/> | ||
<meta charset="utf-8"> | ||
<base href="/"> | ||
{% if canonicalRef %} | ||
<link rel="canonical" href="{{ canonicalRef }}"/> | ||
{% endif %} | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
{{ asset_css([ | ||
"bootstrap/dist/css/bootstrap.css", | ||
"bootstrap/dist/css/bootstrap-theme.css", | ||
], default, true) }} | ||
|
||
{# | ||
<!--[if lt IE 9]> | ||
{{ asset_js(["html5shiv/dist/html5shiv.min.js", "respond/dest/respond.min.js"], default, true) }} | ||
<![endif]-->#} | ||
{{ asset_js([ | ||
"jquery/dist/jquery.min.js", | ||
"bootstrap/dist/js/bootstrap.min.js" | ||
], default, true) }} | ||
{% endblock head %} | ||
</head> | ||
<body> | ||
|
||
{% block body %} | ||
<div class="container"> | ||
{% block content %} | ||
<div class="row"> | ||
<aside class="col-md-3"> | ||
{% block aside %} | ||
|
||
{% endblock aside %} | ||
</aside> | ||
<article class="col-md-9"> | ||
{% block article %} | ||
|
||
{% endblock article %} | ||
</article> | ||
</div> | ||
{% endblock content %} | ||
</div> | ||
|
||
|
||
<footer> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-12 footer"> | ||
{% block footer %} | ||
<p>© <a href="http://deltaphp.org">DeltaPHP</a> 2014</p> | ||
{% endblock footer %} | ||
</div> | ||
</div> | ||
</div> | ||
</footer> | ||
|
||
{% if includeAnalitics %} | ||
{% block counters %} | ||
{% include "analitics.twig" %} | ||
{% endblock counters %} | ||
{% endif %} | ||
|
||
{% endblock body %} | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.