diff --git a/clase20/app.js b/clase20/app.js new file mode 100644 index 0000000..62dff0d --- /dev/null +++ b/clase20/app.js @@ -0,0 +1,41 @@ +var createError = require('http-errors'); +var express = require('express'); +var path = require('path'); +var cookieParser = require('cookie-parser'); +var logger = require('morgan'); + +var indexRouter = require('./routes/index'); +var usersRouter = require('./routes/users'); + +var app = express(); + +// view engine setup +app.set('views', path.join(__dirname, 'views')); +app.set('view engine', 'ejs'); + +app.use(logger('dev')); +app.use(express.json()); +app.use(express.urlencoded({ extended: false })); +app.use(cookieParser()); +app.use(express.static(path.join(__dirname, 'public'))); + +app.use('/', indexRouter); +app.use('/users', usersRouter); + +// catch 404 and forward to error handler +app.use(function(req, res, next) { + next(createError(404)); +}); + +// error handler +app.use(function(err, req, res, next) { + // set locals, only providing error in development + res.locals.message = err.message; + res.locals.error = req.app.get('env') === 'development' ? err : {}; + + // render the error page + res.status(err.status || 500); + res.render('error'); +}); + +module.exports = app; diff --git a/clase20/bin/www b/clase20/bin/www new file mode 100644 index 0000000..671410a --- /dev/null +++ b/clase20/bin/www @@ -0,0 +1,90 @@ +#!/usr/bin/env node + +/** + * Module dependencies. + */ + +var app = require('../app'); +var debug = require('debug')('pimienta-sal:server'); +var http = require('http'); + +/** + * Get port from environment and store in Express. + */ + +var port = normalizePort(process.env.PORT || '3000'); +app.set('port', port); + +/** + * Create HTTP server. + */ + +var server = http.createServer(app); + +/** + * Listen on provided port, on all network interfaces. + */ + +server.listen(port); +server.on('error', onError); +server.on('listening', onListening); + +/** + * Normalize a port into a number, string, or false. + */ + +function normalizePort(val) { + var port = parseInt(val, 10); + + if (isNaN(port)) { + // named pipe + return val; + } + + if (port >= 0) { + // port number + return port; + } + + return false; +} + +/** + * Event listener for HTTP server "error" event. + */ + +function onError(error) { + if (error.syscall !== 'listen') { + throw error; + } + + var bind = typeof port === 'string' + ? 'Pipe ' + port + : 'Port ' + port; + + // handle specific listen errors with friendly messages + switch (error.code) { + case 'EACCES': + console.error(bind + ' requires elevated privileges'); + process.exit(1); + break; + case 'EADDRINUSE': + console.error(bind + ' is already in use'); + process.exit(1); + break; + default: + throw error; + } +} + +/** + * Event listener for HTTP server "listening" event. + */ + +function onListening() { + var addr = server.address(); + var bind = typeof addr === 'string' + ? 'pipe ' + addr + : 'port ' + addr.port; + debug('Listening on ' + bind); +} diff --git a/clase20/controllers/mainController.js b/clase20/controllers/mainController.js new file mode 100644 index 0000000..4d0c0ac --- /dev/null +++ b/clase20/controllers/mainController.js @@ -0,0 +1,52 @@ +const about = { + titulo: 'Pimienta & Sal', + descripcion: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute iruredolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.We only use seasonal ingredients.', + historia: 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod temporincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.' +} +const listaPlatos = [ + { + id:1, + titulo: 'Carpaccio fresco', + descripcionCorta: 'Entrada Carpaccio de salmón con cítricos', + descripcionDetallada: 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod temporincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', + precio: '65.50', + img: 'Carpaccio-de-salmon.jpg' + }, + { + id:2, + titulo: 'Risotto de berenjena', + descripcionCorta: 'Risotto de berenjena y queso de cabra', + descripcionDetallada: '', + precio: '47.00', + img: 'Risotto-berenjena-queso-cabra.jpg' + }, + { + id:3, + titulo: 'Mousse de arroz', + descripcionCorta: 'Mousse de arroz con leche y aroma de azahar', + descripcionDetallada: '', + precio: '27.50', + img: 'Mousse-de-arroz-con-leche.jpg' + }, + { + id:4, + titulo: 'Espárragos blancos', + descripcionCorta: 'Espárragos blancos con vinagreta de verduras y jamón ibérico', + descripcionDetallada: '', + precio: '37.50', + img: 'esparragos.png' + } +] + +const mainController = { + index: (req, res) => { + res.render("index", { about: about, menu: listaPlatos }); + }, + detalle: (req, res) => { + let plato = listaPlatos.find(plato => plato.id == req.params.menuId); + console.log(plato) + res.render("detalleMenu", { plato: plato }); + }, +}; + +module.exports = mainController; diff --git a/clase20/package-lock.json b/clase20/package-lock.json new file mode 100644 index 0000000..8b6719f --- /dev/null +++ b/clase20/package-lock.json @@ -0,0 +1,404 @@ +{ + "name": "pimienta-sal", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-parser": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.5.tgz", + "integrity": "sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw==", + "requires": { + "cookie": "0.4.0", + "cookie-signature": "1.0.6" + } + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.2.tgz", + "integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + } + } + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, + "morgan": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", + "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", + "requires": { + "basic-auth": "~2.0.0", + "debug": "2.6.9", + "depd": "~1.1.2", + "on-finished": "~2.3.0", + "on-headers": "~1.0.1" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "proxy-addr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.1" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + } + } +} diff --git a/clase20/package.json b/clase20/package.json new file mode 100644 index 0000000..1251d8f --- /dev/null +++ b/clase20/package.json @@ -0,0 +1,16 @@ +{ + "name": "pimienta-sal", + "version": "0.0.0", + "private": true, + "scripts": { + "start": "node ./bin/www" + }, + "dependencies": { + "cookie-parser": "~1.4.4", + "debug": "~2.6.9", + "ejs": "~2.6.1", + "express": "~4.16.1", + "http-errors": "~1.6.3", + "morgan": "~1.9.1" + } +} diff --git a/clase20/public/css/style.css b/clase20/public/css/style.css new file mode 100644 index 0000000..1d28a20 --- /dev/null +++ b/clase20/public/css/style.css @@ -0,0 +1,1318 @@ +html { + box-sizing: border-box; + overflow-x: hidden; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} +*, +*:before, +*:after { + box-sizing: inherit; +} +body { + font-family: "Times New Roman", Georgia, Serif; + margin: 0; + font-size: 15px; + line-height: 1.5; +} + +hr { + border: 0; + border-top: 1px solid #eee; + margin: 20px 0; +} +h1 { + font-size: 36px; +} +h2 { + font-size: 30px; +} +h3 { + font-size: 24px; +} +h4 { + font-size: 20px; +} +h5 { + font-size: 18px; +} +h6 { + font-size: 16px; +} +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: "Segoe UI", Arial, sans-serif; + font-weight: 400; + margin: 10px 0; +} +.ps-serif { + font-family: serif; +} +.ps-wide { + letter-spacing: 4px; +} +.ps-content { + max-width: 1600px !important; + min-width: 500px !important; +} + +.ps-img-menu { + width: 100%; +} +.ps-nav { + letter-spacing: 4px; +} +.ps-image { + max-width: 100%; + height: auto; +} +img { + vertical-align: middle; +} +a { + color: inherit; +} +.ps-bordered tr, +.ps-table-all tr { + border-bottom: 1px solid #ddd; +} +.ps-striped tbody tr:nth-child(even) { + background-color: #f1f1f1; +} +.ps-hoverable tbody tr:hover, +.ps-ul.ps-hoverable li:hover { + background-color: #ccc; +} +.ps-centered tr th, +.ps-centered tr td { + text-align: center; +} +.ps-btn, +.ps-button { + border: none; + display: inline-block; + padding: 8px 16px; + vertical-align: middle; + overflow: hidden; + text-decoration: none; + color: inherit; + background-color: inherit; + text-align: center; + cursor: pointer; + white-space: nowrap; +} +.ps-btn:hover { + box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); +} +.ps-btn, +.ps-button { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.ps-disabled, +.ps-btn:disabled, +.ps-button:disabled { + cursor: not-allowed; + opacity: 0.3; +} +.ps-disabled *, +:disabled * { + pointer-events: none; +} +.ps-btn.ps-disabled:hover, +.ps-btn:disabled:hover { + box-shadow: none; +} +.ps-badge, +.ps-tag { + background-color: #000; + color: #fff; + display: inline-block; + padding-left: 8px; + padding-right: 8px; + text-align: center; +} +.ps-badge { + border-radius: 50%; +} +.ps-ul { + list-style-type: none; + padding: 0; + margin: 0; +} +.ps-ul li { + padding: 8px 16px; + border-bottom: 1px solid #ddd; +} +.ps-ul li:last-child { + border-bottom: none; +} +.ps-tooltip, +.ps-display-container { + position: relative; +} +.ps-tooltip .ps-text { + display: none; +} +.ps-tooltip:hover .ps-text { + display: inline-block; +} +.ps-ripple:active { + opacity: 0.5; +} +.ps-ripple { + transition: opacity 0s; +} +.ps-check, +.ps-radio { + width: 24px; + height: 24px; + position: relative; + top: 6px; +} +.ps-sidebar { + height: 100%; + width: 200px; + background-color: #fff; + position: fixed !important; + z-index: 1; + overflow: auto; +} +.ps-bar-block .ps-dropdown-hover, +.ps-bar-block .ps-dropdown-click { + width: 100%; +} +.ps-bar-block .ps-dropdown-hover .ps-dropdown-content, +.ps-bar-block .ps-dropdown-click .ps-dropdown-content { + min-width: 100%; +} +.ps-bar-block .ps-dropdown-hover .ps-button, +.ps-bar-block .ps-dropdown-click .ps-button { + width: 100%; + text-align: left; + padding: 8px 16px; +} +.ps-main, +#main { + transition: margin-left 0.4s; +} +.ps-modal { + z-index: 3; + display: none; + padding-top: 100px; + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: auto; + background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 0.4); +} +.ps-modal-content { + margin: auto; + background-color: #fff; + position: relative; + padding: 0; + outline: 0; + width: 600px; +} +.ps-bar { + width: 100%; + overflow: hidden; +} +.ps-center .ps-bar { + display: inline-block; + width: auto; +} +.ps-bar .ps-bar-item { + padding: 8px 16px; + float: left; + width: auto; + border: none; + display: block; + outline: 0; +} +.ps-bar .ps-dropdown-hover, +.ps-bar .ps-dropdown-click { + position: static; + float: left; +} +.ps-bar .ps-button { + white-space: normal; +} +.ps-bar-block .ps-bar-item { + width: 100%; + display: block; + padding: 8px 16px; + text-align: left; + border: none; + white-space: normal; + float: none; + outline: 0; +} +.ps-bar-block.ps-center .ps-bar-item { + text-align: center; +} +.ps-block { + display: block; + width: 100%; +} +.ps-responsive { + display: block; + overflow-x: auto; +} +.ps-container:after, +.ps-container:before, +.ps-panel:after, +.ps-panel:before, +.ps-row:after, +.ps-row:before, +.ps-row-padding:after, +.ps-row-padding:before, +.ps-cell-row:before, +.ps-cell-row:after, +.ps-clear:after, +.ps-clear:before, +.ps-bar:before, +.ps-bar:after { + content: ""; + display: table; + clear: both; +} +.ps-col, +.ps-half, +.ps-third, +.ps-twothird, +.ps-threequarter, +.ps-quarter { + float: left; + width: 100%; +} +.ps-col.s1 { + width: 8.33333%; +} +.ps-col.s2 { + width: 16.66666%; +} +.ps-col.s3 { + width: 24.99999%; +} +.ps-col.s4 { + width: 33.33333%; +} +.ps-col.s5 { + width: 41.66666%; +} +.ps-col.s6 { + width: 49.99999%; +} +.ps-col.s7 { + width: 58.33333%; +} +.ps-col.s8 { + width: 66.66666%; +} +.ps-col.s9 { + width: 74.99999%; +} +.ps-col.s10 { + width: 83.33333%; +} +.ps-col.s11 { + width: 91.66666%; +} +.ps-col.s12 { + width: 99.99999%; +} +@media (min-width: 601px) { + .ps-col.m1 { + width: 8.33333%; + } + .ps-col.m2 { + width: 16.66666%; + } + .ps-col.m3, + .ps-quarter { + width: 24.99999%; + } + .ps-col.m4, + .ps-third { + width: 33.33333%; + } + .ps-col.m5 { + width: 41.66666%; + } + .ps-col.m6, + .ps-half { + width: 49.99999%; + } + .ps-col.m7 { + width: 58.33333%; + } + .ps-col.m8, + .ps-twothird { + width: 66.66666%; + } + .ps-col.m9, + .ps-threequarter { + width: 74.99999%; + } + .ps-col.m10 { + width: 83.33333%; + } + .ps-col.m11 { + width: 91.66666%; + } + .ps-col.m12 { + width: 99.99999%; + } +} +@media (min-width: 993px) { + .ps-col.l1 { + width: 8.33333%; + } + .ps-col.l2 { + width: 16.66666%; + } + .ps-col.l3 { + width: 24.99999%; + } + .ps-col.l4 { + width: 33.33333%; + } + .ps-col.l5 { + width: 41.66666%; + } + .ps-col.l6 { + width: 49.99999%; + } + .ps-col.l7 { + width: 58.33333%; + } + .ps-col.l8 { + width: 66.66666%; + } + .ps-col.l9 { + width: 74.99999%; + } + .ps-col.l10 { + width: 83.33333%; + } + .ps-col.l11 { + width: 91.66666%; + } + .ps-col.l12 { + width: 99.99999%; + } +} +.ps-rest { + overflow: hidden; +} +.ps-stretch { + margin-left: -16px; + margin-right: -16px; +} +.ps-content, +.ps-auto { + margin-left: auto; + margin-right: auto; +} +.ps-content { + max-width: 980px; +} +.ps-auto { + max-width: 1140px; +} +.ps-cell-row { + display: table; + width: 100%; +} +.ps-cell { + display: table-cell; +} +.ps-cell-top { + vertical-align: top; +} +.ps-cell-middle { + vertical-align: middle; +} +.ps-cell-bottom { + vertical-align: bottom; +} +.ps-hide { + display: none !important; +} +.ps-show-block, +.ps-show { + display: block !important; +} +.ps-show-inline-block { + display: inline-block !important; +} +@media (max-width: 1205px) { + .ps-auto { + max-width: 95%; + } +} +@media (max-width: 600px) { + .ps-modal-content { + margin: 0 10px; + width: auto !important; + } + .ps-modal { + padding-top: 30px; + } + .ps-dropdown-hover.ps-mobile .ps-dropdown-content, + .ps-dropdown-click.ps-mobile .ps-dropdown-content { + position: relative; + } + .ps-hide-small { + display: none !important; + } + .ps-mobile { + display: block; + width: 100% !important; + } + .ps-bar-item.ps-mobile, + .ps-dropdown-hover.ps-mobile, + .ps-dropdown-click.ps-mobile { + text-align: center; + } + .ps-dropdown-hover.ps-mobile, + .ps-dropdown-hover.ps-mobile .ps-btn, + .ps-dropdown-hover.ps-mobile .ps-button, + .ps-dropdown-click.ps-mobile, + .ps-dropdown-click.ps-mobile .ps-btn, + .ps-dropdown-click.ps-mobile .ps-button { + width: 100%; + } +} +@media (max-width: 768px) { + .ps-modal-content { + width: 500px; + } + .ps-modal { + padding-top: 50px; + } +} +@media (min-width: 993px) { + .ps-modal-content { + width: 900px; + } + .ps-hide-large { + display: none !important; + } + .ps-sidebar.ps-collapse { + display: block !important; + } +} +@media (max-width: 992px) and (min-width: 601px) { + .ps-hide-medium { + display: none !important; + } +} +@media (max-width: 992px) { + .ps-sidebar.ps-collapse { + display: none; + } + .ps-main { + margin-left: 0 !important; + margin-right: 0 !important; + } + .ps-auto { + max-width: 100%; + } +} +.ps-top, +.ps-bottom { + position: fixed; + width: 100%; + z-index: 1; +} +.ps-top { + top: 0; +} +.ps-bottom { + bottom: 0; +} +.ps-overlay { + position: fixed; + display: none; + width: 100%; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + z-index: 2; +} +.ps-display-bottomleft { + position: absolute; + left: 0; + bottom: 0; +} +.ps-display-bottomright { + position: absolute; + right: 0; + bottom: 0; +} +.ps-display-container:hover .ps-display-hover { + display: block; +} +.ps-display-container:hover span.ps-display-hover { + display: inline-block; +} +.ps-display-hover { + display: none; +} +.ps-circle { + border-radius: 50%; +} +.ps-round-small { + border-radius: 2px; +} +.ps-round, +.ps-round-medium { + border-radius: 4px; +} +.ps-round-large { + border-radius: 8px; +} +.ps-round-xlarge { + border-radius: 16px; +} +.ps-round-xxlarge { + border-radius: 32px; +} +.ps-row-padding, +.ps-row-padding > .ps-half, +.ps-row-padding > .ps-third, +.ps-row-padding > .ps-twothird, +.ps-row-padding > .ps-threequarter, +.ps-row-padding > .ps-quarter, +.ps-row-padding > .ps-col { + padding: 0 8px; +} +.ps-container, +.ps-panel { + padding: 0.01em 16px; +} +.ps-panel { + margin-top: 16px; + margin-bottom: 16px; +} +.ps-code, +.ps-codespan { + font-family: Consolas, "courier new"; + font-size: 16px; +} +.ps-code { + width: auto; + background-color: #fff; + padding: 8px 12px; + border-left: 4px solid #4caf50; + word-wrap: break-word; +} +.ps-codespan { + color: crimson; + background-color: #f1f1f1; + padding-left: 4px; + padding-right: 4px; + font-size: 110%; +} +.ps-card, +.ps-card-2 { + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); +} +.ps-card-4, +.ps-hover-shadow:hover { + box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.19); +} +.ps-spin { + animation: ps-spin 2s infinite linear; +} +@keyframes ps-spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(359deg); + } +} +.ps-animate-fading { + animation: fading 10s infinite; +} +@keyframes fading { + 0% { + opacity: 0; + } + 50% { + opacity: 1; + } + 100% { + opacity: 0; + } +} +.ps-animate-opacity { + animation: opac 0.8s; +} +@keyframes opac { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +.ps-animate-top { + position: relative; + animation: animatetop 0.4s; +} +@keyframes animatetop { + from { + top: -300px; + opacity: 0; + } + to { + top: 0; + opacity: 1; + } +} +.ps-animate-left { + position: relative; + animation: animateleft 0.4s; +} +@keyframes animateleft { + from { + left: -300px; + opacity: 0; + } + to { + left: 0; + opacity: 1; + } +} +.ps-animate-right { + position: relative; + animation: animateright 0.4s; +} +@keyframes animateright { + from { + right: -300px; + opacity: 0; + } + to { + right: 0; + opacity: 1; + } +} +.ps-animate-bottom { + position: relative; + animation: animatebottom 0.4s; +} +@keyframes animatebottom { + from { + bottom: -300px; + opacity: 0; + } + to { + bottom: 0; + opacity: 1; + } +} +.ps-animate-zoom { + animation: animatezoom 0.6s; +} +@keyframes animatezoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +.ps-animate-input { + transition: width 0.4s ease-in-out; +} +.ps-animate-input:focus { + width: 100% !important; +} +.ps-opacity, +.ps-hover-opacity:hover { + opacity: 0.6; +} +.ps-opacity-off, +.ps-hover-opacity-off:hover { + opacity: 1; +} +.ps-opacity-max { + opacity: 0.25; +} +.ps-opacity-min { + opacity: 0.75; +} +.ps-greyscale-max, +.ps-grayscale-max, +.ps-hover-greyscale:hover, +.ps-hover-grayscale:hover { + filter: grayscale(100%); +} +.ps-greyscale, +.ps-grayscale { + filter: grayscale(75%); +} +.ps-greyscale-min, +.ps-grayscale-min { + filter: grayscale(50%); +} +.ps-sepia { + filter: sepia(75%); +} +.ps-sepia-max, +.ps-hover-sepia:hover { + filter: sepia(100%); +} +.ps-sepia-min { + filter: sepia(50%); +} +.ps-tiny { + font-size: 10px !important; +} +.ps-small { + font-size: 12px !important; +} +.ps-medium { + font-size: 15px !important; +} +.ps-large { + font-size: 18px !important; +} +.ps-xlarge { + font-size: 24px !important; +} +.ps-xxlarge { + font-size: 36px !important; +} +.ps-xxxlarge { + font-size: 48px !important; +} +.ps-jumbo { + font-size: 64px !important; +} +.ps-left-align { + text-align: left !important; +} +.ps-right-align { + text-align: right !important; +} +.ps-justify { + text-align: justify !important; +} +.ps-center { + text-align: center !important; +} +.ps-border-0 { + border: 0 !important; +} +.ps-border { + border: 1px solid #ccc !important; +} +.ps-border-top { + border-top: 1px solid #ccc !important; +} +.ps-border-bottom { + border-bottom: 1px solid #ccc !important; +} +.ps-border-left { + border-left: 1px solid #ccc !important; +} +.ps-border-right { + border-right: 1px solid #ccc !important; +} +.ps-topbar { + border-top: 6px solid #ccc !important; +} +.ps-bottombar { + border-bottom: 6px solid #ccc !important; +} +.ps-leftbar { + border-left: 6px solid #ccc !important; +} +.ps-rightbar { + border-right: 6px solid #ccc !important; +} +.ps-section, +.ps-code { + margin-top: 16px !important; + margin-bottom: 16px !important; +} +.ps-margin { + margin: 16px !important; +} +.ps-margin-top { + margin-top: 16px !important; +} +.ps-margin-bottom { + margin-bottom: 16px !important; +} +.ps-margin-left { + margin-left: 16px !important; +} +.ps-margin-right { + margin-right: 16px !important; +} +.ps-padding-small { + padding: 4px 8px !important; +} +.ps-padding { + padding: 8px 16px !important; +} +.ps-padding-large { + padding: 12px 24px !important; +} +.ps-padding-16 { + padding-top: 16px !important; + padding-bottom: 16px !important; +} +.ps-padding-24 { + padding-top: 24px !important; + padding-bottom: 24px !important; +} +.ps-padding-32 { + padding-top: 32px !important; + padding-bottom: 32px !important; +} +.ps-padding-48 { + padding-top: 48px !important; + padding-bottom: 48px !important; +} +.ps-padding-64 { + padding-top: 64px !important; + padding-bottom: 64px !important; +} +.ps-left { + float: left !important; +} +.ps-right { + float: right !important; +} +.ps-button:hover { + color: #000 !important; + background-color: #ccc !important; +} +.ps-transparent, +.ps-hover-none:hover { + background-color: transparent !important; +} +.ps-hover-none:hover { + box-shadow: none !important; +} +/* Colors */ +.ps-amber, +.ps-hover-amber:hover { + color: #000 !important; + background-color: #ffc107 !important; +} +.ps-aqua, +.ps-hover-aqua:hover { + color: #000 !important; + background-color: #00ffff !important; +} +.ps-blue, +.ps-hover-blue:hover { + color: #fff !important; + background-color: #2196f3 !important; +} +.ps-light-blue, +.ps-hover-light-blue:hover { + color: #000 !important; + background-color: #87ceeb !important; +} +.ps-brown, +.ps-hover-brown:hover { + color: #fff !important; + background-color: #795548 !important; +} +.ps-cyan, +.ps-hover-cyan:hover { + color: #000 !important; + background-color: #00bcd4 !important; +} +.ps-blue-grey, +.ps-hover-blue-grey:hover, +.ps-blue-gray, +.ps-hover-blue-gray:hover { + color: #fff !important; + background-color: #607d8b !important; +} +.ps-green, +.ps-hover-green:hover { + color: #fff !important; + background-color: #4caf50 !important; +} +.ps-light-green, +.ps-hover-light-green:hover { + color: #000 !important; + background-color: #8bc34a !important; +} +.ps-indigo, +.ps-hover-indigo:hover { + color: #fff !important; + background-color: #3f51b5 !important; +} +.ps-khaki, +.ps-hover-khaki:hover { + color: #000 !important; + background-color: #f0e68c !important; +} +.ps-lime, +.ps-hover-lime:hover { + color: #000 !important; + background-color: #cddc39 !important; +} +.ps-orange, +.ps-hover-orange:hover { + color: #000 !important; + background-color: #ff9800 !important; +} +.ps-deep-orange, +.ps-hover-deep-orange:hover { + color: #fff !important; + background-color: #ff5722 !important; +} +.ps-pink, +.ps-hover-pink:hover { + color: #fff !important; + background-color: #e91e63 !important; +} +.ps-purple, +.ps-hover-purple:hover { + color: #fff !important; + background-color: #9c27b0 !important; +} +.ps-deep-purple, +.ps-hover-deep-purple:hover { + color: #fff !important; + background-color: #673ab7 !important; +} +.ps-red, +.ps-hover-red:hover { + color: #fff !important; + background-color: #f44336 !important; +} +.ps-sand, +.ps-hover-sand:hover { + color: #000 !important; + background-color: #fdf5e6 !important; +} +.ps-teal, +.ps-hover-teal:hover { + color: #fff !important; + background-color: #009688 !important; +} +.ps-yellow, +.ps-hover-yellow:hover { + color: #000 !important; + background-color: #ffeb3b !important; +} +.ps-white, +.ps-hover-white:hover { + color: #000 !important; + background-color: #fff !important; +} +.ps-black, +.ps-hover-black:hover { + color: #fff !important; + background-color: #000 !important; +} +.ps-grey, +.ps-hover-grey:hover, +.ps-gray, +.ps-hover-gray:hover { + color: #000 !important; + background-color: #9e9e9e !important; +} +.ps-light-grey, +.ps-hover-light-grey:hover, +.ps-light-gray, +.ps-hover-light-gray:hover { + color: #000 !important; + background-color: #f1f1f1 !important; +} +.ps-dark-grey, +.ps-hover-dark-grey:hover, +.ps-dark-gray, +.ps-hover-dark-gray:hover { + color: #fff !important; + background-color: #616161 !important; +} +.ps-pale-red, +.ps-hover-pale-red:hover { + color: #000 !important; + background-color: #ffdddd !important; +} +.ps-pale-green, +.ps-hover-pale-green:hover { + color: #000 !important; + background-color: #ddffdd !important; +} +.ps-pale-yellow, +.ps-hover-pale-yellow:hover { + color: #000 !important; + background-color: #ffffcc !important; +} +.ps-pale-blue, +.ps-hover-pale-blue:hover { + color: #000 !important; + background-color: #ddffff !important; +} +.ps-text-amber, +.ps-hover-text-amber:hover { + color: #ffc107 !important; +} +.ps-text-aqua, +.ps-hover-text-aqua:hover { + color: #00ffff !important; +} +.ps-text-blue, +.ps-hover-text-blue:hover { + color: #2196f3 !important; +} +.ps-text-light-blue, +.ps-hover-text-light-blue:hover { + color: #87ceeb !important; +} +.ps-text-brown, +.ps-hover-text-brown:hover { + color: #795548 !important; +} +.ps-text-cyan, +.ps-hover-text-cyan:hover { + color: #00bcd4 !important; +} +.ps-text-blue-grey, +.ps-hover-text-blue-grey:hover, +.ps-text-blue-gray, +.ps-hover-text-blue-gray:hover { + color: #607d8b !important; +} +.ps-text-green, +.ps-hover-text-green:hover { + color: #4caf50 !important; +} +.ps-text-light-green, +.ps-hover-text-light-green:hover { + color: #8bc34a !important; +} +.ps-text-indigo, +.ps-hover-text-indigo:hover { + color: #3f51b5 !important; +} +.ps-text-khaki, +.ps-hover-text-khaki:hover { + color: #b4aa50 !important; +} +.ps-text-lime, +.ps-hover-text-lime:hover { + color: #cddc39 !important; +} +.ps-text-orange, +.ps-hover-text-orange:hover { + color: #ff9800 !important; +} +.ps-text-deep-orange, +.ps-hover-text-deep-orange:hover { + color: #ff5722 !important; +} +.ps-text-pink, +.ps-hover-text-pink:hover { + color: #e91e63 !important; +} +.ps-text-purple, +.ps-hover-text-purple:hover { + color: #9c27b0 !important; +} +.ps-text-deep-purple, +.ps-hover-text-deep-purple:hover { + color: #673ab7 !important; +} +.ps-text-red, +.ps-hover-text-red:hover { + color: #f44336 !important; +} +.ps-text-sand, +.ps-hover-text-sand:hover { + color: #fdf5e6 !important; +} +.ps-text-teal, +.ps-hover-text-teal:hover { + color: #009688 !important; +} +.ps-text-yellow, +.ps-hover-text-yellow:hover { + color: #d2be0e !important; +} +.ps-text-white, +.ps-hover-text-white:hover { + color: #fff !important; +} +.ps-text-black, +.ps-hover-text-black:hover { + color: #000 !important; +} +.ps-text-grey, +.ps-hover-text-grey:hover, +.ps-text-gray, +.ps-hover-text-gray:hover { + color: #757575 !important; +} +.ps-text-light-grey, +.ps-hover-text-light-grey:hover, +.ps-text-light-gray, +.ps-hover-text-light-gray:hover { + color: #f1f1f1 !important; +} +.ps-text-dark-grey, +.ps-hover-text-dark-grey:hover, +.ps-text-dark-gray, +.ps-hover-text-dark-gray:hover { + color: #3a3a3a !important; +} +.ps-border-amber, +.ps-hover-border-amber:hover { + border-color: #ffc107 !important; +} +.ps-border-aqua, +.ps-hover-border-aqua:hover { + border-color: #00ffff !important; +} +.ps-border-blue, +.ps-hover-border-blue:hover { + border-color: #2196f3 !important; +} +.ps-border-light-blue, +.ps-hover-border-light-blue:hover { + border-color: #87ceeb !important; +} +.ps-border-brown, +.ps-hover-border-brown:hover { + border-color: #795548 !important; +} +.ps-border-cyan, +.ps-hover-border-cyan:hover { + border-color: #00bcd4 !important; +} +.ps-border-blue-grey, +.ps-hover-border-blue-grey:hover, +.ps-border-blue-gray, +.ps-hover-border-blue-gray:hover { + border-color: #607d8b !important; +} +.ps-border-green, +.ps-hover-border-green:hover { + border-color: #4caf50 !important; +} +.ps-border-light-green, +.ps-hover-border-light-green:hover { + border-color: #8bc34a !important; +} +.ps-border-indigo, +.ps-hover-border-indigo:hover { + border-color: #3f51b5 !important; +} +.ps-border-khaki, +.ps-hover-border-khaki:hover { + border-color: #f0e68c !important; +} +.ps-border-lime, +.ps-hover-border-lime:hover { + border-color: #cddc39 !important; +} +.ps-border-orange, +.ps-hover-border-orange:hover { + border-color: #ff9800 !important; +} +.ps-border-deep-orange, +.ps-hover-border-deep-orange:hover { + border-color: #ff5722 !important; +} +.ps-border-pink, +.ps-hover-border-pink:hover { + border-color: #e91e63 !important; +} +.ps-border-purple, +.ps-hover-border-purple:hover { + border-color: #9c27b0 !important; +} +.ps-border-deep-purple, +.ps-hover-border-deep-purple:hover { + border-color: #673ab7 !important; +} +.ps-border-red, +.ps-hover-border-red:hover { + border-color: #f44336 !important; +} +.ps-border-sand, +.ps-hover-border-sand:hover { + border-color: #fdf5e6 !important; +} +.ps-border-teal, +.ps-hover-border-teal:hover { + border-color: #009688 !important; +} +.ps-border-yellow, +.ps-hover-border-yellow:hover { + border-color: #ffeb3b !important; +} +.ps-border-white, +.ps-hover-border-white:hover { + border-color: #fff !important; +} +.ps-border-black, +.ps-hover-border-black:hover { + border-color: #000 !important; +} +.ps-border-grey, +.ps-hover-border-grey:hover, +.ps-border-gray, +.ps-hover-border-gray:hover { + border-color: #9e9e9e !important; +} +.ps-border-light-grey, +.ps-hover-border-light-grey:hover, +.ps-border-light-gray, +.ps-hover-border-light-gray:hover { + border-color: #f1f1f1 !important; +} +.ps-border-dark-grey, +.ps-hover-border-dark-grey:hover, +.ps-border-dark-gray, +.ps-hover-border-dark-gray:hover { + border-color: #616161 !important; +} +.ps-border-pale-red, +.ps-hover-border-pale-red:hover { + border-color: #ffe7e7 !important; +} +.ps-border-pale-green, +.ps-hover-border-pale-green:hover { + border-color: #e7ffe7 !important; +} +.ps-border-pale-yellow, +.ps-hover-border-pale-yellow:hover { + border-color: #ffffcc !important; +} +.ps-border-pale-blue, +.ps-hover-border-pale-blue:hover { + border-color: #e7ffff !important; +} diff --git a/clase20/public/images/Carpaccio-de-salmon.jpg b/clase20/public/images/Carpaccio-de-salmon.jpg new file mode 100644 index 0000000..8131fd9 Binary files /dev/null and b/clase20/public/images/Carpaccio-de-salmon.jpg differ diff --git a/clase20/public/images/Mousse-de-arroz-con-leche.jpg b/clase20/public/images/Mousse-de-arroz-con-leche.jpg new file mode 100644 index 0000000..893c741 Binary files /dev/null and b/clase20/public/images/Mousse-de-arroz-con-leche.jpg differ diff --git a/clase20/public/images/Risotto-berenjena-queso-cabra.jpg b/clase20/public/images/Risotto-berenjena-queso-cabra.jpg new file mode 100644 index 0000000..cac31bb Binary files /dev/null and b/clase20/public/images/Risotto-berenjena-queso-cabra.jpg differ diff --git a/clase20/public/images/esparragos.png b/clase20/public/images/esparragos.png new file mode 100644 index 0000000..20d720a Binary files /dev/null and b/clase20/public/images/esparragos.png differ diff --git a/clase20/public/images/header.jpg b/clase20/public/images/header.jpg new file mode 100644 index 0000000..f2c6de4 Binary files /dev/null and b/clase20/public/images/header.jpg differ diff --git a/clase20/public/images/menu.jpg b/clase20/public/images/menu.jpg new file mode 100644 index 0000000..69db584 Binary files /dev/null and b/clase20/public/images/menu.jpg differ diff --git a/clase20/public/images/principal.jpg b/clase20/public/images/principal.jpg new file mode 100644 index 0000000..59318ac Binary files /dev/null and b/clase20/public/images/principal.jpg differ diff --git a/clase20/routes/index.js b/clase20/routes/index.js new file mode 100644 index 0000000..596f3f2 --- /dev/null +++ b/clase20/routes/index.js @@ -0,0 +1,8 @@ +var express = require('express'); +var router = express.Router(); +const mainController = require('../controllers/mainController'); + +/* GET home page. */ +router.get('/', mainController.index); +router.get('/detalle/:menuId/', mainController.detalle); +module.exports = router; diff --git a/clase20/routes/users.js b/clase20/routes/users.js new file mode 100644 index 0000000..623e430 --- /dev/null +++ b/clase20/routes/users.js @@ -0,0 +1,9 @@ +var express = require('express'); +var router = express.Router(); + +/* GET users listing. */ +router.get('/', function(req, res, next) { + res.send('respond with a resource'); +}); + +module.exports = router; diff --git a/clase20/views/detalleMenu.ejs b/clase20/views/detalleMenu.ejs new file mode 100644 index 0000000..51729bd --- /dev/null +++ b/clase20/views/detalleMenu.ejs @@ -0,0 +1,46 @@ + + +
++ <%= about.descripcion %> +
+ +