This commit is contained in:
2020-02-27 19:09:54 -03:00
parent 17b62d528e
commit 467fab3716
35 changed files with 478 additions and 0 deletions

35
bootstrap/web/config.php Normal file
View File

@ -0,0 +1,35 @@
<?php
return [
'folders.templates' => DI\string(implode(DIRECTORY_SEPARATOR, [
'{folders.resources}',
'views'
])),
'folders.cache' => DI\string(implode(DIRECTORY_SEPARATOR, [
'{folders.resources}',
'cache'
])),
'blade_template_path' => DI\get('folders.templates'),
'blade_cache_path' => DI\get('folders.cache'),
'urls.assets' => DI\string(implode('/', [
'{urls.base}',
'assets'
])),
'urls.images' => DI\string(implode('/', [
'{urls.assets}',
'images'
])),
'assets' => (object) [
(object) [
'script' => 'https://code.jquery.com/jquery-3.4.1.min.js'
],
(object) [
'script' => 'https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.4/semantic.min.js',
'style' => 'https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.4/semantic.min.css',
'fonts' => [
'https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.4/themes/default/assets/fonts/brand-icons.woff2',
'https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.4/themes/default/assets/fonts/icons.woff2',
'https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.4/themes/default/assets/fonts/outline-icons.woff2'
]
]
]
];

View File

@ -0,0 +1,2 @@
<?php
//$app->add(new Zeuxisoo\Whoops\Slim\WhoopsMiddleware);

21
bootstrap/web/setup.php Normal file
View File

@ -0,0 +1,21 @@
<?php
use Psr\Container\ContainerInterface;
return [
Slim\Views\Blade::class => function(ContainerInterface $container) {
return new Slim\Views\Blade(
$container->get('blade_template_path'),
$container->get('blade_cache_path'),
null,
[
'urls' => (object) [
'base' => $container->get('urls.base'),
'assets' => (object) [
'images' => $container->get('urls.images')
]
],
'assets' => $container->get('assets')
]
);
}
];