Compare commits
56 Commits
master
...
c3ce84143f
Author | SHA1 | Date | |
---|---|---|---|
c3ce84143f | |||
6e3418402c | |||
e378054972 | |||
450819f6b4 | |||
c65cc00a9e | |||
42f193efc1 | |||
ac19b02797 | |||
7aa3546e0a | |||
5c538f8e93 | |||
a9750631c2 | |||
ade2ebcfc2 | |||
0c0724aacf | |||
6cbc4b4763 | |||
c1d4046c93 | |||
cc566d4a39 | |||
2833e58bef | |||
4923c6c67d | |||
5864efd24f | |||
080ed4553e | |||
2d2eccb600 | |||
84e6808883 | |||
26bd5207f3 | |||
cb08e0af64 | |||
5510766ecb | |||
bec6882d27 | |||
243697a054 | |||
0e5e34cd5f | |||
4796639b2e | |||
88df2f547a | |||
cf7538913a | |||
3d270b1e8d | |||
6744b8aa90 | |||
079ccdf0b9 | |||
ba438e540e | |||
b7f0ffe682 | |||
08cf6df8fc | |||
13320628ae | |||
24c74d2887 | |||
31f308f5c7 | |||
d0aba43371 | |||
c8ceba4776 | |||
e27cd5c68d | |||
168fbbcb09 | |||
6cc02239f9 | |||
c50385139a | |||
9b67d9bcef | |||
0660f1ab7c | |||
d2f5714291 | |||
3133a7d584 | |||
c5a45a1ede | |||
1ed3788e87 | |||
9084ea5edb | |||
fbe1e4f7e5 | |||
68fb456763 | |||
6284266d2a | |||
29fc03937a |
4
.gitignore
vendored
@ -4,10 +4,12 @@ composer.lock
|
||||
|
||||
# Environment
|
||||
.env
|
||||
/config/env/
|
||||
/bootstrap/env/
|
||||
|
||||
# Blade
|
||||
/cache/
|
||||
|
||||
# Uploads
|
||||
/public/uploads/
|
||||
/resources/data/
|
||||
/public/assets/images/*/
|
||||
|
57
bootstrap/app.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
use DI\ContainerBuilder as Builder;
|
||||
use DI\Bridge\Slim\Bridge;
|
||||
|
||||
require_once 'composer.php';
|
||||
|
||||
$builder = new Builder();
|
||||
|
||||
$folders = [
|
||||
'base',
|
||||
'env'
|
||||
];
|
||||
|
||||
if (isset($__environment)) {
|
||||
$folders []= $__environment;
|
||||
}
|
||||
|
||||
$files = [
|
||||
'config',
|
||||
'setup'
|
||||
];
|
||||
|
||||
foreach ($files as $file) {
|
||||
foreach ($folders as $folder) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
__DIR__,
|
||||
$folder,
|
||||
$file . '.php'
|
||||
]);
|
||||
if (!file_exists($filename)) {
|
||||
continue;
|
||||
}
|
||||
$builder->addDefinitions($filename);
|
||||
}
|
||||
}
|
||||
|
||||
$container = $builder->build();
|
||||
$container->set('env', $__environment);
|
||||
$app = Bridge::create($container);
|
||||
$app->setBasePath($container->get('urls.base'));
|
||||
|
||||
foreach ($folders as $folder) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
__DIR__,
|
||||
$folder,
|
||||
'middleware.php'
|
||||
]);
|
||||
if (!file_exists($filename)) {
|
||||
continue;
|
||||
}
|
||||
include_once $filename;
|
||||
}
|
||||
|
||||
include_once implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.routes'),
|
||||
'router.php'
|
||||
]);
|
9
bootstrap/base/config.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
return [
|
||||
'language' => 'es',
|
||||
'folders.base' => dirname(__DIR__, 2),
|
||||
'folders.resources' => DI\string(implode(DIRECTORY_SEPARATOR, ['{folders.base}', 'resources'])),
|
||||
'folders.routes' => DI\string(implode(DIRECTORY_SEPARATOR, ['{folders.resources}', 'routes'])),
|
||||
'folders.data' => DI\string(implode(DIRECTORY_SEPARATOR, ['{folders.resources}', 'data'])),
|
||||
'folders.public' => DI\string(implode(DIRECTORY_SEPARATOR, ['{folders.base}', 'public']))
|
||||
];
|
6
bootstrap/composer.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
require_once implode(DIRECTORY_SEPARATOR, [
|
||||
dirname(__DIR__),
|
||||
'vendor',
|
||||
'autoload.php'
|
||||
]);
|
29
bootstrap/web/config.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
return [
|
||||
'folders.templates' => DI\string(implode(DIRECTORY_SEPARATOR, [
|
||||
'{folders.resources}',
|
||||
'views'
|
||||
])),
|
||||
'folders.cache' => DI\string(implode(DIRECTORY_SEPARATOR, [
|
||||
'{folders.base}',
|
||||
'cache'
|
||||
])),
|
||||
'urls.assets' => DI\string(implode('/', [
|
||||
'{urls.base}',
|
||||
'assets'
|
||||
])),
|
||||
'urls.styles' => DI\string(implode('/', [
|
||||
'{urls.assets}',
|
||||
'styles'
|
||||
])),
|
||||
'urls.scripts' => DI\string(implode('/', [
|
||||
'{urls.assets}',
|
||||
'scripts'
|
||||
])),
|
||||
'file.visits' => DI\string(implode(DIRECTORY_SEPARATOR, [
|
||||
'{folders.data}',
|
||||
'visitas.json'
|
||||
])),
|
||||
'visits.time' => 12 * 60 * 60,
|
||||
'urls.indicadores' => 'https://mindicador.cl/api'
|
||||
];
|
124
bootstrap/web/setup.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Carbon\Carbon;
|
||||
|
||||
return [
|
||||
'urls' => function(Container $c) {
|
||||
return (object) [
|
||||
'base' => $c->get('base_url'),
|
||||
'facebook' => '',
|
||||
'linkedin' => '',
|
||||
'twitter' => '',
|
||||
'youtube' => '',
|
||||
'assets' => $c->get('urls.assets'),
|
||||
'images' => implode('/', [$c->get('urls.assets'), 'images']),
|
||||
'styles' => $c->get('urls.styles'),
|
||||
'scripts' => $c->get('urls.scripts'),
|
||||
'admin' => implode('/', [$c->get('urls.base'), 'admin'])
|
||||
];
|
||||
},
|
||||
'assets' => function(Container $c) {
|
||||
return (object) [
|
||||
'styles' => [
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.4/semantic.min.css',
|
||||
implode(DIRECTORY_SEPARATOR, [
|
||||
$c->get('urls.styles'),
|
||||
'main.css'
|
||||
])
|
||||
],
|
||||
'fonts' => [
|
||||
'text/css' => [
|
||||
'https://fonts.googleapis.com/css2?family=Roboto&display=swap',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.4/themes/default/assets/fonts/brand-icons.woff',
|
||||
'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.woff',
|
||||
'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.woff',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.4/themes/default/assets/fonts/outline-icons.woff2'
|
||||
]
|
||||
],
|
||||
'scripts' => [
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.4/semantic.min.js',
|
||||
'https://cdn.jsdelivr.net/npm/jquery.marquee@1.5.0/jquery.marquee.min.js'
|
||||
]
|
||||
];
|
||||
},
|
||||
'visitas' => function(Container $c) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$c->get('folders.data'),
|
||||
'visitas.json'
|
||||
]);
|
||||
$file = json_decode(trim(file_get_contents($filename)));
|
||||
return $file->visits;
|
||||
},
|
||||
'segmentos' => function(Container $c) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$c->get('folders.data'),
|
||||
'segmentos.json'
|
||||
]);
|
||||
$segmentos = json_decode(trim(file_get_contents($filename)));
|
||||
return $segmentos;
|
||||
},
|
||||
'email' => function(Container $c) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$c->get('folders.data'),
|
||||
'emails.json'
|
||||
]);
|
||||
$emails = json_decode(trim(file_get_contents($filename)));
|
||||
return $emails->settings;
|
||||
},
|
||||
'emails' => function(Container $c) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$c->get('folders.data'),
|
||||
'emails.json'
|
||||
]);
|
||||
$emails = json_decode(trim(file_get_contents($filename)));
|
||||
return $emails->emails;
|
||||
},
|
||||
ProVM\KI\Common\Alias\View::class => function(Container $c) {
|
||||
return new ProVM\KI\Common\Implementation\View(
|
||||
$c->get('folders.templates'),
|
||||
$c->get('folders.cache'),
|
||||
null,
|
||||
[
|
||||
'page_language' => $c->get('language'),
|
||||
'urls' => $c->get('urls'),
|
||||
'assets' => $c->get('assets'),
|
||||
'header' => (object) [
|
||||
'fecha' => ucwords(Carbon::today()->locale('es')->isoFormat('D MMMM YYYY')),
|
||||
'hora' => Carbon::now()->format('H:i a'),
|
||||
'uf' => $c->get('ProVM\KI\Common\Service\Indicadores')->get('uf', Carbon::today())->valor,
|
||||
'menu' => (object) [
|
||||
'segmentos' => $c->get('segmentos')
|
||||
]
|
||||
],
|
||||
'footer' => (object) [
|
||||
'visitas' => $c->get('visitas')
|
||||
]
|
||||
]
|
||||
);
|
||||
},
|
||||
ProVM\KI\Common\Service\Indicadores::class => function(Container $c) {
|
||||
return new ProVM\KI\Common\Service\Indicadores($c->get('urls.indicadores'));
|
||||
},
|
||||
ProVM\Common\Factory\Model::class => function(Container $c) {
|
||||
return new ProVM\Common\Factory\Model(
|
||||
$c->get('folders.data'),
|
||||
$c->get('folders.public')
|
||||
);
|
||||
},
|
||||
ProVM\KI\Common\Alias\Message::class => function(Container $c) {
|
||||
return new ProVM\KI\Common\Implementation\Message();
|
||||
},
|
||||
ProVM\KI\Common\Alias\Mailer::class => function(Container $c) {
|
||||
return new ProVM\KI\Common\Implementation\Mailer([
|
||||
'host' => $c->get('email')->host->name,
|
||||
'username' => $c->get('email')->user->name,
|
||||
'password' => $c->get('email')->user->password
|
||||
]);
|
||||
},
|
||||
Psr\Log\LoggerInterface::class => function(Container $c) {
|
||||
return new ProVM\Common\Implementation\Logger(implode(DIRECTORY_SEPARATOR, [$c->get('folders.base'), 'admin.log']));
|
||||
}
|
||||
];
|
6
common/Alias/Mailer.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Alias;
|
||||
|
||||
interface Mailer {
|
||||
public function send(Message $message): bool;
|
||||
}
|
4
common/Alias/Message.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Alias;
|
||||
|
||||
interface Message {}
|
9
common/Alias/View.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Alias;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
|
||||
interface View {
|
||||
public function render(Response $response, $template, array $data = []);
|
||||
public function fetch($template, array $data = []);
|
||||
}
|
90
common/Controller/Web/Admin/Faq.php
Normal file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Controller\Web\Admin;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\KI\Common\Alias\View;
|
||||
|
||||
class Faq {
|
||||
public function __invoke(Request $request, Response $response, View $view, Container $container) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'faqs.json'
|
||||
]);
|
||||
$faqs = json_decode(trim(file_get_contents($filename)));
|
||||
return $view->render($response, 'admin.faq', compact('faqs'));
|
||||
}
|
||||
public function add(Request $request, Response $response, Container $container) {
|
||||
$post = $request->getParsedBody();
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'faqs.json'
|
||||
]);
|
||||
$faqs = json_decode(trim(file_get_contents($filename)));
|
||||
|
||||
$faq = (object) [
|
||||
'titulo' => '',
|
||||
'contenido' => ''
|
||||
];
|
||||
if (isset($post['id']) and isset($faqs[$post['id']])) {
|
||||
$faq = $faqs[$post['id']];
|
||||
}
|
||||
|
||||
$changed = false;
|
||||
foreach ($faq as $k => $v) {
|
||||
if ($v != $post[$k]) {
|
||||
$faq->$k = $post[$k];
|
||||
$changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($post['id'])) {
|
||||
$faqs[$post['id']] = $faq;
|
||||
} else {
|
||||
$faqs []= $faq;
|
||||
}
|
||||
|
||||
$status = false;
|
||||
if ($changed) {
|
||||
$faqs = array_values($faqs);
|
||||
$status = (file_put_contents($filename, json_encode($faqs, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)) !== false);
|
||||
}
|
||||
|
||||
$output = [
|
||||
'informacion' => $post,
|
||||
'estado' => $status,
|
||||
'faqs' => $faqs
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
public function delete(Request $request, Response $response, Container $container) {
|
||||
$post = $request->getParsedBody();
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'faqs.json'
|
||||
]);
|
||||
$faqs = json_decode(trim(file_get_contents($filename)));
|
||||
|
||||
$status = false;
|
||||
if (isset($post['id']) and isset($faqs[$post['id']])) {
|
||||
unset($faqs[$post['id']]);
|
||||
|
||||
$faqs = array_values($faqs);
|
||||
$status = (file_put_contents($filename, json_encode($faqs, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)) !== false);
|
||||
}
|
||||
|
||||
$output = [
|
||||
'informacion' => $post,
|
||||
'estado' => $status,
|
||||
'faqs' => $faqs
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
}
|
121
common/Controller/Web/Admin/Home.php
Normal file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Controller\Web\Admin;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\KI\Common\Alias\View;
|
||||
|
||||
class Home {
|
||||
public function __invoke(Request $request, Response $response, View $view, Container $container): Response {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'avisos.json'
|
||||
]);
|
||||
$avisos = json_decode(trim(file_get_contents($filename)));
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'resumen.json'
|
||||
]);
|
||||
$resumen = json_decode(trim(file_get_contents($filename)));
|
||||
return $view->render($response, 'admin.home', compact('avisos', 'resumen'));
|
||||
}
|
||||
public function add(Request $request, Response $response, Container $container): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'avisos.json'
|
||||
]);
|
||||
$avisos = json_decode(trim(file_get_contents($filename)));
|
||||
|
||||
if (isset($post['estado'])) {
|
||||
$avisos->activo = ($post['estado'] !== 'false');
|
||||
} else {
|
||||
$aviso = (object) [
|
||||
'titulo' => '',
|
||||
'contenido' => ''
|
||||
];
|
||||
if (isset($post['id'])) {
|
||||
$aviso = $avisos->avisos[$post['id']];
|
||||
}
|
||||
|
||||
foreach ($aviso as $k => $v) {
|
||||
if ($v != $post[$k]) {
|
||||
$aviso->$k = $post[$k];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($post['id'])) {
|
||||
$avisos->avisos[$post['id']] = $aviso;
|
||||
} else {
|
||||
$avisos->avisos []= $aviso;
|
||||
}
|
||||
}
|
||||
|
||||
$status = (file_put_contents($filename, json_encode($avisos, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)) !== false);
|
||||
|
||||
$output = [
|
||||
'informacion' => $post,
|
||||
'estado' => $status,
|
||||
'avisos' => $avisos
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
public function delete(Request $request, Response $response, Container $container): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'avisos.json'
|
||||
]);
|
||||
$avisos = json_decode(trim(file_get_contents($filename)));
|
||||
|
||||
if (isset($avisos->avisos[$post['id']])) {
|
||||
unset($avisos->avisos[$post['id']]);
|
||||
$avisos->avisos = array_values($avisos->avisos);
|
||||
}
|
||||
|
||||
$status = (file_put_contents($filename, json_encode($avisos, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)) !== false);
|
||||
|
||||
$output = [
|
||||
'informacion' => $post,
|
||||
'estado' => $status,
|
||||
'avisos' => $avisos
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
public function edit(Request $request, Response $response, Container $container): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'resumen.json'
|
||||
]);
|
||||
$resumen = json_decode(trim(file_get_contents($filename)));
|
||||
|
||||
$ind = $resumen[$post['id']];
|
||||
|
||||
foreach ($ind as $k => $v) {
|
||||
if ($v != $post[$k]) {
|
||||
$ind->$k = $post[$k];
|
||||
}
|
||||
}
|
||||
$resumen[$post['id']] = $ind;
|
||||
|
||||
$status = (file_put_contents($filename, json_encode($resumen, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)) !== false);
|
||||
|
||||
$output = [
|
||||
'informacion' => $post,
|
||||
'estado' => $status,
|
||||
'resumen' => $resumen
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
}
|
51
common/Controller/Web/Admin/Nosotros.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Controller\Web\Admin;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Log\LoggerInterface as Logger;
|
||||
use ProVM\KI\Common\Alias\View;
|
||||
|
||||
class Nosotros {
|
||||
public function __invoke(Request $request, Response $response, View $view, Container $container) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'nosotros.json'
|
||||
]);
|
||||
$nosotros = trim(json_decode(trim(file_get_contents($filename))));
|
||||
return $view->render($response, 'admin.nosotros', compact('nosotros'));
|
||||
}
|
||||
public function guardar(Request $request, Response $response, Container $container, Logger $logger) {
|
||||
$logger->info('Llamado a guardar en Nosotros.');
|
||||
$post = $request->getParsedBody();
|
||||
$logger->info('Información en post:', compact('post'));
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'nosotros.json'
|
||||
]);
|
||||
$nosotros = trim(json_decode(trim(file_get_contents($filename))));
|
||||
$logger->info('Contenido de nosotros.json', compact('nosotros'));
|
||||
$data = trim(json_decode(json_encode($post['nosotros'])));
|
||||
|
||||
$status = false;
|
||||
if ($nosotros != $data) {
|
||||
$status = (file_put_contents($filename, json_encode($post['nosotros'])) !== false);
|
||||
if ($status) {
|
||||
$logger->info('Guardados los cambios en nosotros.json');
|
||||
} else {
|
||||
$logger->notice('No se pudo guardar los cambios en nosotros.json');
|
||||
}
|
||||
} else {
|
||||
$logger->info('No se han hecho cambios en nosotros.');
|
||||
}
|
||||
|
||||
$code = 301;
|
||||
if ($status) {
|
||||
$code = 302;
|
||||
}
|
||||
return $response
|
||||
->withHeader('Location', implode('/', [$container->get('urls')->admin, 'nosotros']))
|
||||
->withStatus($code);
|
||||
}
|
||||
}
|
159
common/Controller/Web/Admin/Productos.php
Normal file
@ -0,0 +1,159 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Controller\Web\Admin;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\KI\Common\Alias\View;
|
||||
use Carbon\Carbon;
|
||||
use ProVM\Common\Factory\Model as ModelFactory;
|
||||
use ProVM\KI\Producto;
|
||||
|
||||
class Productos {
|
||||
public function __invoke(Request $request, Response $response, View $view, ModelFactory $factory): Response {
|
||||
$productos = $factory->find(Producto::class)->many();
|
||||
return $view->render($response, 'admin.productos', compact('productos'));
|
||||
}
|
||||
public function edit(Request $request, Response $response, View $view, Container $container, ModelFactory $factory, $producto): Response {
|
||||
$producto = $factory->find(Producto::class)->where([['id', $producto]])->one();
|
||||
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'segmentos.json'
|
||||
]);
|
||||
$segmentos = json_decode(trim(file_get_contents($filename)));
|
||||
$properties = $producto->getProperties();
|
||||
return $view->render($response, 'admin.producto', compact('producto', 'segmentos', 'properties'));
|
||||
}
|
||||
public function do_edit(Request $request, Response $response, Container $container, ModelFactory $factory, $producto): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$producto = $factory->find(Producto::class)->where([['id', $producto]])->one();
|
||||
|
||||
$f = Carbon::today();
|
||||
$post['publicacion'] = $producto->publicacion ?? implode(' ', [
|
||||
$f->day,
|
||||
'de',
|
||||
ucfirst($f->locale('es')->isoFormat('MMMM')) . ',',
|
||||
$f->year
|
||||
]);
|
||||
$post['id'] = $producto->id;
|
||||
$producto->map((object) $post);
|
||||
|
||||
$producto->save();
|
||||
|
||||
return $response
|
||||
->withHeader('Location', implode('/', [$container->get('urls')->admin, 'productos']));
|
||||
}
|
||||
public function add(Request $request, Response $response, View $view, Container $container): Response {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'segmentos.json'
|
||||
]);
|
||||
$segmentos = json_decode(trim(file_get_contents($filename)));
|
||||
return $view->render($response, 'admin.productos.add', compact('segmentos'));
|
||||
}
|
||||
public function do_add(Request $request, Response $response, Container $container, ModelFactory $factory): Response {
|
||||
$post = $request->getParsedBody();
|
||||
|
||||
$f = Carbon::today();
|
||||
$post['publicacion'] = implode(' ', [
|
||||
$f->day,
|
||||
'de',
|
||||
ucfirst($f->locale('es')->isoFormat('MMMM')) . ',',
|
||||
$f->year
|
||||
]);
|
||||
$producto = $factory->create(Producto::class, (object) $post);
|
||||
if (isset($post['destacado']) and $post['destacado'] == 'on') {
|
||||
$producto->destacado(true);
|
||||
}
|
||||
$producto->save();
|
||||
|
||||
return $response
|
||||
->withHeader('Location', implode('/', [$container->get('urls')->admin, 'productos']));
|
||||
}
|
||||
public function delete(Request $request, Response $response, ModelFactory $factory): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$producto = $factory->find(Producto::class)->where([['id', $post['id']]])->one();
|
||||
$status = $producto->delete();
|
||||
|
||||
$output = [
|
||||
'information' => $post,
|
||||
'estado' => $status
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
public function add_image(Request $request, Response $response, ModelFactory $factory, $producto): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$files = $request->getUploadedFiles();
|
||||
$file = $files['imagen'];
|
||||
$producto = $factory->find(Producto::class)->where([['id', $producto]])->one();
|
||||
$status = $producto->addImagen($file);
|
||||
|
||||
$output = [
|
||||
'informacion' => $producto->id,
|
||||
'estado' => $status
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
public function set_video(Request $request, Response $response, Container $container, $producto): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$files = $request->getUploadedFiles();
|
||||
die();
|
||||
$file = $files['video'];
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.public'),
|
||||
'assets',
|
||||
'images',
|
||||
mb_strtolower($producto->nombre)
|
||||
]);
|
||||
}
|
||||
public function delete_image(Request $request, Response $response, ModelFactory $factory, $producto): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$producto = $factory->find(Producto::class)->where([['id', $producto]])->one();
|
||||
$status = $producto->deleteImagen($post['imagen']);
|
||||
|
||||
$output = [
|
||||
'estado' => $status
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
public function delete_video(Request $request, Response $response, Container $container, $producto): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.public'),
|
||||
'assets',
|
||||
'images',
|
||||
mb_strtolower($producto->nombre)
|
||||
]);
|
||||
return $response;
|
||||
}
|
||||
public function fields(Request $request, Response $response): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$class = implode("\\", [
|
||||
'ProVM',
|
||||
'KI',
|
||||
'Productos',
|
||||
rtrim($post['segmento'], 's')
|
||||
]);
|
||||
$obj = new $class;
|
||||
$properties = $obj->getProperties();
|
||||
|
||||
$output = [
|
||||
'information' => $post,
|
||||
'fields' => $properties
|
||||
];
|
||||
$response->getBody()->write(json_encode($output, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
}
|
42
common/Controller/Web/Base.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Controller\Web;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Carbon\Carbon;
|
||||
use ProVM\KI\Common\Alias\View;
|
||||
|
||||
class Base {
|
||||
public function __invoke(Request $request, Response $response, View $view, Container $container) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'avisos.json'
|
||||
]);
|
||||
$avisos = json_decode(trim(file_get_contents($filename)));
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'destacados.json'
|
||||
]);
|
||||
$destacados = json_decode(trim(file_get_contents($filename)));
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'segmentos.json'
|
||||
]);
|
||||
$segmentos = json_decode(trim(file_get_contents($filename)));
|
||||
array_walk($segmentos, function(&$item) use ($container) {
|
||||
if (!isset($item->imagen)) {
|
||||
$item->imagen = '<div class="ui placeholder"><div class="square image"></div></div>';
|
||||
return;
|
||||
}
|
||||
$item->imagen = '<img src="' . $container->get('urls')->images . '/' . $item->imagen . '" />';
|
||||
});
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'resumen.json'
|
||||
]);
|
||||
$resumen = json_decode(trim(file_get_contents($filename)));
|
||||
$indicadores = ['uf' => 'UF', 'euro' => 'Euro', 'imacec' => 'IMACEC', 'dolar' => 'USD', 'ipc' => 'IPC', 'utm' => 'UTM', 'bitcoin' => 'BitCoin', 'libra_cobre' => 'Lb. Cu'];
|
||||
return $view->render($response, 'home', compact('avisos', 'destacados', 'segmentos', 'resumen', 'indicadores'));
|
||||
}
|
||||
}
|
63
common/Controller/Web/Contacto.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Controller\Web;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\KI\Common\Alias\Message;
|
||||
use ProVM\KI\Common\Alias\Mailer;
|
||||
use ProVM\KI\Common\Alias\View;
|
||||
|
||||
class Contacto {
|
||||
public function __invoke(Request $request, Response $response, View $view): Response {
|
||||
return $view->render($response, 'contacto');
|
||||
}
|
||||
public function enviar(Request $request, Response $response, Container $container, Mailer $mailer): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$body = [];
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.templates'),
|
||||
'contacto',
|
||||
'email.php'
|
||||
]);
|
||||
$html = file_get_contents($filename);
|
||||
foreach ($post as $key => $val) {
|
||||
$body []= ucwords($key) . ': ' . $val;
|
||||
$html = str_replace('{{$' . $key . '}}', $val, $html);
|
||||
}
|
||||
$body = implode(PHP_EOL, $body);
|
||||
$subject = 'Contacto Web - ' . $post['nombre'];
|
||||
|
||||
$message = $container->make(Message::class)
|
||||
->setFrom($container->get('emails')[0])
|
||||
->addTo($container->get('emails')[0])
|
||||
->addCc($container->get('emails')[1])
|
||||
->setSubject($subject)
|
||||
->setBody($body)
|
||||
->setHTMLBody($html);
|
||||
$status = $mailer->send($message);
|
||||
$message = $container->make(Message::class)
|
||||
->setFrom($container->get('emails')[0])
|
||||
->addTo($post['mail'], $post['nombre'])
|
||||
->setSubject($subject)
|
||||
->setBody('Su correo a CapitalInvestments ha sido recibido.');
|
||||
$mailer->send($message);
|
||||
|
||||
$output = [
|
||||
'informacion' => $post,
|
||||
'estado' => $status,
|
||||
'mail' => [
|
||||
'from' => $post['mail'],
|
||||
'to' => $container->get('emails')[0],
|
||||
'cc' => $container->get('emails')[1],
|
||||
'asunto' => $subject,
|
||||
'mensaje' => $body,
|
||||
'html' => $html
|
||||
]
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
}
|
18
common/Controller/Web/Faq.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Controller\Web;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\KI\Common\Alias\View;
|
||||
|
||||
class Faq {
|
||||
public function __invoke(Request $request, Response $response, View $view, Container $container) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'faqs.json'
|
||||
]);
|
||||
$faqs = json_decode(trim(file_get_contents($filename)));
|
||||
return $view->render($response, 'faq', compact('faqs'));
|
||||
}
|
||||
}
|
23
common/Controller/Web/Indicadores.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Controller\Web;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Carbon\Carbon;
|
||||
use ProVM\KI\Common\Service\Indicadores as Service;
|
||||
|
||||
class Indicadores {
|
||||
public function get(Request $request, Response $response, Container $container, Service $service, $indicador) {
|
||||
$valor = $service->get($indicador, Carbon::today());
|
||||
|
||||
$output = [
|
||||
'sim' => $indicador,
|
||||
'valor' => $valor,
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
}
|
45
common/Controller/Web/Nosotros.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Controller\Web;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\KI\Common\Alias\View;
|
||||
|
||||
class Nosotros {
|
||||
public function __invoke(Request $request, Response $response, View $view, Container $container) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'nosotros.json'
|
||||
]);
|
||||
$nosotros = json_decode(trim(file_get_contents($filename)));
|
||||
$min = 200;
|
||||
$max_phrase = 50;
|
||||
if (strlen($nosotros) > $min) {
|
||||
$half = strlen($nosotros) / 2;
|
||||
$pos = mb_strpos($nosotros, '.', $half); // Siguiente punto despues de la mitad
|
||||
if ($pos > $half + $max_phrase) { // Si está muy lejos de la mitad busca otra posicion
|
||||
$pos = mb_strrpos($nosotros, '.', -$half) + 1; // Punto antes de la mitad
|
||||
}
|
||||
$nosotros = $this->str_split_unicode($nosotros, $pos);
|
||||
if (count($nosotros) > 2) {
|
||||
$s1 = array_shift($nosotros);
|
||||
$nosotros = [$s1, implode('', $nosotros)];
|
||||
}
|
||||
} else {
|
||||
$nosotros = [$nosotros];
|
||||
}
|
||||
return $view->render($response, 'nosotros', compact('nosotros'));
|
||||
}
|
||||
protected function str_split_unicode($str, $l = 0) {
|
||||
if ($l > 0) {
|
||||
$ret = array();
|
||||
$len = mb_strlen($str, "UTF-8");
|
||||
for ($i = 0; $i < $len; $i += $l) {
|
||||
$ret[] = mb_substr($str, $i, $l, "UTF-8");
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
return preg_split("//u", $str, -1, PREG_SPLIT_NO_EMPTY);
|
||||
}
|
||||
}
|
70
common/Controller/Web/Productos.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Controller\Web;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\KI\Common\Alias\View;
|
||||
use ProVM\Common\Factory\Model as ModelFactory;
|
||||
use ProVM\KI\Producto;
|
||||
|
||||
class Productos {
|
||||
public function __invoke(Request $request, Response $response, Container $container, View $view): Response {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'segmentos.json'
|
||||
]);
|
||||
$segmentos = json_decode(trim(file_get_contents($filename)));
|
||||
return $view->render($response, 'productos.list', compact('segmentos'));
|
||||
}
|
||||
public function show(Request $request, Response $response, View $view, ModelFactory $factory, $producto): Response {
|
||||
$producto = $factory->find(Producto::class)->where([['id', $producto]])->one();
|
||||
return $view->render($response, 'productos.show', compact('producto'));
|
||||
}
|
||||
public function segmento(Request $request, Response $response, ModelFactory $factory, $segmento): Response {
|
||||
$productos = $factory->find(Producto::class);
|
||||
if ($segmento != 'todo') {
|
||||
$productos = $productos->where([['segmento', ucwords($segmento)]]);
|
||||
}
|
||||
$productos = $productos->many();
|
||||
$output = [
|
||||
'information' => [
|
||||
'segmento' => $segmento
|
||||
],
|
||||
'productos' => array_map(function($item) {
|
||||
return $item->id;
|
||||
}, $productos)
|
||||
];
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
public function destacados(Request $request, Response $response, Container $container, $page): Response {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.data'),
|
||||
'destacados.json'
|
||||
]);
|
||||
$destacados = json_decode(trim(file_get_contents($filename)));
|
||||
$max = ceil(count($destacados) / 4);
|
||||
$output = [
|
||||
'information' => [
|
||||
'page' => $page
|
||||
],
|
||||
'destacados' => []
|
||||
];
|
||||
$n = min(4, count($destacados));
|
||||
for ($i = ($page - 1) * $n; $i < $page * $n; $i ++) {
|
||||
$output['destacados'] []= $destacados[$i];
|
||||
}
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
public function ficha(Request $request, Response $response, View $view, ModelFactory $factory, $producto): Response {
|
||||
$producto = $factory->find(Producto::class)->where([['id', $producto]])->one();
|
||||
$properties = $producto->getFicha();
|
||||
return $view->render($response, 'productos.ficha', compact('producto', 'properties'));
|
||||
}
|
||||
}
|
102
common/Implementation/Mailer.php
Normal file
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Implementation;
|
||||
|
||||
use PHPMailer\PHPMailer\PHPMailer as BaseMailer;
|
||||
use PHPMailer\PHPMailer\SMTP;
|
||||
use ProVM\KI\Common\Alias\Mailer as MailerInterface;
|
||||
use ProVM\KI\Common\Alias\Message;
|
||||
|
||||
class Mailer implements MailerInterface {
|
||||
protected $host;
|
||||
protected $port;
|
||||
protected $user;
|
||||
protected $is_secure = false;
|
||||
public function __construct(array $settings) {
|
||||
if (!isset($settings['host'])) {
|
||||
throw new \Exception('Host is missing in ' . get_called_class());
|
||||
}
|
||||
$this->host = $settings['host'];
|
||||
if (!isset($settings['username'])) {
|
||||
throw new \Exception('User name is missing in ' . get_called_class());
|
||||
}
|
||||
$this->user = (object) ['name' => null, 'password' => null];
|
||||
$this->user->name = $settings['username'];
|
||||
if (!isset($settings['password'])) {
|
||||
throw new \Exception('User password is missing in ' . get_called_class());
|
||||
}
|
||||
$this->user->password = $settings['password'];
|
||||
$this->port = 25;
|
||||
if (isset($settings['secure']) and $settings['secure'] == 'ssl') {
|
||||
$this->is_secure = true;
|
||||
$this->port = 465;
|
||||
}
|
||||
if (isset($settings['port'])) {
|
||||
$this->port = $settings['port'];
|
||||
}
|
||||
}
|
||||
public function isSecure(): bool {
|
||||
return $this->is_secure;
|
||||
}
|
||||
public function send(Message $message): bool {
|
||||
$mailer = new BaseMailer();
|
||||
$mailer->isSMTP();
|
||||
//$mailer->SMTPDebug = SMTP::DEBUG_SERVER;
|
||||
$mailer->Host = $this->host;
|
||||
$mailer->SMTPAuth = true;
|
||||
$mailer->Username = $this->user->name;
|
||||
$mailer->Password = $this->user->password;
|
||||
$mailer->Port = $this->port;
|
||||
if ($this->isSecure()) {
|
||||
$mailer->SMTPSecure = BaseMailer::ENCRYPTION_STARTTLS;
|
||||
}
|
||||
|
||||
try {
|
||||
$from = $message->getFrom();
|
||||
if ($from->name !== null) {
|
||||
$mailer->setFrom($from->email, $from->name);
|
||||
} else {
|
||||
$mailer->setFrom($from->email);
|
||||
}
|
||||
foreach ($message->getTo() as $to) {
|
||||
if ($to->name !== null) {
|
||||
$mailer->addAddress($to->email, $to->name);
|
||||
} else {
|
||||
$mailer->addAddress($to->email);
|
||||
}
|
||||
}
|
||||
$ccs = $message->getCc();
|
||||
if (!empty($ccs)) {
|
||||
foreach ($ccs as $cc) {
|
||||
if ($cc->name !== null) {
|
||||
$mailer->addCC($cc->email, $cc->name);
|
||||
} else {
|
||||
$mailer->addCC($cc->email);
|
||||
}
|
||||
}
|
||||
}
|
||||
$bccs = $message->getBcc();
|
||||
if (!empty($bccs)) {
|
||||
foreach ($bccs as $bcc) {
|
||||
if ($bcc->name !== null) {
|
||||
$mailer->addBCC($bcc->email, $bcc->name);
|
||||
} else {
|
||||
$mailer->addBCC($bcc->email);
|
||||
}
|
||||
}
|
||||
}
|
||||
$mailer->Subject = $message->getSubject();
|
||||
if ($message->isHtml()) {
|
||||
$mailer->Body = $message->getHtmlBody();
|
||||
$mailer->isHTML();
|
||||
$mailer->AltBody = $message->getBody();
|
||||
} else {
|
||||
$mailer->Body = $message->getBody();
|
||||
}
|
||||
|
||||
$mailer->send();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
100
common/Implementation/Message.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Implementation;
|
||||
|
||||
use ProVM\KI\Common\Alias\Message as MessageInterface;
|
||||
|
||||
class Message implements MessageInterface {
|
||||
protected $from;
|
||||
public function setFrom(string $email, string $name = null): Message {
|
||||
$this->from = $this->formatEmail($email, $name);
|
||||
return $this;
|
||||
}
|
||||
public function getFrom() {
|
||||
return $this->from;
|
||||
}
|
||||
protected $reply_to;
|
||||
public function addReplyTo(string $email, string $name = null): Message {
|
||||
if ($this->reply_to === null) {
|
||||
$this->reply_to = [];
|
||||
}
|
||||
$this->reply_to []= $this->formatEmail($email, $name);
|
||||
return $this;
|
||||
}
|
||||
public function getReplyTo() {
|
||||
return $this->reply_to;
|
||||
}
|
||||
protected $subject;
|
||||
public function setSubject(string $subject): Message {
|
||||
$this->subject = $subject;
|
||||
return $this;
|
||||
}
|
||||
public function getSubject(): string {
|
||||
return $this->subject;
|
||||
}
|
||||
protected $to;
|
||||
public function addTo(string $email, string $name = null): Message {
|
||||
if ($this->to === null) {
|
||||
$this->to = [];
|
||||
}
|
||||
$this->to []= $this->formatEmail($email, $name);
|
||||
return $this;
|
||||
}
|
||||
public function getTo(): array {
|
||||
return $this->to;
|
||||
}
|
||||
protected $cc;
|
||||
public function addCc(string $email, string $name = null): Message {
|
||||
if ($this->cc === null) {
|
||||
$this->cc = [];
|
||||
}
|
||||
$this->cc []= $this->formatEmail($email, $name);
|
||||
return $this;
|
||||
}
|
||||
public function getCc() {
|
||||
return $this->cc;
|
||||
}
|
||||
protected $bcc;
|
||||
public function addBcc(string $email, string $name = null): Message {
|
||||
if ($this->bcc === null) {
|
||||
$this->bcc = [];
|
||||
}
|
||||
$this->bcc []= $this->formatEmail($email, $name);
|
||||
return $this;
|
||||
}
|
||||
public function getBcc() {
|
||||
return $this->bcc;
|
||||
}
|
||||
protected $body;
|
||||
public function setBody(string $body): Message {
|
||||
$this->body = $body;
|
||||
return $this;
|
||||
}
|
||||
public function getBody(): string {
|
||||
return $this->body;
|
||||
}
|
||||
protected $html;
|
||||
protected $is_html = false;
|
||||
public function setHtmlBody(string $body): Message {
|
||||
$this->html = $body;
|
||||
$this->is_html = true;
|
||||
return $this;
|
||||
}
|
||||
public function getHtmlBody(): string {
|
||||
return $this->html;
|
||||
}
|
||||
public function isHtml(): bool {
|
||||
return $this->is_html;
|
||||
}
|
||||
|
||||
protected function formatEmail(string $email, string $name = null) {
|
||||
if (!$name && preg_match('#^(.+) +<(.*)>$#D', $email, $matches)) {
|
||||
[, $name, $email] = $matches;
|
||||
$name = stripslashes($name);
|
||||
$tmp = substr($name, 1, -1);
|
||||
if ($name === '"' . $tmp . '"') {
|
||||
$name = $tmp;
|
||||
}
|
||||
}
|
||||
return (object) ['name' => $name, 'email' => $email];
|
||||
}
|
||||
}
|
7
common/Implementation/View.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Implementation;
|
||||
|
||||
use Slim\Views\Blade as BaseView;
|
||||
use ProVM\KI\Common\Alias\View as ViewInterface;
|
||||
|
||||
class View extends BaseView implements ViewInterface {}
|
56
common/Middleware/Visits.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Middleware;
|
||||
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Server\RequestHandlerInterface as Handler;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class Visits {
|
||||
protected $filename;
|
||||
protected $time;
|
||||
public function __construct(string $filename, int $visit_time) {
|
||||
$this->filename = $filename;
|
||||
$this->time = $visit_time;
|
||||
}
|
||||
public function __invoke(Request $request, Handler $handler): Response {
|
||||
$params = $request->getServerParams();
|
||||
$ip = $params['REMOTE_ADDR'];
|
||||
$fwd = 0;
|
||||
$login = Carbon::now();
|
||||
if (isset($params['HTTP_X_FORWARDED_FOR'])) {
|
||||
$fwd = $params['HTTP_X_FORWARDED_FOR'];
|
||||
}
|
||||
if (!file_exists($this->filename)) {
|
||||
$file = (object) [
|
||||
'visits' => 0,
|
||||
'ips' => []
|
||||
];
|
||||
} else {
|
||||
$file = json_decode(trim(file_get_contents($this->filename)));
|
||||
}
|
||||
$found = false;
|
||||
foreach ($file->ips as $i => $ipd) {
|
||||
if ($ipd->ip == $ip and $ipd->fwd == $fwd) {
|
||||
$t = Carbon::parse($ipd->time);
|
||||
if ($t->diffInSeconds($login) > $this->time) {
|
||||
$file->ips[$i]->time = $login->format('Y-m-d H:i:s');
|
||||
$file->visits ++;
|
||||
}
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
$file->ips []= (object) [
|
||||
'ip' => $ip,
|
||||
'fwd' => $fwd,
|
||||
'time' => $login->format('Y-m-d H:i:s')
|
||||
];
|
||||
$file->visits ++;
|
||||
}
|
||||
file_put_contents($this->filename, json_encode($file, \JSON_PRETTY_PRINT));
|
||||
$response = $handler->handle($request);
|
||||
return $response;
|
||||
}
|
||||
}
|
57
common/Service/Indicadores.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
namespace ProVM\KI\Common\Service;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class Indicadores {
|
||||
//protected $cliente;
|
||||
protected $base_uri;
|
||||
|
||||
public function __construct(string $indicadores_url) {
|
||||
$this->base_uri = $indicadores_url;
|
||||
}
|
||||
public function get(string $indicador, \DateTime $fecha) {
|
||||
$url = implode('/', [
|
||||
$this->base_uri,
|
||||
$indicador,
|
||||
$fecha->format('Y')
|
||||
]);
|
||||
if ( ini_get('allow_url_fopen') ) {
|
||||
$json = file_get_contents($url);
|
||||
} else {
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
$json = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
}
|
||||
$data = json_decode($json);
|
||||
$output = (object) [
|
||||
'valor' => 0,
|
||||
'fecha' => $fecha->format('d-m-Y')
|
||||
];
|
||||
if (isset($data->serie[0])) {
|
||||
$n = 0;
|
||||
foreach ($data->serie as $i => $d) {
|
||||
if (Carbon::parse($d->fecha)->format('d-m-Y') == $fecha->format('d-m-Y')) {
|
||||
$n = $i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$output->fecha = Carbon::parse($data->serie[$n]->fecha)->format('d-m-Y');
|
||||
$output->valor = $data->serie[$n]->valor;
|
||||
switch ($data->unidad_medida) {
|
||||
case 'Pesos':
|
||||
$output->valor = '$ ' . number_format($output->valor, 2, ',', '.');
|
||||
break;
|
||||
case 'Porcentaje':
|
||||
$output->valor = number_format($output->valor, 2, ',', '.') . '%';
|
||||
break;
|
||||
case 'Dólar':
|
||||
$output->valor = 'US$ ' . number_format($output->valor, 2, ',', '.');
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
34
composer.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "provm/capitalinvestments",
|
||||
"description": "Web para Capital Investments",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"slim/slim": "^4.5",
|
||||
"php-di/slim-bridge": "^3.0",
|
||||
"rubellum/slim-blade-view": "^0.1.1",
|
||||
"nyholm/psr7": "^1.2",
|
||||
"nyholm/psr7-server": "^0.4.1",
|
||||
"nesbot/carbon": "^2.32",
|
||||
"guzzlehttp/guzzle": "^6.5",
|
||||
"phpmailer/phpmailer": "^6.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5",
|
||||
"kint-php/kint": "^3.3",
|
||||
"joshtronic/php-loremipsum": "^1.0"
|
||||
},
|
||||
"license": "UNLICENSED",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Aldarien",
|
||||
"email": "aldarien85@gmail.com"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ProVM\\KI\\Common\\": "common",
|
||||
"ProVM\\KI\\": "src",
|
||||
"ProVM\\Common\\": "provm/common"
|
||||
}
|
||||
}
|
||||
}
|
163
provm/common/Factory/Model.php
Normal file
@ -0,0 +1,163 @@
|
||||
<?php
|
||||
namespace ProVM\Common\Factory;
|
||||
|
||||
use ProVM\Common\Implementation\Model as BaseModel;
|
||||
|
||||
class Model {
|
||||
protected $data_folder;
|
||||
protected $image_folder;
|
||||
public function __construct(string $data_folder, string $image_folder) {
|
||||
$this->data_folder = $data_folder;
|
||||
$this->image_folder = $image_folder;
|
||||
}
|
||||
|
||||
public function getFolder(): string {
|
||||
return $this->data_folder;
|
||||
}
|
||||
public function get($file) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$this->data_folder,
|
||||
$file
|
||||
]);
|
||||
return json_decode(trim(file_get_contents($filename)));
|
||||
}
|
||||
protected function reset() {
|
||||
$this->class = null;
|
||||
$this->conditions = null;
|
||||
$this->limits = null;
|
||||
}
|
||||
protected $class;
|
||||
public function find(string $class): Model {
|
||||
if (!class_exists($class) or !is_subclass_of($class, \ProVM\Common\Implementation\Model::class)) {
|
||||
throw new \InvalidArgumentException($class . ' is not defined.');
|
||||
}
|
||||
$this->reset();
|
||||
$this->class = $class;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* JSON
|
||||
* [
|
||||
* {
|
||||
* <field>,
|
||||
* <value>,
|
||||
* <operator>
|
||||
* },
|
||||
* ...
|
||||
* ]
|
||||
* @var array
|
||||
*/
|
||||
protected $conditions;
|
||||
public function where(array $conditions): Model {
|
||||
if ($this->conditions === null) {
|
||||
$this->conditions = [];
|
||||
}
|
||||
foreach ($conditions as $condition) {
|
||||
$c = ['field' => $condition[0], 'value' => $condition[1], 'operator' => '=='];
|
||||
if (isset($condition[2])) {
|
||||
$c['operator'] = $condition[2];
|
||||
}
|
||||
$this->conditions []= (object) $c;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
protected function parseWhere(array $data): array {
|
||||
if ($this->conditions === null) {
|
||||
return $data;
|
||||
}
|
||||
foreach ($this->conditions as $condition) {
|
||||
$str = implode(' ', [
|
||||
$condition->field,
|
||||
$condition->operator,
|
||||
(is_string($condition->value)) ? "'" . $condition->value . "'" : $condition->value
|
||||
]);
|
||||
return array_filter($data, function($item) use ($str) {
|
||||
$bool = true;
|
||||
eval("\$bool = (\$item->" . $str . ');');
|
||||
return $bool;
|
||||
});
|
||||
}
|
||||
}
|
||||
protected $limits;
|
||||
public function limit(int $limit): Model {
|
||||
if ($this->limits === null) {
|
||||
$this->limits = (object) ['limit' => null, 'offset' => 0];
|
||||
}
|
||||
$this->limits->limit = $limit;
|
||||
return $this;
|
||||
}
|
||||
public function offset(int $offset): Model {
|
||||
if ($this->limits === null) {
|
||||
$this->limits = (object) ['limit' => null, 'offset' => 0];
|
||||
}
|
||||
$this->limits->offset = $offset;
|
||||
return $this;
|
||||
}
|
||||
protected function parseLimits(array $data): array {
|
||||
if ($this->limits === null or $this->limits->limit === null) {
|
||||
return $data;
|
||||
}
|
||||
return array_slice($data, $this->limits->offset, $this->limits->limit);
|
||||
}
|
||||
protected function getFilename(): string {
|
||||
$data = explode("\\", $this->class);
|
||||
return implode(DIRECTORY_SEPARATOR, [
|
||||
$this->data_folder,
|
||||
str_replace(' ', '_', mb_strtolower(array_pop($data))) . 's.json'
|
||||
]);
|
||||
}
|
||||
protected function build(): array {
|
||||
$filename = $this->getFilename();
|
||||
$data = json_decode(trim(file_get_contents($filename)));
|
||||
$data = $this->parseWhere($data);
|
||||
$data = $this->parseLimits($data);
|
||||
return $data;
|
||||
}
|
||||
protected function fillObject($data): BaseModel {
|
||||
$class = $this->class;
|
||||
if (strpos($class, 'Producto') !== false) {
|
||||
$segmento = str_replace(' ', '', $data->segmento);
|
||||
$class = implode("\\", [
|
||||
$class . 's',
|
||||
rtrim($segmento, 's')
|
||||
]);
|
||||
}
|
||||
$obj = new $class;
|
||||
$obj->map($data);
|
||||
$obj->setFactory($this);
|
||||
$obj->setImageFolder($this->image_folder);
|
||||
return $obj;
|
||||
}
|
||||
public function one(): BaseModel {
|
||||
$data = $this->limit(1)->build();
|
||||
$item = $data[0];
|
||||
$obj = $this->fillObject($item);
|
||||
return $obj;
|
||||
}
|
||||
public function many(): array {
|
||||
$data = $this->build();
|
||||
foreach ($data as &$item) {
|
||||
$obj = $this->fillObject($item);
|
||||
$item = $obj;
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
public function array(): array {
|
||||
return $this->build();
|
||||
}
|
||||
|
||||
public function create(string $class, $data) {
|
||||
if (strpos($class, 'Producto') !== false) {
|
||||
$segmento = str_replace(' ', '', $data->segmento);
|
||||
$class = implode("\\", [
|
||||
$class . 's',
|
||||
rtrim($segmento, 's')
|
||||
]);
|
||||
}
|
||||
$obj = new $class;
|
||||
$obj->map($data);
|
||||
$obj->setFactory($this);
|
||||
$obj->setImageFolder($this->image_folder);
|
||||
return $obj;
|
||||
}
|
||||
}
|
67
provm/common/Implementation/Logger.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
namespace ProVM\Common\Implementation;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\LogLevel;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class Logger implements LoggerInterface {
|
||||
protected $output_file;
|
||||
public function __construct(string $filename) {
|
||||
if (!file_exists($filename)) {
|
||||
$f = fopen($filename, 'c');
|
||||
fclose($f);
|
||||
}
|
||||
if (!file_exists($filename)) {
|
||||
throw new \Exception('Can not create log file.');
|
||||
}
|
||||
$this->output_file = $filename;
|
||||
}
|
||||
public function emergency($message, array $context = []) {
|
||||
return $this->log(LogLevel::EMERGENCY, $message, $context);
|
||||
}
|
||||
public function alert($message, array $context = []) {
|
||||
return $this->log(LogLevel::ALERT, $message, $context);
|
||||
}
|
||||
public function critical($message, array $context = []) {
|
||||
return $this->log(LogLevel::CRITICAL, $message, $context);
|
||||
}
|
||||
public function error($message, array $context = []) {
|
||||
return $this->log(LogLevel::ERROR, $message, $context);
|
||||
}
|
||||
public function warning($message, array $context = []) {
|
||||
return $this->log(LogLevel::WARNING, $message, $context);
|
||||
}
|
||||
public function notice($message, array $context = []) {
|
||||
return $this->log(LogLevel::NOTICE, $message, $context);
|
||||
}
|
||||
public function info($message, array $context = []) {
|
||||
return $this->log(LogLevel::INFO, $message, $context);
|
||||
}
|
||||
public function debug($message, array $context = []) {
|
||||
return $this->log(LogLevel::DEBUG, $message, $context);
|
||||
}
|
||||
public function log($level, $message, array $context = []) {
|
||||
$refl = new \ReflectionClass(LogLevel::class);
|
||||
$levels = $refl->getConstants();
|
||||
if (array_search($level, array_values($levels)) === false) {
|
||||
throw new \InvalidArgumentException('Invalid log level.');
|
||||
}
|
||||
|
||||
$f = Carbon::now('America/Santiago');
|
||||
$output = [
|
||||
'time' => $f->format('Y-m-d H:i:s,v'),
|
||||
'message' => $message
|
||||
];
|
||||
if (count($context) > 0) {
|
||||
$output['context'] = $context;
|
||||
}
|
||||
|
||||
$data = json_decode(trim(file_get_contents($this->output_file)));
|
||||
if ($data === null) {
|
||||
$data = [];
|
||||
}
|
||||
$data []= $output;
|
||||
file_put_contents($this->output_file, json_encode($data, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
}
|
60
provm/common/Implementation/Model.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
namespace ProVM\Common\Implementation;
|
||||
|
||||
use ProVM\Common\Factory\Model as ModelFactory;
|
||||
|
||||
abstract class Model implements \JsonSerializable {
|
||||
abstract public function map($data): Model;
|
||||
protected $factory;
|
||||
public function setFactory(ModelFactory $factory) {
|
||||
$this->factory = $factory;
|
||||
}
|
||||
public function __get(string $name) {
|
||||
if (!property_exists($this, $name)) {
|
||||
throw new \InvalidArgumentException($name . ' is not a property of ' . get_called_class());
|
||||
}
|
||||
return $this->$name;
|
||||
}
|
||||
public function save() {
|
||||
$filename = $this->getFilename();
|
||||
$data = json_decode(trim(file_Get_contents($filename)));
|
||||
if ($this->id === null) {
|
||||
$this->id = array_reduce($data, function($max, $item) {
|
||||
return (($max < $item->id) ? $item->id : $max);
|
||||
}, 0) + 1;
|
||||
$data []= $this->jsonSerialize();
|
||||
} else {
|
||||
foreach ($data as $i => $item) {
|
||||
if ($item->id == $this->id) {
|
||||
$data[$i] = $this->jsonSerialize();
|
||||
}
|
||||
}
|
||||
}
|
||||
$data = array_values($data);
|
||||
return (file_put_contents($filename, json_encode($data, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE)) !== false);
|
||||
}
|
||||
public function delete() {
|
||||
$filename = $this->getFilename();
|
||||
$data = json_decode(trim(file_Get_contents($filename)));
|
||||
foreach ($data as $i => $item) {
|
||||
if ($item->id == $this->id) {
|
||||
unset($data[$i]);
|
||||
}
|
||||
}
|
||||
$data = array_values($data);
|
||||
return (file_put_contents($filename, json_encode($data, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE)) !== false);
|
||||
}
|
||||
protected function getFilename(): string {
|
||||
$data = explode("\\", get_called_class());
|
||||
$folder = $this->factory->getFolder();
|
||||
$class = array_pop($data);
|
||||
$productos = ['Bodega', 'Oficina', 'Retail', 'Terreno'];
|
||||
if (array_search($class, $productos) !== false) {
|
||||
$class = 'Producto';
|
||||
}
|
||||
return implode(DIRECTORY_SEPARATOR, [
|
||||
$folder,
|
||||
str_replace(' ', '_', mb_strtolower($class)) . 's.json'
|
||||
]);
|
||||
}
|
||||
}
|
4
public/.htaccess
Normal file
@ -0,0 +1,4 @@
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^ index.php [QSA,L]
|
BIN
public/assets/images/banner.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
public/assets/images/default.jpg
Normal file
After Width: | Height: | Size: 992 KiB |
BIN
public/assets/images/desarrollo inmobiliario.jpg
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
public/assets/images/edificio optimus1/01_Exterior.jpg
Normal file
After Width: | Height: | Size: 2.1 MiB |
BIN
public/assets/images/edificio optimus1/02_Exterior.jpg
Normal file
After Width: | Height: | Size: 992 KiB |
BIN
public/assets/images/edificio optimus1/03_Acceso.jpg
Normal file
After Width: | Height: | Size: 2.9 MiB |
BIN
public/assets/images/edificio optimus1/04_Piscina.jpg
Normal file
After Width: | Height: | Size: 3.9 MiB |
BIN
public/assets/images/edificio optimus1/05_Sala_Multiuso.jpg
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
public/assets/images/edificio optimus1/06_Quincho_Grande.jpg
Normal file
After Width: | Height: | Size: 1.5 MiB |
BIN
public/assets/images/edificio optimus1/08_Quincho_privado.jpg
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
public/assets/images/indicadores.jpg
Normal file
After Width: | Height: | Size: 560 KiB |
BIN
public/assets/images/industrial.jpg
Normal file
After Width: | Height: | Size: 352 KiB |
BIN
public/assets/images/logo.png
Normal file
After Width: | Height: | Size: 153 KiB |
BIN
public/assets/images/loteos y parcelas.jpg
Normal file
After Width: | Height: | Size: 158 KiB |
BIN
public/assets/images/oficinas.jpg
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
public/assets/images/retail.jpg
Normal file
After Width: | Height: | Size: 1.5 MiB |
5
public/assets/styles/admin.css
Normal file
@ -0,0 +1,5 @@
|
||||
#admin { background-color: #f4f4f4; padding-top: 3rem; padding-bottom: 2rem; }
|
||||
|
||||
#admin .button { background-color: #429ab7; color: white; }
|
||||
|
||||
#admin .container > .header, #admin .container > .grid > .column > .header, #admin .container > .grid > .row > .column > .header { padding-bottom: 2rem; }
|
14
public/assets/styles/admin.map
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "admin.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/admin.scss",
|
||||
"../../../resources/assets/sass/_pallete.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"@import 'pallete';\r\n\r\n#admin {\r\n background-color: $gris-claro;\r\n padding-top: 3rem;\r\n padding-bottom: 2rem;\r\n\r\n .button {\r\n background-color: $marca;\r\n color: white;\r\n }\r\n\r\n .container>.header, .container>.grid>.column>.header, .container>.grid>.row>.column>.header {\r\n padding-bottom: 2rem;\r\n }\r\n}\r\n",
|
||||
"$marca: #429ab7;\r\n$gris-oscuro: #808284;\r\n$gris-medio: #a7a9ab;\r\n$gris-claro: #f4f4f4;\r\n$azul-oscuro: #0d103c;\r\n"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ";AAEA,AAAA,MAAM,CAAC;EACL,gBAAgB,ECAL,OAAO;EDClB,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;CAUrB;;;AAbD,AAKE,MALI,CAKJ,OAAO,CAAC;EACN,gBAAgB,ECRZ,OAAO;EDSX,KAAK,EAAE,KAAK;CACb;;;AARH,AAUE,MAVI,CAUJ,UAAU,GAAC,OAAO,EAVpB,MAAM,CAUgB,UAAU,GAAC,KAAK,GAAC,OAAO,GAAC,OAAO,EAVtD,MAAM,CAUkD,UAAU,GAAC,KAAK,GAAC,IAAI,GAAC,OAAO,GAAC,OAAO,CAAC;EAC1F,cAAc,EAAE,IAAI;CACrB"
|
||||
}
|
5
public/assets/styles/faqs.css
Normal file
@ -0,0 +1,5 @@
|
||||
#faq { background-color: #a7a9ab; color: white; padding-top: 3rem; padding-bottom: 4rem; }
|
||||
|
||||
#faq .header, #faq .title, #faq .content { color: inherit; }
|
||||
|
||||
#faq .accordion { font-size: 1.2rem; }
|
14
public/assets/styles/faqs.map
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "faqs.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/faqs.scss",
|
||||
"../../../resources/assets/sass/_pallete.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"@import 'pallete';\r\n\r\n#faq {\r\n background-color: $gris-medio;\r\n color: white;\r\n\r\n padding-top: 3rem;\r\n padding-bottom: 4rem;\r\n\r\n .header, .title, .content {\r\n color: inherit;\r\n }\r\n}\r\n",
|
||||
"$marca: #429ab7;\r\n$gris-oscuro: #808284;\r\n$gris-medio: #a7a9ab;\r\n$gris-claro: #f4f4f4;\r\n$azul-oscuro: #0d103c;\r\n"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ";AAEA,AAAA,IAAI,CAAC;EACH,gBAAgB,ECDL,OAAO;EDElB,KAAK,EAAE,KAAK;EAEZ,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;CAKrB;;;AAVD,AAOE,IAPE,CAOF,OAAO,EAPT,IAAI,CAOO,MAAM,EAPjB,IAAI,CAOe,QAAQ,CAAC;EACxB,KAAK,EAAE,OAAO;CACf"
|
||||
}
|
51
public/assets/styles/home.css
Normal file
@ -0,0 +1,51 @@
|
||||
.header { color: inherit !important; font-family: inherit !important; }
|
||||
|
||||
#banner { padding-top: 12rem; padding-bottom: 12rem; background-color: rgba(0, 0, 0, 0.6); background-position: center; background-repeat: no-repeat; background-size: 1920px auto; background-blend-mode: multiply; }
|
||||
|
||||
#banner #mensaje { margin-bottom: 2rem; color: white; font-weight: 300; font-size: 1.6rem; }
|
||||
|
||||
#banner #mensaje .header { font-weight: 900 !important; font-size: 1.9rem; }
|
||||
|
||||
#banner .button { font-family: inherit; font-weight: 900; background-color: #0d103c !important; color: white; }
|
||||
|
||||
#aviso { color: white; background-color: #429ab7; padding-top: 5rem; padding-bottom: 3rem; font-size: 1.6rem; font-weight: 300; }
|
||||
|
||||
#aviso .header { font-weight: 900; }
|
||||
|
||||
#destacados { padding-top: 3rem; padding-bottom: 5rem; background-color: #a7a9ab; min-height: 40rem; }
|
||||
|
||||
#destacados .header { color: #0d103c !important; font-weight: 600; }
|
||||
|
||||
#destacados .titulo { font-size: 1.6rem; font-weight: 900; padding-bottom: 1rem; }
|
||||
|
||||
#destacados .ficha { border-radius: 0; border: 0; box-shadow: none !important; }
|
||||
|
||||
#destacados .ficha .content .segment { background-color: #f4f4f4 !important; padding-top: 0 !important; padding-bottom: 0 !important; font-weight: 300; }
|
||||
|
||||
#destacados .ficha .content .button { font-family: inherit !important; font-weight: 900; padding-top: 0.3rem !important; padding-bottom: 0.3rem !important; background-color: #0d103c !important; }
|
||||
|
||||
#destacados .ficha .image { height: 11rem; overflow: hidden; display: flex; align-items: center; }
|
||||
|
||||
#destacados .ficha .image img { width: 100%; vertical-align: middle; }
|
||||
|
||||
#destacados .ficha .overlay { background-color: #0d103c; color: white; opacity: 0.8; text-align: center; position: absolute; z-index: 999; top: 1.9rem; right: -2.2rem; width: 10rem; padding-top: .3rem; padding-bottom: .3rem; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); }
|
||||
|
||||
#destacados .active { font-weight: 900; }
|
||||
|
||||
#segmentos { padding-top: 4rem; padding-bottom: 4rem; }
|
||||
|
||||
#segmentos .titulo { color: #0d103c !important; }
|
||||
|
||||
#segmentos .grid .basic.segment .header { margin-top: 1rem; }
|
||||
|
||||
#resumen { background-position: center; background-position-y: -60rem; background-repeat: no-repeat; background-size: 2600px auto; min-height: 20rem; padding-top: 3rem; }
|
||||
|
||||
#resumen .inverted.circular.segment { background-color: rgba(0, 0, 0, 0.8); }
|
||||
|
||||
#indicadores { background-color: #a7a9ab; padding-top: 1rem; padding-bottom: 1rem; height: 4rem; }
|
||||
|
||||
#indicadores .slideshow { overflow: hidden; text-align: center; height: 2rem; }
|
||||
|
||||
#indicadores .slideshow .slide { display: inline; float: left; color: white; padding: 0; margin-right: 1rem; text-align: center; padding-left: 1rem; padding-right: 2rem; border-right: thin solid black; }
|
||||
|
||||
#indicadores .slideshow .slide .value:last-child { padding-left: 0.3rem; font-weight: 100 !important; }
|
7
public/assets/styles/home.css.map
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"mappings": "AAAA,OAAQ;EACN,KAAK,EAAE,kBAAkB;EACzB,WAAW,EAAE,kBAAkB;;AAGjC,OAAQ;EACN,WAAW,EAAE,KAAK;EAClB,cAAc,EAAE,KAAK;EACrB,gBAAgB,EAAE,kBAAkB;EACpC,mBAAmB,EAAE,MAAM;EAC3B,iBAAiB,EAAE,SAAS;EAC5B,eAAe,EAAE,WAAW;EAC5B,qBAAqB,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AClB,OAAO,EAAE,GAAG;MACZ,GAAG,EAAE,MAAM;MACX,KAAK,EAAE,OAAO;MACd,KAAK,EAAE,KAAK;MACZ,WAAW,EAAE,KAAK;MAClB,cAAc,EAAE,KAAK;MACrB,iBAAiB,EAAE,aAAa;MAChC,cAAc,EAAE,aAAa;MAC7B,aAAa,EAAE,aAAa;MAC5B,YAAY,EAAE,aAAa;MAC3B,SAAS,EAAE,aAAa;EAG5B,mBAAQ;IACN,WAAW,EAAE,GAAG;;AAIpB,UAAW;EACT,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;;AAGtB,QAAS;EACP,mBAAmB,EAAE,MAAM;EAC3B,qBAAqB,EAAE,MAAM;EAC7B,iBAAiB,EAAE,SAAS;EAC5B,eAAe,EAAE,WAAW;EAC5B,UAAU,EAAE,KAAK;EACjB,WAAW,EAAE,IAAI;EAEjB,mCAA2B;IACzB,gBAAgB,EAAE,kBAAkB;;AAIxC,YAAa;EACX,gBAAgB,EAAE,OAAO;EACzB,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;EACpB,UAAU,EAAE,IAAI;EAEhB,uBAAW;IACT,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,IAAI;IAEZ,8BAAO;MACL,OAAO,EAAE,YAAY;MACrB,KAAK,EAAE,IAAI;MACX,gBAAgB,EAAE,KAAK;MACvB,OAAO,EAAE,CAAC;MACV,MAAM,EAAE,IAAI;MACZ,KAAK,EAAE,eAAe;MACtB,WAAW,EAAE,KAAK;MAClB,cAAc,EAAE,KAAK;MACrB,UAAU,EAAE,MAAM",
|
||||
"sources": ["../../../resources/assets/sass/home.scss"],
|
||||
"names": [],
|
||||
"file": "home.css"
|
||||
}
|
14
public/assets/styles/home.map
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "home.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/home.scss",
|
||||
"../../../resources/assets/sass/_pallete.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"@import 'pallete';\r\n\r\n.header {\r\n color: inherit !important;\r\n font-family: inherit !important;\r\n}\r\n\r\n#banner {\r\n padding-top: 12rem;\r\n padding-bottom: 12rem;\r\n background-color: rgba(0, 0, 0, 0.6);\r\n background-position: center;\r\n background-repeat: no-repeat;\r\n background-size: 1920px auto;\r\n background-blend-mode: multiply;\r\n\r\n #mensaje {\r\n margin-bottom: 2rem;\r\n color: white;\r\n font-weight: 300;\r\n font-size: 1.6rem;\r\n\r\n .header {\r\n font-weight: 900 !important;\r\n font-size: 1.9rem;\r\n }\r\n }\r\n .button {\r\n font-family: inherit;\r\n font-weight: 900;\r\n background-color: $azul-oscuro !important;\r\n color: white;\r\n }\r\n}\r\n\r\n#aviso {\r\n color: white;\r\n background-color: $marca;\r\n padding-top: 5rem;\r\n padding-bottom: 3rem;\r\n font-size: 1.6rem;\r\n font-weight: 300;\r\n\r\n .header {\r\n font-weight: 900;\r\n }\r\n}\r\n\r\n#destacados {\r\n padding-top: 3rem;\r\n padding-bottom: 5rem;\r\n background-color: $gris-medio;\r\n min-height: 40rem;\r\n\r\n .header {\r\n color: $azul-oscuro !important;\r\n font-weight: 600;\r\n }\r\n .titulo {\r\n font-size: 1.6rem;\r\n font-weight: 900;\r\n padding-bottom: 1rem;\r\n }\r\n .ficha {\r\n border-radius: 0;\r\n border: 0;\r\n box-shadow: none !important;\r\n\r\n .content {\r\n .segment {\r\n background-color: $gris-claro !important;\r\n padding-top: 0 !important;\r\n padding-bottom: 0 !important;\r\n font-weight: 300;\r\n }\r\n .button {\r\n font-family: inherit !important;\r\n font-weight: 900;\r\n padding-top: 0.3rem !important;\r\n padding-bottom: 0.3rem !important;\r\n background-color: #0d103c !important;\r\n }\r\n }\r\n .image {\r\n height: 11rem;\r\n overflow: hidden;\r\n display: flex;\r\n align-items: center;\r\n img {\r\n width: 100%;\r\n vertical-align: middle;\r\n }\r\n }\r\n .overlay {\r\n background-color: #0d103c;\r\n color: white;\r\n opacity: 0.8;\r\n text-align: center;\r\n position: absolute;\r\n z-index: 999;\r\n top: 1.9rem;\r\n right: -2.2rem;\r\n width: 10rem;\r\n padding-top: .3rem;\r\n padding-bottom: .3rem;\r\n -webkit-transform: rotate(45deg);\r\n -moz-transform: rotate(45deg);\r\n -ms-transform: rotate(45deg);\r\n -o-transform: rotate(45deg);\r\n transform: rotate(45deg);\r\n }\r\n }\r\n .active {\r\n font-weight: 900;\r\n }\r\n}\r\n\r\n#segmentos {\r\n padding-top: 4rem;\r\n padding-bottom: 4rem;\r\n\r\n .titulo {\r\n color: $azul-oscuro !important;\r\n }\r\n\r\n .grid {\r\n .basic.segment {\r\n .header {\r\n margin-top: 1rem;\r\n }\r\n }\r\n }\r\n}\r\n\r\n#resumen {\r\n background-position: center;\r\n background-position-y: -60rem;\r\n background-repeat: no-repeat;\r\n background-size: 2600px auto;\r\n min-height: 20rem;\r\n padding-top: 3rem;\r\n\r\n .inverted.circular.segment {\r\n background-color: rgba(0, 0, 0, 0.8);\r\n }\r\n}\r\n\r\n#indicadores {\r\n background-color: $gris-medio;\r\n padding-top: 1rem;\r\n padding-bottom: 1rem;\r\n height: 4rem;\r\n\r\n .slideshow {\r\n overflow: hidden;\r\n text-align: center;\r\n height: 2rem;\r\n\r\n .slide {\r\n display: inline;\r\n float: left;\r\n color: white;\r\n padding: 0;\r\n margin-right: 1rem;\r\n text-align: center;\r\n\r\n .value:last-child {\r\n padding-left: 0.3rem;\r\n font-weight: 100 !important;\r\n }\r\n padding-left: 1rem;\r\n padding-right: 2rem;\r\n border-right: thin solid black;\r\n }\r\n }\r\n}\r\n",
|
||||
"$marca: #429ab7;\r\n$gris-oscuro: #808284;\r\n$gris-medio: #a7a9ab;\r\n$gris-claro: #f4f4f4;\r\n$azul-oscuro: #0d103c;\r\n"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ";AAEA,AAAA,OAAO,CAAC;EACN,KAAK,EAAE,kBAAkB;EACzB,WAAW,EAAE,kBAAkB;CAChC;;;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AC;EAChB,YAAY,EAAE,MAAM;EACpB,WAAW,EAAE,cAAc;CAC5B"
|
||||
}
|
43
public/assets/styles/main.css
Normal file
@ -0,0 +1,43 @@
|
||||
body { font-family: Roboto, sans-serif !important; }
|
||||
|
||||
.brand { color: #000070 !important; }
|
||||
|
||||
.inverted.brand { background-color: #000070 !important; color: white !important; }
|
||||
|
||||
.button.brand { box-shadow: none !important; }
|
||||
|
||||
.title.image { width: 15rem; }
|
||||
|
||||
header #franja { background-color: #707070; color: white !important; }
|
||||
|
||||
header #franja .menu { color: inherit !important; }
|
||||
|
||||
header #franja .menu .spacer { width: 3rem; }
|
||||
|
||||
header #franja .menu .input { height: 1.3rem !important; }
|
||||
|
||||
header .menu { margin-top: 0 !important; margin-bottom: 0 !important; }
|
||||
|
||||
header .menu .logo { font-size: 2rem; font-weight: 900; }
|
||||
|
||||
header .menu #productos_menu .menu { border: thin solid white; box-shadow: none; }
|
||||
|
||||
header .menu #productos_menu .menu .item:hover { background-color: #a7a9ab !important; }
|
||||
|
||||
a { color: inherit !important; }
|
||||
|
||||
.menu { font-family: inherit !important; }
|
||||
|
||||
.item { font-family: inherit !important; color: inherit !important; }
|
||||
|
||||
#contacto { background-color: #f4f4f4; padding-top: 3rem; padding-bottom: 3rem; }
|
||||
|
||||
#contacto .header { color: #0d103c !important; font-weight: 900; }
|
||||
|
||||
#contacto .form .button { background-color: #429ab7; color: white; }
|
||||
|
||||
footer { background-color: #429ab7; color: white; margin: 0; }
|
||||
|
||||
footer .menu { margin: 0 !important; }
|
||||
|
||||
footer .menu .label { background-color: white !important; color: #429ab7 !important; }
|
7
public/assets/styles/main.css.map
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"mappings": "AAAA,IAAK;EACH,WAAW,EAAE,6BAA6B;;AAG5C,MAAO;EACL,KAAK,EAAE,kBAAkB;;AAE3B,eAAgB;EACd,gBAAgB,EAAE,kBAAkB;EACpC,KAAK,EAAE,gBAAgB;;AAEzB,aAAc;EACZ,UAAU,EAAE,eAAe;;AAG7B,YAAa;EACX,KAAK,EAAE,KAAK;;AAIZ,cAAQ;EACN,gBAAgB,EAAE,OAAO;EACzB,KAAK,EAAE,gBAAgB;EAEvB,oBAAM;IACJ,KAAK,EAAE,kBAAkB;IAEzB,4BAAQ;MACN,KAAK,EAAE,IAAI;IAEb,2BAAO;MACL,MAAM,EAAE,iBAAiB;AAI/B,YAAM;EACJ,UAAU,EAAE,YAAY;EACxB,aAAa,EAAE,YAAY;EAE3B,kBAAM;IACJ,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;;AAKtB,CAAE;EACA,KAAK,EAAE,kBAAkB;;AAG3B,KAAM;EACJ,WAAW,EAAE,kBAAkB;;AAEjC,KAAM;EACJ,WAAW,EAAE,kBAAkB;EAC/B,KAAK,EAAE,kBAAkB;;AAG3B,SAAU;EACR,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;EAEpB,iBAAQ;IACN,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,GAAG;EAElB,uBAAc;IACZ,gBAAgB,EAAE,OAAO;IACzB,KAAK,EAAE,KAAK;;AAIhB,MAAO;EACL,gBAAgB,EAAE,OAAO;EACzB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,CAAC;EAET,YAAM;IACJ,MAAM,EAAE,YAAY;IAEpB,mBAAO;MACL,gBAAgB,EAAE,gBAAgB;MAClC,KAAK,EAAE,kBAAkB",
|
||||
"sources": ["../../../resources/assets/sass/main.scss"],
|
||||
"names": [],
|
||||
"file": "main.css"
|
||||
}
|
14
public/assets/styles/main.map
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "main.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/main.scss",
|
||||
"../../../resources/assets/sass/_pallete.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"@import 'pallete';\r\n\r\nbody {\r\n font-family: Roboto, sans-serif !important;\r\n}\r\n\r\n.brand {\r\n color: #000070 !important;\r\n}\r\n.inverted.brand {\r\n background-color: #000070 !important;\r\n color: white !important;\r\n}\r\n.button.brand {\r\n box-shadow: none !important;\r\n}\r\n.title.image {\r\n width: 15rem;\r\n}\r\n\r\nheader {\r\n #franja {\r\n background-color: #707070;\r\n color: white !important;\r\n\r\n .menu {\r\n color: inherit !important;\r\n\r\n .spacer {\r\n width: 3rem;\r\n }\r\n .input {\r\n height: 1.3rem !important;\r\n }\r\n }\r\n }\r\n .menu {\r\n margin-top: 0 !important;\r\n margin-bottom: 0 !important;\r\n\r\n .logo {\r\n font-size: 2rem;\r\n font-weight: 900;\r\n }\r\n }\r\n}\r\n\r\na {\r\n color: inherit !important;\r\n}\r\n\r\n.menu {\r\n font-family: inherit !important;\r\n}\r\n.item {\r\n font-family: inherit !important;\r\n color: inherit !important;\r\n}\r\n\r\n#contacto {\r\n background-color: $gris-claro;\r\n padding-top: 3rem;\r\n padding-bottom: 3rem;\r\n\r\n .header {\r\n color: $azul-oscuro !important;\r\n font-weight: 900;\r\n }\r\n .form .button {\r\n background-color: $marca;\r\n color: white;\r\n }\r\n}\r\n\r\nfooter {\r\n background-color: $marca;\r\n color: white;\r\n margin: 0;\r\n\r\n .menu {\r\n margin: 0 !important;\r\n\r\n .label {\r\n background-color: white !important;\r\n color: $marca !important;\r\n }\r\n }\r\n}\r\n",
|
||||
"$marca: #429ab7;\r\n$gris-oscuro: #808284;\r\n$gris-medio: #a7a9ab;\r\n$gris-claro: #f4f4f4;\r\n$azul-oscuro: #0d103c;\r\n"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ";AAEA,AAAA,IAAI,CAAC;EACH,WAAW,EAAE,6BAA6B;CAC3C;;;AAED,AAAA,MAAM,CAAC;EACL,KAAK,EAAE,kBAAkB;CAC1B;;;AACD,AAAA,SAAS,AAAA,MAAM,CAAC;EACd,gBAAgB,EAAE,kBAAkB;EACpC,KAAK,EAAE,gBAAgB;CACxB;;;AACD,AAAA,OAAO,AA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EACL,gBAAgB,EC3EV,OAAO;ED4Eb,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,CAAC;CAUV;;;AAbD,AAKE,MALI,CAKJ,KAAK,CAAC;EACJ,MAAM,EAAE,YAAY;CAMrB;;;AAZH,AAQI,MARE,CAKJ,KAAK,CAGH,MAAM,CAAC;EACL,gBAAgB,EAAE,gBAAgB;EAClC,KAAK,ECpFH,OAAO,CDoFK,UAAU;CACzB"
|
||||
}
|
5
public/assets/styles/nosotros.css
Normal file
@ -0,0 +1,5 @@
|
||||
#nosotros { background-color: #a7a9ab; color: white; font-size: 1.2rem !important; padding-top: 3rem; padding-bottom: 4rem; }
|
||||
|
||||
#nosotros .header { color: inherit; }
|
||||
|
||||
#nosotros .column { text-align: justify; }
|
14
public/assets/styles/nosotros.map
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "nosotros.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/nosotros.scss",
|
||||
"../../../resources/assets/sass/_pallete.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"@import 'pallete';\r\n\r\n#nosotros {\r\n background-color: $gris-medio;\r\n color: white;\r\n\r\n padding-top: 3rem;\r\n padding-bottom: 4rem;\r\n\r\n .header {\r\n color: inherit;\r\n }\r\n .column {\r\n text-align: justify;\r\n }\r\n}\r\n",
|
||||
"$marca: #429ab7;\r\n$gris-oscuro: #808284;\r\n$gris-medio: #a7a9ab;\r\n$gris-claro: #f4f4f4;\r\n$azul-oscuro: #0d103c;\r\n"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ";AAEA,AAAA,SAAS,CAAC;EACR,gBAAgB,ECDL,OAAO;EDElB,KAAK,EAAE,KAAK;EAEZ,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;CAQrB;;;AAbD,AAOE,SAPO,CAOP,OAAO,CAAC;EACN,KAAK,EAAE,OAAO;CACf;;;AATH,AAUE,SAVO,CAUP,OAAO,CAAC;EACN,UAAU,EAAE,OAAO;CACpB"
|
||||
}
|
2
public/assets/styles/pallete.css
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
/*# sourceMappingURL=pallete.css.map */
|
12
public/assets/styles/pallete.map
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "pallete.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/pallete.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"$marca: #429ab7;\r\n$gris-oscuro: #808284;\r\n$gris-medio: #a7a9ab;\r\n$gris-claro: #f4f4f4;\r\n"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ""
|
||||
}
|
45
public/assets/styles/producto.css
Normal file
@ -0,0 +1,45 @@
|
||||
#producto { background-color: #a7a9ab; padding-bottom: 2rem; }
|
||||
|
||||
#producto .titulo { color: #0d103c !important; padding-top: 2rem; padding-bottom: 1rem; }
|
||||
|
||||
#producto .titulo .header { color: #0d103c !important; }
|
||||
|
||||
#producto .titulo .direccion { padding-left: 2rem; }
|
||||
|
||||
#producto .titulo .publicado { padding-top: .5rem; }
|
||||
|
||||
#producto #galeria { padding-bottom: 4rem; }
|
||||
|
||||
#producto #galeria > .image { height: 53rem; overflow: hidden; display: flex; align-items: center; }
|
||||
|
||||
#producto #galeria > .image img { width: 100%; vertical-align: middle; }
|
||||
|
||||
#producto #galeria #thumbnails { padding-top: 2rem; }
|
||||
|
||||
#producto #galeria #thumbnails .image { height: 8rem; overflow: hidden; display: flex; align-items: center; }
|
||||
|
||||
#producto #galeria #thumbnails .image img { width: 100%; vertical-align: middle; }
|
||||
|
||||
#producto #buscar { color: #404041 !important; padding-top: 2rem; }
|
||||
|
||||
#producto #buscar .header { color: inherit; }
|
||||
|
||||
#producto #buscar .divider { background-color: white; }
|
||||
|
||||
#producto #buscar .field input[type='text'] { background-color: inherit !important; }
|
||||
|
||||
#producto #buscar .slider .track-fill { background-color: #0d103c !important; }
|
||||
|
||||
#producto #buscar .price_label { margin-top: -1rem; float: right; }
|
||||
|
||||
#producto #datos .tabular .item { background-color: #f4f4f4 !important; border: thin solid white; }
|
||||
|
||||
#producto #datos .tabular .item:not(.active) { border: thin solid #f4f4f4; background-color: white !important; }
|
||||
|
||||
#producto #datos .tabular .item:last-child { margin-left: 1rem; }
|
||||
|
||||
#producto #datos .segment { border: none !important; background-color: #808284; color: white; }
|
||||
|
||||
#producto #datos .segment .informacion .row { border-bottom: thin dotted white; }
|
||||
|
||||
#producto #datos .segment .informacion .row:last-child { border-bottom: none; }
|
14
public/assets/styles/producto.map
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "producto.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/producto.scss",
|
||||
"../../../resources/assets/sass/_pallete.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"@import 'pallete';\r\n\r\n#producto {\r\n background-color: $gris-medio;\r\n padding-bottom: 2rem;\r\n\r\n .titulo {\r\n color: $azul-oscuro !important;\r\n .header {\r\n color: $azul-oscuro !important;\r\n }\r\n .direccion {\r\n padding-left: 2rem;\r\n }\r\n .publicado {\r\n padding-top: .5rem;\r\n }\r\n padding-bottom: 1rem;\r\n }\r\n\r\n #galeria {\r\n padding-bottom: 4rem;\r\n\r\n &>.image {\r\n height: 53rem;\r\n overflow: hidden;\r\n display: flex;\r\n align-items: center;\r\n img {\r\n width: 100%;\r\n vertical-align: middle;\r\n }\r\n }\r\n\r\n #thumbnails {\r\n padding-top: 2rem;\r\n\r\n .image {\r\n height: 8rem;\r\n overflow: hidden;\r\n display: flex;\r\n align-items: center;\r\n img {\r\n width: 100%;\r\n vertical-align: middle;\r\n }\r\n }\r\n }\r\n }\r\n #buscar {\r\n color: #404041 !important;\r\n padding-top: 2rem;\r\n\r\n .header {\r\n color: inherit;\r\n }\r\n .divider {\r\n background-color: white;\r\n }\r\n .field {\r\n input[type='text'] {\r\n background-color: inherit !important;\r\n }\r\n }\r\n .slider {\r\n .track-fill {\r\n background-color: #0d103c !important;\r\n }\r\n }\r\n .price_label {\r\n margin-top: -1rem;\r\n float: right;\r\n }\r\n }\r\n #datos {\r\n .tabular {\r\n .item {\r\n background-color: $gris-claro !important;\r\n border: thin solid white;\r\n\r\n &:not(.active) {\r\n border: thin solid $gris-claro;\r\n background-color: white !important;\r\n }\r\n &:last-child {\r\n margin-left: 1rem;\r\n }\r\n }\r\n }\r\n .segment {\r\n border: none !important;\r\n\r\n .informacion {\r\n .row {\r\n border-bottom: thin dotted white;\r\n\r\n &:last-child {\r\n border-bottom: none;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
|
||||
"$marca: #429ab7;\r\n$gris-oscuro: #808284;\r\n$gris-medio: #a7a9ab;\r\n$gris-claro: #f4f4f4;\r\n$azul-oscuro: #0d103c;\r\n"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ";AAEA,AAAA,SAAS,CAAC;EACR,gBAAgB,ECDL,OAAO;EDElB,cAAc,EAAE,IAAI;CAmGrB;;;AArGD,AAIE,SAJO,CAIP,OAAO,CAAC;EACN,KAAK,ECHK,OAAO,CDGG,UAAU;EAU9B,cAAc,EAAE,IAAI;CACrB;;;AAhBH,AAMI,SANK,CAIP,OAAO,CAEL,OAAO,CAAC;EACN,KAAK,ECLG,OAAO,CDKK,UAAU;CAC/B;;;AARL,AASI,SATK,CAIP,OAAO,CAKL,UAAU,CAAC;EACT,YAAY,EAAE,IAAI;CACnB;;;AAXL,AAYI,SAZK,CAIP,OAAO,CAQL,UAAU,CAAC;EACT,WAAW,EAAE,KAAK;CACnB;;;AAdL,AAkBE,SAlBO,CAkBP,QAAQ,CAAC;EACP,cAAc,EAAE,IAAI;CA2BrB;;;AA9CH,AAqBI,SArBK,CAkBP,QAAQ,GAGJ,MAAM,CAAC;EACP,MAAM,EAAE,KAAK;EACb,QAAQ,EAAE,MAAM;EAChB,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;CAKpB;;;AA9BL,AA0BM,SA1BG,C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,gBAAgB;CASzB;;;AArFP,AA8EQ,SA9EC,CAwEP,MAAM,CACJ,QAAQ,CACN,KAAK,AAIF,IAAK,CAAA,OAAO,EAAE;EACb,MAAM,EAAE,IAAI,CAAC,KAAK,CC9Ef,OAAO;ED+EV,gBAAgB,EAAE,gBAAgB;CACnC;;;AAjFT,AAkFQ,SAlFC,CAwEP,MAAM,CACJ,QAAQ,CACN,KAAK,AAQF,WAAW,CAAC;EACX,WAAW,EAAE,IAAI;CAClB;;;AApFT,AAuFI,SAvFK,CAwEP,MAAM,CAeJ,QAAQ,CAAC;EACP,MAAM,EAAE,eAAe;CAWxB;;;AAnGL,AA2FQ,SA3FC,CAwEP,MAAM,CAeJ,QAAQ,CAGN,YAAY,CACV,IAAI,CAAC;EACH,aAAa,EAAE,iBAAiB;CAKjC;;;AAjGT,AA8FU,SA9FD,CAwEP,MAAM,CAeJ,QAAQ,CAGN,YAAY,CACV,IAAI,AAGD,WAAW,CAAC;EACX,aAAa,EAAE,IAAI;CACpB"
|
||||
}
|
19
public/assets/styles/productos.css
Normal file
@ -0,0 +1,19 @@
|
||||
#productos { background-color: #a7a9ab; padding-top: 2rem; }
|
||||
|
||||
#productos .titulo { color: #0d103c !important; }
|
||||
|
||||
#productos .tabular.menu .item { color: #404041 !important; }
|
||||
|
||||
#productos .grid { padding-top: 2rem; padding-bottom: 2rem; }
|
||||
|
||||
#productos .grid .ficha { border-radius: 0; border: 0; box-shadow: none !important; }
|
||||
|
||||
#productos .grid .ficha .content .segment { background-color: #e6e6e7 !important; padding-top: 0 !important; padding-bottom: 0 !important; font-weight: 300; }
|
||||
|
||||
#productos .grid .ficha .content .button { font-family: inherit !important; font-weight: 900; padding-top: 0.3rem !important; padding-bottom: 0.3rem !important; background-color: #0d103c !important; }
|
||||
|
||||
#productos .grid .ficha .image { height: 11rem; overflow: hidden; display: flex; align-items: center; }
|
||||
|
||||
#productos .grid .ficha .image img { width: 100%; vertical-align: middle; }
|
||||
|
||||
#productos .grid .ficha .overlay { background-color: #0d103c; color: white; opacity: 0.8; text-align: center; position: absolute; z-index: 999; top: 1.9rem; right: -2.2rem; width: 10rem; padding-top: .3rem; padding-bottom: .3rem; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); }
|
14
public/assets/styles/productos.map
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "productos.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/productos.scss",
|
||||
"../../../resources/assets/sass/_pallete.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"@import 'pallete';\r\n\r\n#productos {\r\n background-color: $gris-medio;\r\n padding-top: 2rem;\r\n\r\n .titulo {\r\n color: $azul-oscuro !important;\r\n }\r\n\r\n .tabular.menu .item {\r\n color: #404041 !important;\r\n }\r\n\r\n .grid {\r\n padding-top: 2rem;\r\n padding-bottom: 2rem;\r\n\r\n .ficha {\r\n border-radius: 0;\r\n border: 0;\r\n box-shadow: none !important;\r\n\r\n .content {\r\n .segment {\r\n background-color: #e6e6e7 !important;\r\n padding-top: 0 !important;\r\n padding-bottom: 0 !important;\r\n font-weight: 300;\r\n }\r\n .button {\r\n font-family: inherit !important;\r\n font-weight: 900;\r\n padding-top: 0.3rem !important;\r\n padding-bottom: 0.3rem !important;\r\n background-color: $azul-oscuro !important;\r\n }\r\n }\r\n .image {\r\n height: 11rem;\r\n overflow: hidden;\r\n display: flex;\r\n align-items: center;\r\n img {\r\n width: 100%;\r\n vertical-align: middle;\r\n }\r\n }\r\n .overlay {\r\n background-color: $azul-oscuro;\r\n color: white;\r\n opacity: 0.8;\r\n text-align: center;\r\n position: absolute;\r\n z-index: 999;\r\n top: 1.9rem;\r\n right: -2.2rem;\r\n width: 10rem;\r\n padding-top: .3rem;\r\n padding-bottom: .3rem;\r\n -webkit-transform: rotate(45deg);\r\n -moz-transform: rotate(45deg);\r\n -ms-transform: rotate(45deg);\r\n -o-transform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MAAM;EAChB,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;CAKpB;;;AA7CP,AAyCQ,UAzCE,CAYR,KAAK,CAIH,MAAM,CAoBJ,MAAM,CAKJ,GAAG,CAAC;EACF,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,MAAM;CACvB;;;AA5CT,AA8CM,UA9CI,CAYR,KAAK,CAIH,MAAM,CA8BJ,QAAQ,CAAC;EACP,gBAAgB,EC7CV,OAAO;ED8Cb,KAAK,EAAE,KAAK;EACZ,OAAO,EAAE,GAAG;EACZ,UAAU,EAAE,MAAM;EAClB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,GAAG;EACZ,GAAG,EAAE,MAAM;EACX,KAAK,EAAE,OAAO;EACd,KAAK,EAAE,KAAK;EACZ,WAAW,EAAE,KAAK;EAClB,cAAc,EAAE,KAAK;EACrB,iBAAiB,EAAE,aAAa;EAChC,cAAc,EAAE,aAAa;EAC7B,aAAa,EAAE,aAAa;EAC5B,YAAY,EAAE,aAAa;EAC3B,SAAS,EAAE,aAAa;CACzB"
|
||||
}
|
12
public/assets/styles/proyecto.map
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "producto.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/producto.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"#producto {\r\n background-color: #a7a9ab;\r\n padding-bottom: 2rem;\r\n\r\n .titulo {\r\n color: #404041;\r\n .header {\r\n color: #0d103c !important;\r\n }\r\n .direccion {\r\n padding-left: 2rem;\r\n }\r\n .publicado {\r\n padding-top: .5rem;\r\n }\r\n padding-bottom: 1rem;\r\n }\r\n\r\n #galeria {\r\n padding-bottom: 4rem;\r\n\r\n &>.image {\r\n height: 53rem;\r\n overflow: hidden;\r\n display: flex;\r\n align-items: center;\r\n img {\r\n width: 100%;\r\n vertical-align: middle;\r\n }\r\n }\r\n\r\n #thumbnails {\r\n padding-top: 2rem;\r\n\r\n .image {\r\n height: 8rem;\r\n overflow: hidden;\r\n display: flex;\r\n align-items: center;\r\n img {\r\n width: 100%;\r\n vertical-align: middle;\r\n }\r\n }\r\n }\r\n }\r\n #buscar {\r\n color: #404041 !important;\r\n padding-top: 2rem;\r\n\r\n .header {\r\n color: inherit;\r\n }\r\n .divider {\r\n background-color: white;\r\n }\r\n .field {\r\n input[type='text'] {\r\n background-color: inherit !important;\r\n }\r\n }\r\n .slider {\r\n .track-fill {\r\n background-color: #0d103c !important;\r\n }\r\n }\r\n .price_label {\r\n margin-top: -1rem;\r\n float: right;\r\n }\r\n }\r\n #datos {\r\n .tabular {\r\n .item {\r\n background-color: #a7a9ab !important;\r\n border: thin solid white;\r\n\r\n &:not(.active) {\r\n border: thin solid #a7a9ab;\r\n background-color: white !important;\r\n }\r\n &:last-child {\r\n margin-left: 1rem;\r\n }\r\n }\r\n }\r\n .segment {\r\n border: none !important;\r\n\r\n .informacion {\r\n .row {\r\n border-bottom: thin dotted white;\r\n\r\n &:last-child {\r\n border-bottom: none;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ";AAAA,AAAA,SAAS,CAAC;EACR,gBAAgB,EAAE,OAAO;EACzB,cAAc,EAAE,IAAI;CAmGrB;;;AArGD,AAIE,SAJO,CAIP,OAAO,CAAC;EACN,KAAK,EAAE,OAAO;EAUd,cAAc,EAAE,IAAI;CACrB;;;AAhBH,AAMI,SANK,CAIP,OAAO,CAEL,OAAO,CAAC;EACN,KAAK,EAAE,kBAAkB;CAC1B;;;AARL,AASI,SATK,CAIP,OAAO,CAKL,UAAU,CAAC;EACT,YAAY,EAAE,IAAI;CACnB;;;AAXL,AAYI,SAZK,CAIP,OAAO,CAQL,UAAU,CAAC;EACT,WAAW,EAAE,KAAK;CACnB;;;AAdL,AAkBE,SAlBO,CAkBP,QAAQ,CAAC;EACP,cAAc,EAAE,IAAI;CA2BrB;;;AA9CH,AAqBI,SArBK,CAkBP,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,GAAG;MAElB,wCAAQ;QACN,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE,GAAG;QAChB,WAAW,EAAE,iBAAiB;QAC9B,cAAc,EAAE,iBAAiB;QACjC,gBAAgB,EAAE,kBAAkB;MAGxC,8BAAO;QACL,QAAQ,EAAE,MAAM;MAElB,gCAAS;QACP,gBAAgB,EAAE,OAAO;QACzB,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,GAAG;QACZ,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,GAAG;QACZ,GAAG,EAAE,MAAM;QACX,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,KAAK;QACrB,iBAAiB,EAAE,aAAa;QAChC,cAAc,EAAE,aAAa;QAC7B,aAAa,EAAE,aAAa;QAC5B,YAAY,EAAE,aAAa;QAC3B,SAAS,EAAE,aAAa",
|
||||
"sources": ["../../../resources/assets/sass/productos.scss"],
|
||||
"names": [],
|
||||
"file": "productos.css"
|
||||
}
|
12
public/assets/styles/proyectos.map
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "productos.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/productos.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"#productos {\r\n background-color: #a7a9ab;\r\n padding-top: 2rem;\r\n\r\n .titulo {\r\n color: #0d103c;\r\n }\r\n\r\n .tabular.menu .item {\r\n color: #404041 !important;\r\n }\r\n\r\n .grid {\r\n padding-top: 2rem;\r\n padding-bottom: 2rem;\r\n\r\n .ficha {\r\n border-radius: 0;\r\n border: 0;\r\n box-shadow: none !important;\r\n\r\n .content {\r\n .segment {\r\n background-color: #e6e6e7 !important;\r\n padding-top: 0 !important;\r\n padding-bottom: 0 !important;\r\n font-weight: 300;\r\n }\r\n .button {\r\n font-family: inherit !important;\r\n font-weight: 900;\r\n padding-top: 0.3rem !important;\r\n padding-bottom: 0.3rem !important;\r\n background-color: #0d103c !important;\r\n }\r\n }\r\n .image {\r\n overflow: hidden;\r\n }\r\n .overlay {\r\n background-color: #0d103c;\r\n color: white;\r\n opacity: 0.8;\r\n text-align: center;\r\n position: absolute;\r\n z-index: 999;\r\n top: 1.9rem;\r\n right: -2.2rem;\r\n width: 10rem;\r\n padding-top: .3rem;\r\n padding-bottom: .3rem;\r\n -webkit-transform: rotate(45deg);\r\n -moz-transform: rotate(45deg);\r\n -ms-transform: rotate(45deg);\r\n -o-transform: rotate(45deg);\r\n transform: rotate(45deg);\r\n }\r\n }\r\n }\r\n}\r\n"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ";AAAA,AAAA,UAAU,CAAC;EACT,gBAAgB,EAAE,OAAO;EACzB,WAAW,EAAE,IAAI;CAyDlB;;;AA3DD,AAIE,UAJQ,CAIR,OAAO,CAAC;EACN,KAAK,EAAE,OAAO;CACf;;;AANH,AAQE,UARQ,CAQR,QAAQ,AAAA,KAAK,CAAC,KAAK,CAAC;EAClB,KAAK,EAAE,kBAAkB;CAC1B;;;AAVH,AAYE,UAZQ,CAYR,KAAK,CAAC;EACJ,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;CA4CrB;;;AA1DH,AAgBI,UAhBM,CAYR,KAAK,CAIH,MAAM,CAAC;EACL,aAAa,EAAE,CAAC;EAChB,MAAM,EAAE,CAAC;EACT,UAAU,EAAE,eAAe;CAsC5B;;;AAzDL,AAsBQ,UAtBE,CAYR,KAAK,CAIH,MAAM,CAKJ,QAAQ,CACN,QAAQ,CAAC;EACP,gBAAgB,EAAE,kBAAkB;EACpC,WAAW,EAAE,YAAY;EACzB,cAAc,EAAE,YAAY;EAC5B,WAAW,EAAE,GAAG;CACjB;;;AA3BT,AA4BQ,UA5BE,CAYR,KAAK,CAIH,MAAM,CAKJ,QAAQ,CAON,OAAO,CAAC;EACN,WAAW,EAAE,kBAAkB;EAC/B,WAAW,EAAE,GAAG;EAChB,WAAW,EAAE,iBAAiB;EAC9B,cAAc,EAAE,iBAAiB;EACjC,gBAAgB,EAAE,kBAAkB;CACrC;;;AAlCT,AAoCM,UApCI,CAYR,KAAK,CAIH,MAAM,CAoBJ,MAAM,CAAC;EACL,QAAQ,EAAE,MAAM;CACjB;;;AAtCP,AAuCM,UAvCI,CAYR,KAAK,CAIH,MAAM,CAuBJ,QAAQ,CAAC;EACP,gBAAgB,EAAE,OAAO;EACzB,KAAK,EAAE,KAAK;EACZ,OAAO,EAAE,GAAG;EACZ,UAAU,EAAE,MAAM;EAClB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,GAAG;EACZ,GAAG,EAAE,MAAM;EACX,KAAK,EAAE,OAAO;EACd,KAAK,EAAE,KAAK;EACZ,WAAW,EAAE,KAAK;EAClB,cAAc,EAAE,KAAK;EACrB,iBAAiB,EAAE,aAAa;EAChC,cAAc,EAAE,aAAa;EAC7B,aAAa,EAAE,aAAa;EAC5B,YAAY,EAAE,aAAa;EAC3B,SAAS,EAAE,aAAa;CACzB"
|
||||
}
|
10
public/index.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$__environment = 'web';
|
||||
|
||||
require_once realpath(implode(DIRECTORY_SEPARATOR, [
|
||||
dirname(__DIR__),
|
||||
'bootstrap',
|
||||
'app.php'
|
||||
]));
|
||||
|
||||
$app->run();
|
5
resources/assets/sass/_pallete.scss
Normal file
@ -0,0 +1,5 @@
|
||||
$marca: #429ab7;
|
||||
$gris-oscuro: #808284;
|
||||
$gris-medio: #a7a9ab;
|
||||
$gris-claro: #f4f4f4;
|
||||
$azul-oscuro: #0d103c;
|
16
resources/assets/sass/admin.scss
Normal file
@ -0,0 +1,16 @@
|
||||
@import 'pallete';
|
||||
|
||||
#admin {
|
||||
background-color: $gris-claro;
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 2rem;
|
||||
|
||||
.button {
|
||||
background-color: $marca;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.container>.header, .container>.grid>.column>.header, .container>.grid>.row>.column>.header {
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
}
|
16
resources/assets/sass/faqs.scss
Normal file
@ -0,0 +1,16 @@
|
||||
@import 'pallete';
|
||||
|
||||
#faq {
|
||||
background-color: $gris-medio;
|
||||
color: white;
|
||||
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 4rem;
|
||||
|
||||
.header, .title, .content {
|
||||
color: inherit;
|
||||
}
|
||||
.accordion {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
176
resources/assets/sass/home.scss
Normal file
@ -0,0 +1,176 @@
|
||||
@import 'pallete';
|
||||
|
||||
.header {
|
||||
color: inherit !important;
|
||||
font-family: inherit !important;
|
||||
}
|
||||
|
||||
#banner {
|
||||
padding-top: 12rem;
|
||||
padding-bottom: 12rem;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 1920px auto;
|
||||
background-blend-mode: multiply;
|
||||
|
||||
#mensaje {
|
||||
margin-bottom: 2rem;
|
||||
color: white;
|
||||
font-weight: 300;
|
||||
font-size: 1.6rem;
|
||||
|
||||
.header {
|
||||
font-weight: 900 !important;
|
||||
font-size: 1.9rem;
|
||||
}
|
||||
}
|
||||
.button {
|
||||
font-family: inherit;
|
||||
font-weight: 900;
|
||||
background-color: $azul-oscuro !important;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
#aviso {
|
||||
color: white;
|
||||
background-color: $marca;
|
||||
padding-top: 5rem;
|
||||
padding-bottom: 3rem;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 300;
|
||||
|
||||
.header {
|
||||
font-weight: 900;
|
||||
}
|
||||
}
|
||||
|
||||
#destacados {
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 5rem;
|
||||
background-color: $gris-medio;
|
||||
min-height: 40rem;
|
||||
|
||||
.header {
|
||||
color: $azul-oscuro !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
.titulo {
|
||||
font-size: 1.6rem;
|
||||
font-weight: 900;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
.ficha {
|
||||
border-radius: 0;
|
||||
border: 0;
|
||||
box-shadow: none !important;
|
||||
|
||||
.content {
|
||||
.segment {
|
||||
background-color: $gris-claro !important;
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
font-weight: 300;
|
||||
}
|
||||
.button {
|
||||
font-family: inherit !important;
|
||||
font-weight: 900;
|
||||
padding-top: 0.3rem !important;
|
||||
padding-bottom: 0.3rem !important;
|
||||
background-color: #0d103c !important;
|
||||
}
|
||||
}
|
||||
.image {
|
||||
height: 11rem;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.overlay {
|
||||
background-color: #0d103c;
|
||||
color: white;
|
||||
opacity: 0.8;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
top: 1.9rem;
|
||||
right: -2.2rem;
|
||||
width: 10rem;
|
||||
padding-top: .3rem;
|
||||
padding-bottom: .3rem;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
}
|
||||
.active {
|
||||
font-weight: 900;
|
||||
}
|
||||
}
|
||||
|
||||
#segmentos {
|
||||
padding-top: 4rem;
|
||||
padding-bottom: 4rem;
|
||||
|
||||
.titulo {
|
||||
color: $azul-oscuro !important;
|
||||
}
|
||||
|
||||
.grid {
|
||||
.basic.segment {
|
||||
.header {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#resumen {
|
||||
background-position: center;
|
||||
background-position-y: -60rem;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 2600px auto;
|
||||
min-height: 20rem;
|
||||
padding-top: 3rem;
|
||||
|
||||
.inverted.circular.segment {
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
#indicadores {
|
||||
background-color: $gris-medio;
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
height: 4rem;
|
||||
|
||||
.slideshow {
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
height: 2rem;
|
||||
|
||||
.slide {
|
||||
display: inline;
|
||||
float: left;
|
||||
color: white;
|
||||
padding: 0;
|
||||
margin-right: 1rem;
|
||||
text-align: center;
|
||||
|
||||
.value:last-child {
|
||||
padding-left: 0.3rem;
|
||||
font-weight: 100 !important;
|
||||
}
|
||||
padding-left: 1rem;
|
||||
padding-right: 2rem;
|
||||
border-right: thin solid black;
|
||||
}
|
||||
}
|
||||
}
|
97
resources/assets/sass/main.scss
Normal file
@ -0,0 +1,97 @@
|
||||
@import 'pallete';
|
||||
|
||||
body {
|
||||
font-family: Roboto, sans-serif !important;
|
||||
}
|
||||
|
||||
.brand {
|
||||
color: #000070 !important;
|
||||
}
|
||||
.inverted.brand {
|
||||
background-color: #000070 !important;
|
||||
color: white !important;
|
||||
}
|
||||
.button.brand {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.title.image {
|
||||
width: 15rem;
|
||||
}
|
||||
|
||||
header {
|
||||
#franja {
|
||||
background-color: #707070;
|
||||
color: white !important;
|
||||
|
||||
.menu {
|
||||
color: inherit !important;
|
||||
|
||||
.spacer {
|
||||
width: 3rem;
|
||||
}
|
||||
.input {
|
||||
height: 1.3rem !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.menu {
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
|
||||
.logo {
|
||||
font-size: 2rem;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
#productos_menu .menu {
|
||||
border: thin solid white;
|
||||
box-shadow: none;
|
||||
|
||||
.item:hover {
|
||||
background-color: $gris-medio !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
.menu {
|
||||
font-family: inherit !important;
|
||||
}
|
||||
.item {
|
||||
font-family: inherit !important;
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
#contacto {
|
||||
background-color: $gris-claro;
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 3rem;
|
||||
|
||||
.header {
|
||||
color: $azul-oscuro !important;
|
||||
font-weight: 900;
|
||||
}
|
||||
.form .button {
|
||||
background-color: $marca;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
footer {
|
||||
background-color: $marca;
|
||||
color: white;
|
||||
margin: 0;
|
||||
|
||||
.menu {
|
||||
margin: 0 !important;
|
||||
|
||||
.label {
|
||||
background-color: white !important;
|
||||
color: $marca !important;
|
||||
}
|
||||
}
|
||||
}
|
18
resources/assets/sass/nosotros.scss
Normal file
@ -0,0 +1,18 @@
|
||||
@import 'pallete';
|
||||
|
||||
#nosotros {
|
||||
background-color: $gris-medio;
|
||||
color: white;
|
||||
|
||||
font-size: 1.2rem !important;
|
||||
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 4rem;
|
||||
|
||||
.header {
|
||||
color: inherit;
|
||||
}
|
||||
.column {
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
107
resources/assets/sass/producto.scss
Normal file
@ -0,0 +1,107 @@
|
||||
@import 'pallete';
|
||||
|
||||
#producto {
|
||||
background-color: $gris-medio;
|
||||
padding-bottom: 2rem;
|
||||
|
||||
.titulo {
|
||||
color: $azul-oscuro !important;
|
||||
padding-top: 2rem;
|
||||
.header {
|
||||
color: $azul-oscuro !important;
|
||||
}
|
||||
.direccion {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
.publicado {
|
||||
padding-top: .5rem;
|
||||
}
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
#galeria {
|
||||
padding-bottom: 4rem;
|
||||
|
||||
&>.image {
|
||||
height: 53rem;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
#thumbnails {
|
||||
padding-top: 2rem;
|
||||
|
||||
.image {
|
||||
height: 8rem;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#buscar {
|
||||
color: #404041 !important;
|
||||
padding-top: 2rem;
|
||||
|
||||
.header {
|
||||
color: inherit;
|
||||
}
|
||||
.divider {
|
||||
background-color: white;
|
||||
}
|
||||
.field {
|
||||
input[type='text'] {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
}
|
||||
.slider {
|
||||
.track-fill {
|
||||
background-color: #0d103c !important;
|
||||
}
|
||||
}
|
||||
.price_label {
|
||||
margin-top: -1rem;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
#datos {
|
||||
.tabular {
|
||||
.item {
|
||||
background-color: $gris-claro !important;
|
||||
border: thin solid white;
|
||||
|
||||
&:not(.active) {
|
||||
border: thin solid $gris-claro;
|
||||
background-color: white !important;
|
||||
}
|
||||
&:last-child {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.segment {
|
||||
border: none !important;
|
||||
background-color: $gris-oscuro;
|
||||
color: white;
|
||||
|
||||
.informacion {
|
||||
.row {
|
||||
border-bottom: thin dotted white;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
69
resources/assets/sass/productos.scss
Normal file
@ -0,0 +1,69 @@
|
||||
@import 'pallete';
|
||||
|
||||
#productos {
|
||||
background-color: $gris-medio;
|
||||
padding-top: 2rem;
|
||||
|
||||
.titulo {
|
||||
color: $azul-oscuro !important;
|
||||
}
|
||||
|
||||
.tabular.menu .item {
|
||||
color: #404041 !important;
|
||||
}
|
||||
|
||||
.grid {
|
||||
padding-top: 2rem;
|
||||
padding-bottom: 2rem;
|
||||
|
||||
.ficha {
|
||||
border-radius: 0;
|
||||
border: 0;
|
||||
box-shadow: none !important;
|
||||
|
||||
.content {
|
||||
.segment {
|
||||
background-color: #e6e6e7 !important;
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
font-weight: 300;
|
||||
}
|
||||
.button {
|
||||
font-family: inherit !important;
|
||||
font-weight: 900;
|
||||
padding-top: 0.3rem !important;
|
||||
padding-bottom: 0.3rem !important;
|
||||
background-color: $azul-oscuro !important;
|
||||
}
|
||||
}
|
||||
.image {
|
||||
height: 11rem;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.overlay {
|
||||
background-color: $azul-oscuro;
|
||||
color: white;
|
||||
opacity: 0.8;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
top: 1.9rem;
|
||||
right: -2.2rem;
|
||||
width: 10rem;
|
||||
padding-top: .3rem;
|
||||
padding-bottom: .3rem;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
2
resources/routes/router.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
include_once $app->getContainer()->get('env') . '.php';
|
19
resources/routes/web.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Base;
|
||||
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [
|
||||
__DIR__,
|
||||
'web'
|
||||
]);
|
||||
if (file_exists($folder)) {
|
||||
$files = new DirectoryIterator($folder);
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
}
|
||||
|
||||
$app->get('/', Base::class)
|
||||
->add(new ProVM\KI\Common\Middleware\Visits($app->getContainer()->get('file.visits'), $app->getContainer()->get('visits.time')));
|
19
resources/routes/web/admin.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Admin\Home;
|
||||
|
||||
$app->group('/admin', function($app) {
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [
|
||||
__DIR__,
|
||||
'admin'
|
||||
]);
|
||||
if (file_exists($folder)) {
|
||||
$files = new DirectoryIterator($folder);
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
}
|
||||
$app->get('[/]', Home::class);
|
||||
});
|
8
resources/routes/web/admin/faqs.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Admin\Faq;
|
||||
|
||||
$app->group('/faqs', function($app) {
|
||||
$app->post('/add', [Faq::class, 'add']);
|
||||
$app->post('/delete', [Faq::class, 'delete']);
|
||||
$app->get('[/]', Faq::class);
|
||||
});
|
13
resources/routes/web/admin/home.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Admin\Home;
|
||||
|
||||
$app->group('/home', function($app) {
|
||||
$app->group('/avisos', function($app) {
|
||||
$app->post('/add', [Home::class, 'add']);
|
||||
$app->post('/delete', [Home::class, 'delete']);
|
||||
});
|
||||
$app->group('/resumen', function($app) {
|
||||
$app->post('/edit', [Home::class, 'edit']);
|
||||
});
|
||||
$app->get('[/]', Home::class);
|
||||
});
|
7
resources/routes/web/admin/nosotros.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Admin\Nosotros;
|
||||
|
||||
$app->group('/nosotros', function($app) {
|
||||
$app->post('[/]', [Nosotros::class, 'guardar']);
|
||||
$app->get('[/]', Nosotros::class);
|
||||
});
|
26
resources/routes/web/admin/productos.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Admin\Productos;
|
||||
|
||||
$app->group('/productos', function($app) {
|
||||
$app->post('/campos', [Productos::class, 'fields']);
|
||||
$app->group('/add', function($app) {
|
||||
$app->get('[/]', [Productos::class, 'add']);
|
||||
$app->post('[/]', [Productos::class, 'do_add']);
|
||||
});
|
||||
$app->post('/delete', [Productos::class, 'delete']);
|
||||
$app->get('[/]', Productos::class);
|
||||
});
|
||||
$app->group('/producto/{producto}', function($app) {
|
||||
$app->group('/imagen', function($app) {
|
||||
$app->post('/delete', [Productos::class, 'delete_image']);
|
||||
});
|
||||
$app->group('/imagenes', function($app) {
|
||||
$app->post('/add', [Productos::class, 'add_image']);
|
||||
});
|
||||
$app->group('/video', function($app) {
|
||||
$app->post('/set', [Productos::class, 'set_video']);
|
||||
$app->post('/delete', [Productos::class, 'delete_video']);
|
||||
});
|
||||
$app->post('[/]', [Productos::class, 'do_edit']);
|
||||
$app->get('[/]', [Productos::class, 'edit']);
|
||||
});
|
5
resources/routes/web/contacto.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Contacto;
|
||||
|
||||
$app->get('/contacto', Contacto::class);
|
||||
$app->post('/contacto', [Contacto::class, 'enviar']);
|
4
resources/routes/web/faq.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Faq;
|
||||
|
||||
$app->get('/faqs', Faq::class);
|
4
resources/routes/web/indicadores.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Indicadores;
|
||||
|
||||
$app->get('/indicador/{indicador}', [Indicadores::class, 'get']);
|
4
resources/routes/web/nosotros.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Nosotros;
|
||||
|
||||
$app->get('/nosotros', Nosotros::class);
|
12
resources/routes/web/productos.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Productos;
|
||||
|
||||
$app->group('/productos', function($app) {
|
||||
$app->get('/segmento/{segmento}', [Productos::class, 'segmento']);
|
||||
$app->get('/destacados/{page}', [Productos::class, 'destacados']);
|
||||
$app->get('[/]', productos::class);
|
||||
});
|
||||
$app->group('/producto/{producto}', function($app) {
|
||||
$app->get('/ficha', [Productos::class, 'ficha']);
|
||||
$app->get('[/]', [Productos::class, 'show']);
|
||||
});
|
102
resources/views/admin/faq.blade.php
Normal file
@ -0,0 +1,102 @@
|
||||
@extends('admin.layout.base')
|
||||
|
||||
@section('page_content')
|
||||
<div class="ui grid">
|
||||
<div class="nine wide column">
|
||||
<div class="ui header">
|
||||
FAQ's
|
||||
</div>
|
||||
<table class="ui table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pregunta</th>
|
||||
<th class="center aligned">Borrar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($faqs as $i => $faq)
|
||||
<tr>
|
||||
<td class="titulo" data-id="{{$i}}">{{$faq->titulo}}</td>
|
||||
<td class="center aligned"><i class="trash alternate outline icon" data-id="{{$i}}"></i>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<form class="ui form">
|
||||
<input type="hidden" name="id" />
|
||||
<div class="field">
|
||||
<label>Pregunta</label>
|
||||
<input type="text" name="titulo" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Respuesta</label>
|
||||
<textarea rows="1" name="contenido"></textarea>
|
||||
</div>
|
||||
<button class="ui button enviar">AGREGAR</button>
|
||||
<button class="ui button resetear" type="reset">BORRAR</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var faq = {
|
||||
edit: false,
|
||||
faqs: [
|
||||
@foreach ($faqs as $faq)
|
||||
{
|
||||
titulo: '{{$faq->titulo}}',
|
||||
contenido: "{{implode("\\n", explode(PHP_EOL, $faq->contenido))}}"
|
||||
},
|
||||
@endforeach
|
||||
],
|
||||
setup: () => {
|
||||
$('.titulo').css('cursor', 'pointer').click(function() {
|
||||
var id = $(this).attr('data-id')
|
||||
|
||||
$("input[name='id']").val(id)
|
||||
$("input[name='titulo']").val(faq.faqs[id].titulo)
|
||||
$("textarea[name='contenido']").val(faq.faqs[id].contenido)
|
||||
$('.button.enviar').html('EDITAR')
|
||||
faq.edit = true
|
||||
})
|
||||
$('.trash.icon').css('cursor', 'pointer').click(function() {
|
||||
var id = $(this).attr('data-id')
|
||||
var url = '{{$urls->admin}}/faqs/delete'
|
||||
$.post(url, {id: id}, (data) => {
|
||||
if (data.estado) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
})
|
||||
$('.button.resetear').click(() => {
|
||||
$("input[name='id']").val('')
|
||||
$('.button.enviar').html('AGREGAR')
|
||||
faq.edit = false
|
||||
})
|
||||
$('.form').trigger('reset')
|
||||
$('.form').submit((e) => {
|
||||
e.preventDefault()
|
||||
var input = {
|
||||
titulo: $("input[name='titulo']").val(),
|
||||
contenido: $("textarea[name='contenido']").val()
|
||||
}
|
||||
if (faq.edit) {
|
||||
input['id'] = $("input[name='id']").val()
|
||||
}
|
||||
var url = '{{$urls->admin}}/faqs/add'
|
||||
$.post(url, input, (data) => {
|
||||
if (data.estado) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
return false
|
||||
})
|
||||
}
|
||||
}
|
||||
$(document).ready(() => {
|
||||
faq.setup()
|
||||
})
|
||||
</script>
|
||||
@endpush
|
178
resources/views/admin/home.blade.php
Normal file
@ -0,0 +1,178 @@
|
||||
@extends('admin.layout.base')
|
||||
|
||||
@section('page_content')
|
||||
<div class="ui grid">
|
||||
<div class="row">
|
||||
<div class="nine wide column">
|
||||
<div class="ui header">
|
||||
AVISOS
|
||||
</div>
|
||||
<table class="ui table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Pregunta</th>
|
||||
<th class="center aligned">Borrar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($avisos->avisos as $i => $aviso)
|
||||
<tr>
|
||||
<td class="link titulo" data-id="{{$i}}">{{$aviso->titulo}}</td>
|
||||
<td class="link contenido" data-id="{{$i}}">{{$aviso->contenido}}</td>
|
||||
<td class="center aligned"><i class="trash alternate outline icon" data-id="{{$i}}"></i></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfooter>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<form class="ui form" id="avisos">
|
||||
<input type="hidden" name="id" />
|
||||
<div class="inline fields">
|
||||
<div class="field">
|
||||
<input type="text" name="titulo" placeholder="Título" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<input type="text" name="contenido" placeholder="Bajada" />
|
||||
</div>
|
||||
<button class="ui button accion">CREAR</button>
|
||||
<button class="ui button" type="reset">BORRAR</button>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</tfooter>
|
||||
</table>
|
||||
<div class="ui slider checkbox">
|
||||
<input type="checkbox" tabindex="0" class="hidden" value="{{$avisos->activo}}">
|
||||
<label>Activo</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="nine wide column">
|
||||
<div class="ui header">
|
||||
INDICADORES
|
||||
</div>
|
||||
<form class="ui form" id="resumen">
|
||||
<table class="ui table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Enunciado</th>
|
||||
<th>Cantidad</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($resumen as $i => $indicador)
|
||||
<tr>
|
||||
<td><input type="text" name="titulo{{$i}}" value="{{$indicador->titulo}}" /></td>
|
||||
<td><input type="text" name="cantidad{{$i}}" value="{{$indicador->cantidad}}" /></td>
|
||||
<td><button class="ui button guardar" data-id="{{$i}}">GUARDAR</button></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var home = {
|
||||
edit: false,
|
||||
editAviso: (id) => {
|
||||
var titulo = $(".link.titulo[data-id='" + id + "']").html()
|
||||
var contenido = $(".link.contenido[data-id='" + id + "']").html()
|
||||
|
||||
$("input[name='id']").val(id)
|
||||
$("input[name='titulo']").val(titulo)
|
||||
$("input[name='contenido']").val(contenido)
|
||||
home.edit = true
|
||||
$('.accion').html('EDITAR')
|
||||
},
|
||||
submitAviso: (e) => {
|
||||
e.preventDefault()
|
||||
input = {
|
||||
titulo: $("input[name='titulo']").val(),
|
||||
contenido: $("input[name='contenido']").val()
|
||||
}
|
||||
if (home.edit) {
|
||||
input['id'] = $("input[name='id']").val()
|
||||
}
|
||||
if (input['titulo'] == '') {
|
||||
return false
|
||||
}
|
||||
var url = '{{$urls->admin}}/home/avisos/add'
|
||||
$.post(url, input, (data) => {
|
||||
if (data.estado) {
|
||||
window.location.reload()
|
||||
}
|
||||
}, 'json')
|
||||
return false
|
||||
},
|
||||
deleteAviso: (id) => {
|
||||
var url = '{{$urls->admin}}/home/avisos/delete'
|
||||
$.post(url, {id: id}, (data) => {
|
||||
if (data.estado) {
|
||||
window.location.reload()
|
||||
}
|
||||
}, 'json')
|
||||
},
|
||||
setup: () => {
|
||||
$('.link').css('cursor', 'pointer').click(function() {
|
||||
var id = $(this).attr('data-id')
|
||||
home.editAviso(id)
|
||||
})
|
||||
$('#avisos').trigger('reset')
|
||||
$('#avisos').submit((e) => {
|
||||
home.submitAviso(e)
|
||||
})
|
||||
$(".button[type='reset']").click((e) => {
|
||||
$("input[name='id']").val('')
|
||||
$('.accion').html('CREAR')
|
||||
home.edit = false
|
||||
})
|
||||
$('.trash.icon').css('cursor', 'pointer').click(function() {
|
||||
var id = $(this).attr('data-id')
|
||||
home.deleteAviso(id)
|
||||
})
|
||||
$('.checkbox').checkbox({
|
||||
onChange: function() {
|
||||
var state = $(this).is(':checked')
|
||||
var url = '{{$urls->admin}}/home/avisos/add'
|
||||
$.post(url, {estado: state}, (data) => {
|
||||
console.debug(data)
|
||||
})
|
||||
}
|
||||
})
|
||||
@if ($avisos->activo)
|
||||
$('.checkbox').checkbox('set checked')
|
||||
@endif
|
||||
$('#resumen').submit((e) => {
|
||||
e.preventDefault()
|
||||
return false
|
||||
})
|
||||
$('.guardar').click(function() {
|
||||
var id = $(this).attr('data-id')
|
||||
var url = '{{$urls->admin}}/home/resumen/edit'
|
||||
input = {
|
||||
id: id,
|
||||
titulo: $("input[name='titulo" + id + "']").val(),
|
||||
cantidad: $("input[name='cantidad" + id + "']").val()
|
||||
}
|
||||
$.post(url, input, (data) => {
|
||||
if (data.estado) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
$(document).ready(() => {
|
||||
home.setup()
|
||||
})
|
||||
</script>
|
||||
@endpush
|
5
resources/views/admin/layout/base.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{$page_language}}">
|
||||
@include('admin.layout.head')
|
||||
@include('admin.layout.body')
|
||||
</html>
|
10
resources/views/admin/layout/body.blade.php
Normal file
@ -0,0 +1,10 @@
|
||||
<body>
|
||||
@include('admin.layout.header')
|
||||
<div id="admin">
|
||||
<div class="ui container">
|
||||
@yield('page_content')
|
||||
</div>
|
||||
</div>
|
||||
@include('admin.layout.footer')
|
||||
@include('layout.scripts')
|
||||
</body>
|
10
resources/views/admin/layout/footer.blade.php
Normal file
@ -0,0 +1,10 @@
|
||||
<footer>
|
||||
<div class="ui container">
|
||||
<div class="ui tiny text menu">
|
||||
<div class="item">
|
||||
Copyright
|
||||
Todos los derechos reservados 2020 ProVM<i class="copyright outline icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
7
resources/views/admin/layout/head.blade.php
Normal file
@ -0,0 +1,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>
|
||||
Capital Investments
|
||||
</title>
|
||||
@include('admin.layout.styles')
|
||||
</head>
|
7
resources/views/admin/layout/header.blade.php
Normal file
@ -0,0 +1,7 @@
|
||||
<header>
|
||||
@include('admin.layout.header.menu')
|
||||
</header>
|
||||
|
||||
@push('styles')
|
||||
<link rel="stylesheet" type="text/css" href="{{$urls->styles}}/admin.css" />
|
||||
@endpush
|
26
resources/views/admin/layout/header/menu.blade.php
Normal file
@ -0,0 +1,26 @@
|
||||
<div class="ui container">
|
||||
<nav class="ui massive text menu">
|
||||
<a class="item logo" href="{{$urls->admin}}">
|
||||
<div class="ui title image">
|
||||
<img src="{{$urls->images}}/logo.png" alt="Capital Investments" title="Capital Investments" />
|
||||
</div>
|
||||
</a>
|
||||
<div class="right menu">
|
||||
<a class="item" href="{{$urls->admin}}/home">
|
||||
HOME
|
||||
</a>
|
||||
<a class="item" href="{{$urls->admin}}/nosotros">
|
||||
NOSOTROS
|
||||
</a>
|
||||
<a class="item" href="{{$urls->admin}}/productos">
|
||||
PRODUCTOS
|
||||
</a>
|
||||
<a class="item" href="{{$urls->admin}}/faqs">
|
||||
FAQs
|
||||
</a>
|
||||
<a class="item" href="{{$urls->base}}">
|
||||
Salir
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
14
resources/views/admin/layout/styles.blade.php
Normal file
@ -0,0 +1,14 @@
|
||||
@if (isset($assets->styles))
|
||||
@foreach ($assets->styles as $style)
|
||||
<link rel="stylesheet" type="text/css" href="{{$style}}" />
|
||||
@endforeach
|
||||
@endif
|
||||
<link rel="stylesheet" type="text/css" href="{{$urls->styles}}/admin.css" />
|
||||
@if (isset($assets->fonts))
|
||||
@foreach ($assets->fonts as $type => $fonts)
|
||||
@foreach ($fonts as $font)
|
||||
<link type="{{$type}}" href="{{$font}}" />
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endif
|
||||
@stack('styles')
|
18
resources/views/admin/nosotros.blade.php
Normal file
@ -0,0 +1,18 @@
|
||||
@extends('admin.layout.base')
|
||||
|
||||
@section('page_content')
|
||||
<div class="ui grid">
|
||||
<div class="ten wide column">
|
||||
<div class="ui header">
|
||||
NOSOTROS
|
||||
</div>
|
||||
<form class="ui form" method="post" action="{{$urls->admin}}/nosotros">
|
||||
<div class="field">
|
||||
<label>Descripción</label>
|
||||
<textarea name="nosotros">{{$nosotros}}</textarea>
|
||||
</div>
|
||||
<button class="ui button">GUARDAR</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
232
resources/views/admin/producto.blade.php
Normal file
@ -0,0 +1,232 @@
|
||||
@extends('admin.layout.base')
|
||||
|
||||
@section('page_content')
|
||||
<div class="ui header">
|
||||
PRODUCTO
|
||||
</div>
|
||||
<form class="ui form" method="post" action="{{$urls->admin}}/producto/{{$producto->id}}" enctype="multipart/form-data">
|
||||
<div class="ui three columns grid">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label>Nombre</label>
|
||||
<input type="text" name="nombre" value="{{$producto->nombre ?? ''}}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="fields">
|
||||
<div class="field">
|
||||
<label>Dirección</label>
|
||||
<input type="text" name="calle" value="{{$producto->direccion->calle ?? ''}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Comuna</label>
|
||||
<input type="text" name="comuna" value="{{$producto->direccion->comuna ?? ''}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Ciudad</label>
|
||||
<input type="text" name="ciudad" value="{{$producto->direccion->ciudad ?? ''}}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label>Segmento</label>
|
||||
<div class="ui selection dropdown" id="segmento">
|
||||
<input type="hidden" name="segmento" />
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">Segmento</div>
|
||||
<div class="menu">
|
||||
@foreach ($segmentos as $segmento)
|
||||
<div class="item" data-value="{{$segmento->titulo}}">{{$segmento->titulo}}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label>Valor en UF</label>
|
||||
<input type="text" name="valor" value="{{str_replace('.', '', $producto->valor ?? '')}}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label>Destacado</label>
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" name="destacado" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span id="campos"></span>
|
||||
@foreach ($properties as $property)
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label>{{$property->label}}</label>
|
||||
<input type="text" name="{{$property->name}}" value="{{$producto->{$property->name} ?? ''}}" />
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<span id="end_campos"></span>
|
||||
<div class="row">
|
||||
<div class="ten wide column">
|
||||
<div class="field">
|
||||
<label>Descripción</label>
|
||||
<textarea rows="1" name="descripcion">{{$producto->descripcion ?? ''}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label>Imágenes</label>
|
||||
<input type="file" name="imagen" />
|
||||
</div>
|
||||
<div id="imagenes" class="ui list"></div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<button class="ui button">GUARDAR</button>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var producto = {
|
||||
months: {
|
||||
long: [],
|
||||
short: []
|
||||
},
|
||||
date: new Date(2018, 0, 1),
|
||||
listImage: (image) => {
|
||||
var icon = $('<i></i>').attr('class', 'trash alternate outline icon')
|
||||
icon.css('cursor', 'pointer').click(function() {
|
||||
var url = '{{$urls->admin}}/producto/{{$producto->id}}/imagen/delete'
|
||||
$.post(url, {imagen: image}, (data) => {
|
||||
if (data.estado) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
})
|
||||
$('#imagenes').append(
|
||||
$('<div></div>').attr('class', 'item').append(
|
||||
icon
|
||||
).append(
|
||||
$('<div></div>').attr('class', 'content').html(image)
|
||||
)
|
||||
)
|
||||
},
|
||||
setMonths: () => {
|
||||
for (i = 0; i < 12; i ++) {
|
||||
producto.date.setMonth(i)
|
||||
producto.months.long.push(producto.date.toLocaleString('es-ES', {month: "long"}).replace(
|
||||
/\w\S*/g,
|
||||
function(txt) {
|
||||
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
||||
}
|
||||
))
|
||||
producto.months.short.push(producto.date.toLocaleString('es-ES', {month: "short"}).replace(
|
||||
/\w\S*/g,
|
||||
function(txt) {
|
||||
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
||||
}
|
||||
))
|
||||
}
|
||||
},
|
||||
setup: () => {
|
||||
producto.setMonths()
|
||||
$('#segmento').dropdown({
|
||||
onChange: () => {
|
||||
producto.changeSegmento()
|
||||
}
|
||||
})
|
||||
$('#segmento').dropdown('set selected', '{{$producto->segmento}}')
|
||||
producto.linkCalendar()
|
||||
$('.checkbox').checkbox()
|
||||
@if ($producto->destacado())
|
||||
$('.checkbox').checkbox('set checked')
|
||||
@endif
|
||||
$("input[name='imagen']").change(function() {
|
||||
var data = new FormData()
|
||||
data.append('imagen', $(this)[0].files[0])
|
||||
var url = '{{$urls->admin}}/producto/{{$producto->id}}/imagenes/add'
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'post',
|
||||
data: data,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: (data) => {
|
||||
if (data.estado) {
|
||||
window.location.reload()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
@foreach ($producto->imagenes() as $image)
|
||||
producto.listImage('{{$image}}')
|
||||
@endforeach
|
||||
},
|
||||
linkCalendar: () => {
|
||||
var div = $("input[name='entrega']").parent()
|
||||
div.find('input').remove()
|
||||
div.append(
|
||||
$('<div></div>').attr('class', 'ui calendar').append(
|
||||
$('<input />').attr('type', 'text').attr('name', 'entrega').attr('placeholder', 'Entrega')
|
||||
)
|
||||
)
|
||||
$('.calendar').calendar({
|
||||
type: 'month',
|
||||
text: {
|
||||
months: producto.months.long,
|
||||
monthsShort: producto.months.short
|
||||
},
|
||||
formatInput: false,
|
||||
onChange: function(a, b) {
|
||||
if (typeof a == 'undefined') {
|
||||
a = new Date()
|
||||
}
|
||||
$(this).find('input').val(('0' + (a.getMonth() + 1)).slice(-2) + '/' + a.getFullYear())
|
||||
}
|
||||
})
|
||||
@if (isset($producto->entrega))
|
||||
var entrega = new Date('{{str_pad(implode('-', array_reverse(explode('/', $producto->entrega))), 7, '20', STR_PAD_LEFT)}}-01T01:00')
|
||||
$('.calendar').calendar('set date', entrega)
|
||||
@endif
|
||||
},
|
||||
changeSegmento: () => {
|
||||
var segmento = $('#segmento').dropdown('get value')
|
||||
if (segmento == '{{$producto->segmento}}') {
|
||||
return
|
||||
}
|
||||
var url = '{{$urls->admin}}/productos/campos'
|
||||
$.post(url, {segmento: segmento}, (data) => {
|
||||
var div = $('#campos')
|
||||
var end = $('#end_campos')
|
||||
var current = div.next()
|
||||
var next = current.next()
|
||||
if (current[0] == end[0] || next[0] == end[0]) {
|
||||
} else {
|
||||
while (next[0] != end[0] || next.length == 0) {
|
||||
current.remove()
|
||||
current = next
|
||||
next = next.next()
|
||||
}
|
||||
}
|
||||
$.each(data.fields, (i, el) => {
|
||||
var campo = $('<div></div>').attr('class', 'column').append(
|
||||
$('<div></div>').attr('class', 'field').append(
|
||||
$('<label></label>').html(el.label)
|
||||
).append(
|
||||
$('<input />').attr('type', 'text').attr('name', el.name)
|
||||
)
|
||||
)
|
||||
end.before(campo)
|
||||
})
|
||||
producto.linkCalendar()
|
||||
})
|
||||
}
|
||||
}
|
||||
$(document).ready(() => {
|
||||
producto.setup()
|
||||
})
|
||||
</script>
|
||||
@endpush
|
60
resources/views/admin/productos.blade.php
Normal file
@ -0,0 +1,60 @@
|
||||
@extends('admin.layout.base')
|
||||
|
||||
@section('page_content')
|
||||
<div class="ui grid">
|
||||
<div class="nine wide column">
|
||||
<div class="ui header">
|
||||
PRODUCTOS
|
||||
</div>
|
||||
<table class="ui table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="right aligned" colspan="3">
|
||||
<a href="{{$urls->admin}}/productos/add">
|
||||
<button class="ui button">NUEVO</button>
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Producto</th>
|
||||
<th class="center aligned">Editar</th>
|
||||
<th class="center aligned">Borrar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($productos as $producto)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{$urls->admin}}/producto/{{$producto->id}}">
|
||||
{{$producto->nombre}}
|
||||
</a>
|
||||
</td>
|
||||
<td class="center aligned">
|
||||
<a href="{{$urls->admin}}/producto/{{$producto->id}}">
|
||||
<i class="edit icon"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td class="center aligned"><i class="trash alternate outline icon" data-id="{{$producto->id}}"></i></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(() => {
|
||||
$('.trash.icon').css('cursor', 'pointer').click(function() {
|
||||
var id = $(this).attr('data-id')
|
||||
var url = '{{$urls->admin}}/productos/delete'
|
||||
$.post(url, {id: id}, (data) => {
|
||||
if (data.estado) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@endpush
|
154
resources/views/admin/productos/add.blade.php
Normal file
@ -0,0 +1,154 @@
|
||||
@extends('admin.layout.base')
|
||||
|
||||
@section('page_content')
|
||||
<div class="ui header">
|
||||
AGREGAR PRODUCTO
|
||||
</div>
|
||||
<form class="ui form" method="post" action="{{$urls->admin}}/productos/add" enctype="multipart/form-data">
|
||||
<div class="ui three columns grid">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label>Nombre</label>
|
||||
<input type="text" name="nombre" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="fields">
|
||||
<div class="field">
|
||||
<label>Dirección</label>
|
||||
<input type="text" name="calle" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Comuna</label>
|
||||
<input type="text" name="comuna" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Ciudad</label>
|
||||
<input type="text" name="ciudad" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label>Segmento</label>
|
||||
<div class="ui selection dropdown" id="segmento">
|
||||
<input type="hidden" name="segmento" />
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">Segmento</div>
|
||||
<div class="menu">
|
||||
@foreach ($segmentos as $segmento)
|
||||
<div class="item" data-value="{{$segmento->titulo}}">{{$segmento->titulo}}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label>Valor en UF</label>
|
||||
<input type="text" name="valor" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label>Destacado</label>
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" name="destacado" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="campos"></div>
|
||||
<div id="end_campos"></div>
|
||||
<div class="row">
|
||||
<div class="ten wide column">
|
||||
<div class="field">
|
||||
<label>Descripción</label>
|
||||
<textarea rows="1" name="descripcion"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<button class="ui button">AGREGAR</button>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var producto = {
|
||||
months: {
|
||||
long: [],
|
||||
short: []
|
||||
},
|
||||
date: new Date(2018, 0, 1),
|
||||
setMonths: () => {
|
||||
for (i = 0; i < 12; i ++) {
|
||||
producto.date.setMonth(i)
|
||||
producto.months.long.push(producto.date.toLocaleString('es-ES', {month: "long"}).replace(
|
||||
/\w\S*/g,
|
||||
function(txt) {
|
||||
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
||||
}
|
||||
))
|
||||
producto.months.short.push(producto.date.toLocaleString('es-ES', {month: "short"}).replace(
|
||||
/\w\S*/g,
|
||||
function(txt) {
|
||||
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
||||
}
|
||||
))
|
||||
}
|
||||
},
|
||||
setup: () => {
|
||||
producto.setMonths()
|
||||
$('#segmento').dropdown({
|
||||
onChange: () => {
|
||||
producto.changeSegmento()
|
||||
}
|
||||
})
|
||||
$('.calendar').calendar({
|
||||
type: 'month',
|
||||
text: {
|
||||
months: producto.months.long,
|
||||
monthsShort: producto.months.short
|
||||
},
|
||||
formatInput: false,
|
||||
onChange: function(a) {
|
||||
$(this).find('input').val(('0' + (a.getMonth() + 1)).slice(-2) + '/' + a.getFullYear())
|
||||
}
|
||||
})
|
||||
$('.checkbox').checkbox()
|
||||
},
|
||||
changeSegmento: () => {
|
||||
var segmento = $('#segmento').dropdown('get value')
|
||||
var url = '{{$urls->admin}}/productos/campos'
|
||||
$.post(url, {segmento: segmento}, (data) => {
|
||||
var div = $('#campos')
|
||||
var end = $('#end_campos')
|
||||
var current = div.next()
|
||||
var next = current.next()
|
||||
if (current[0] == end[0] || next[0] == end[0]) {
|
||||
} else {
|
||||
while (next[0] != end[0] || next.length == 0) {
|
||||
current.remove()
|
||||
current = next
|
||||
next = next.next()
|
||||
}
|
||||
}
|
||||
$.each(data.fields, (i, el) => {
|
||||
var campo = $('<div></div>').attr('class', 'column').append(
|
||||
$('<div></div>').attr('class', 'field').append(
|
||||
$('<label></label>').html(el.label)
|
||||
).append(
|
||||
$('<input />').attr('type', 'text').attr('name', el.name)
|
||||
)
|
||||
)
|
||||
end.before(campo)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
$(document).ready(() => {
|
||||
producto.setup()
|
||||
})
|
||||
</script>
|
||||
@endpush
|