Cambios en titulo, en boton fojas, y en indices online

This commit is contained in:
2020-03-31 19:41:26 -03:00
parent 8ef8b0df42
commit 2ae6826ff4
19 changed files with 213 additions and 66 deletions

View File

@ -5,15 +5,16 @@ use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Container\ContainerInterface as Container;
use Slim\Views\Blade as View;
use Carbon\Carbon;
use ProVM\Common\Service\Filemanager;
class Home {
public function __invoke(Request $request, Response $response, View $view, Filemanager $manager, Container $container): Response {
$banner = (object) [
'titulo' => "5° NOTARÍA DE SANTIAGO\nPATRICIO RABY BENAVENTE",
'titulo' => "5° NOTARÍA DE SANTIAGO",
'contenido' => "Gertrudis Echenique 30, of. 32, El Golf\n<i class=\"large icon icon-metro\"></i> Metro Alcantara"
];
$links = $manager->folder('data')->load('documentos.yml');
array_walk($links->documentos, function(&$item) use ($container) {
$item = new Documento($container, $item->texto, $item->uri, $item->icono);
@ -23,7 +24,13 @@ class Home {
});
$aviso = $manager->folder('data')->load('aviso.yml');
$transparencia = $manager->folder('data')->load('transparencia.yml')->activo;
return $view->render($response, 'home', compact('banner', 'aviso', 'links', 'transparencia'));
$months = (object) ['full' => [], 'short' => []];
$m = Carbon::createFromDate(0, 1, 1);
for ($i = 0; $i < 12; $i ++) {
$months->full []= ucwords($m->copy()->addMonths($i)->locale('es_ES')->isoFormat('MMMM'));
$months->short []= ucwords($m->copy()->addMonths($i)->locale('es_ES')->isoFormat('MMM'));
}
return $view->render($response, 'home', compact('banner', 'aviso', 'links', 'transparencia', 'months'));
}
}