v0.10.0-rc

This commit is contained in:
2020-03-30 13:33:54 -03:00
parent 158f3ff0f7
commit 9a9c031499
13 changed files with 148 additions and 32 deletions

View File

@ -11,12 +11,12 @@ 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",
'contenido' => "Gertrudis Echenique 30, of. 32, El Golf\n<span class=\"icon-metro\"></span> Metro Alcantara"
'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 = new Documento($container, $item->texto, $item->uri, $item->icono);
});
array_walk($links->consulta, function(&$item) {
$item = new Link($item->texto, $item->uri);
@ -32,8 +32,11 @@ class Documento {
protected $texto;
protected $uri;
public function __construct(Container $container, string $nombre, string $uri = '') {
$this->icono = implode('/', [$container->get('urls.images'), $nombre . '.png']);
public function __construct(Container $container, string $nombre, string $uri = '', string $icono = '') {
$this->icono = $icono;
if ($icono == '') {
$this->icono = implode('/', [$container->get('urls.images'), $nombre . '.png']);
}
$this->texto = $nombre;
$this->uri = $uri;
if ($uri == '') {
@ -41,7 +44,7 @@ class Documento {
}
}
public function show(): string {
return '<a href="' . $this->uri . '"><img src="' . $this->icono . '" /> ' . $this->texto . '</a>';
return '<a href="' . $this->uri . '"><i class="large ' . $this->icono . ' icon"></i> ' . $this->texto . '</a>';
}
}
class Link {