From c99be336862ba06971bfaa4679460335523b97ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?= Date: Sun, 19 Apr 2020 18:11:54 +0200 Subject: [PATCH 01/11] =?UTF-8?q?#41=20Implantaci=C3=B3n=20de=20nuxt=20en?= =?UTF-8?q?=20el=20proyecto=20en=20sustituci=C3=B3n=20de=20vue-cli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .babelrc | 12 + .env.example | 1 - .eslintrc | 8 +- .gitignore | 1 + {src/assets => assets}/banner.gif | Bin {src => assets}/styles/_variables.scss | 0 babel.config.js | 5 - {src/components => components}/ActorCard.vue | 28 +- .../components => components}/ChapterCard.vue | 28 +- .../CharacterCard.vue | 24 +- {src/components => components}/Footer.vue | 4 +- {src/components => components}/Header.vue | 2 +- {src/components => components}/Menu.vue | 70 +- jest.config.js | 24 +- src/App.vue => layouts/default.vue | 14 +- locales/es.js | 131 + middleware/README.md | 8 + nuxt.config.js | 99 + package-lock.json | 31618 ++++++++-------- package.json | 51 +- pages/actors/_slug/index.vue | 166 + .../Actors.vue => pages/actors/index.vue | 61 +- pages/characters/_slug/index.vue | 169 + .../characters/index.vue | 62 +- src/views/Home.vue => pages/index.vue | 89 +- .../_season_number/chapters/_slug/index.vue | 142 +- .../Season.vue => pages/seasons/index.vue | 68 +- plugins/README.md | 7 + .../plugins => plugins}/anhqvClient/client.js | 0 {src/plugins => plugins}/anhqvClient/index.js | 4 +- plugins/element-ui.js | 5 + plugins/nuxt-anhqv-client.js | 6 + {src/plugins => plugins}/vueAnhqvClient.js | 0 public/index.html | 14 - server.js | 22 - src/i18n.js | 23 - src/locales/es.json | 132 - src/main.js | 39 - src/router/index.js | 86 - src/store/index.js | 9 - src/store/modules/index.js | 9 - src/views/ActorDetail.vue | 130 - src/views/CharacterDetail.vue | 126 - .../images/actors/adria-collado.jpg | Bin .../images/actors/antonio-gomez.jpg | Bin .../images/actors/dani-ballesteros.jpg | Bin .../images/actors/daniel-guzman.jpg | Bin .../images/actors/desconocido.jpg | Bin .../images/actors/edu-garcia.jpg | Bin .../images/actors/eduardo-gomez.jpg | Bin .../images/actors/emma-penella.jpg | Bin .../images/actors/fernando-tejero.jpg | Bin .../images/actors/gemma-cuervo.jpg | Bin .../images/actors/guillermo-ortega.jpg | Bin .../images/actors/jose-luis-gil.jpg | Bin .../images/actors/joseba-apaolaza.jpg | Bin .../images/actors/laura-pamplona.jpg | Bin .../images/actors/loles-leon.jpg | Bin .../images/actors/luis-merlo.jpg | Bin .../images/actors/malena-alterio.jpg | Bin .../images/actors/maria-adanez.jpg | Bin .../images/actors/marivi-bilbao.jpg | Bin .../images/actors/santiago-segura.jpg | Bin .../images/actors/sofia-nieto.jpg | Bin {public => static}/images/chapters/1x01.jpg | Bin {public => static}/images/chapters/1x02.jpg | Bin {public => static}/images/chapters/1x03.jpg | Bin {public => static}/images/chapters/1x04.jpg | Bin {public => static}/images/chapters/1x05.jpg | Bin {public => static}/images/chapters/1x06.jpg | Bin {public => static}/images/chapters/1x07.jpg | Bin {public => static}/images/chapters/1x08.jpg | Bin {public => static}/images/chapters/1x09.jpg | Bin {public => static}/images/chapters/1x10.jpg | Bin {public => static}/images/chapters/1x11.jpg | Bin {public => static}/images/chapters/1x12.jpg | Bin {public => static}/images/chapters/1x13.jpg | Bin {public => static}/images/chapters/1x14.jpg | Bin {public => static}/images/chapters/1x15.jpg | Bin {public => static}/images/chapters/1x16.jpg | Bin {public => static}/images/chapters/1x17.jpg | Bin {public => static}/images/chapters/2x01.jpg | Bin {public => static}/images/chapters/2x02.jpg | Bin {public => static}/images/chapters/2x03.jpg | Bin {public => static}/images/chapters/2x04.jpg | Bin {public => static}/images/chapters/2x05.jpg | Bin {public => static}/images/chapters/2x06.jpg | Bin {public => static}/images/chapters/2x07.jpg | Bin {public => static}/images/chapters/2x08.jpg | Bin {public => static}/images/chapters/2x09.jpg | Bin {public => static}/images/chapters/2x10.jpg | Bin {public => static}/images/chapters/2x11.jpg | Bin {public => static}/images/chapters/2x12.jpg | Bin {public => static}/images/chapters/2x13.jpg | Bin {public => static}/images/chapters/2x14.jpg | Bin {public => static}/images/chapters/3x01.jpg | Bin {public => static}/images/chapters/3x02.jpg | Bin {public => static}/images/chapters/3x03.jpg | Bin {public => static}/images/chapters/3x04.jpg | Bin {public => static}/images/chapters/3x05.jpg | Bin {public => static}/images/chapters/3x06.jpg | Bin {public => static}/images/chapters/3x07.jpg | Bin {public => static}/images/chapters/3x07b.jpg | Bin {public => static}/images/chapters/3x08.jpg | Bin {public => static}/images/chapters/3x09.jpg | Bin {public => static}/images/chapters/3x10.jpg | Bin {public => static}/images/chapters/3x11.jpg | Bin {public => static}/images/chapters/3x12.jpg | Bin {public => static}/images/chapters/3x13.jpg | Bin {public => static}/images/chapters/3x14.jpg | Bin {public => static}/images/chapters/3x15.jpg | Bin {public => static}/images/chapters/3x16.jpg | Bin {public => static}/images/chapters/3x17.jpg | Bin {public => static}/images/chapters/3x18.jpg | Bin {public => static}/images/chapters/3x19.jpg | Bin {public => static}/images/chapters/3x20.jpg | Bin {public => static}/images/chapters/3x21.jpg | Bin {public => static}/images/chapters/3x22.jpg | Bin {public => static}/images/chapters/3x23.jpg | Bin {public => static}/images/chapters/3x24.jpg | Bin {public => static}/images/chapters/3x25.jpg | Bin {public => static}/images/chapters/3x25b.jpg | Bin {public => static}/images/chapters/3x26.jpg | Bin {public => static}/images/chapters/3x27.jpg | Bin {public => static}/images/chapters/3x28.jpg | Bin {public => static}/images/chapters/3x29.jpg | Bin {public => static}/images/chapters/3x30.jpg | Bin {public => static}/images/chapters/3x31.jpg | Bin {public => static}/images/chapters/3x32.jpg | Bin {public => static}/images/chapters/3x33.jpg | Bin {public => static}/images/chapters/4x01.jpg | Bin {public => static}/images/chapters/4x02.jpg | Bin {public => static}/images/chapters/4x03.jpg | Bin {public => static}/images/chapters/4x04.jpg | Bin {public => static}/images/chapters/4x05.jpg | Bin {public => static}/images/chapters/4x06.jpg | Bin {public => static}/images/chapters/4x07.jpg | Bin {public => static}/images/chapters/4x08.jpg | Bin {public => static}/images/chapters/4x09.jpg | Bin {public => static}/images/chapters/4x10.jpg | Bin {public => static}/images/chapters/4x11.jpg | Bin {public => static}/images/chapters/4x12.jpg | Bin {public => static}/images/chapters/4x13.jpg | Bin {public => static}/images/chapters/4x14.jpg | Bin {public => static}/images/chapters/4x15.jpg | Bin {public => static}/images/chapters/5x01.jpg | Bin {public => static}/images/chapters/5x02.jpg | Bin {public => static}/images/chapters/5x03.jpg | Bin {public => static}/images/chapters/5x04.jpg | Bin {public => static}/images/chapters/5x05.jpg | Bin {public => static}/images/chapters/5x06.jpg | Bin {public => static}/images/chapters/5x07.jpg | Bin {public => static}/images/chapters/5x08.jpg | Bin {public => static}/images/chapters/5x09.jpg | Bin {public => static}/images/chapters/5x10.jpg | Bin {public => static}/images/chapters/5x11.jpg | Bin {public => static}/images/chapters/5x12.jpg | Bin {public => static}/images/chapters/5x13.jpg | Bin .../images/chapters/desconocido.jpg | Bin .../agente_brigada_contra_socioadiccion.jpg | Bin {public => static}/images/characters/alex.jpg | Bin .../images/characters/alicia.jpg | Bin .../images/characters/andres.jpg | Bin .../images/characters/armando.jpg | Bin {public => static}/images/characters/bea.jpg | Bin .../images/characters/belen.jpg | Bin .../images/characters/carlos.jpg | Bin .../images/characters/carmen.jpg | Bin .../images/characters/concha.jpg | Bin {public => static}/images/characters/dani.jpg | Bin .../images/characters/desconocido.jpg | Bin .../images/characters/emilio.jpg | Bin .../images/characters/esther.jpg | Bin .../images/characters/exterminador_plagas.jpg | Bin .../images/characters/fernando.jpg | Bin .../funcionario_perrera_municipal.jpg | Bin .../images/characters/isabel.jpg | Bin .../images/characters/jefe_seguridad.jpg | Bin .../images/characters/josemi.jpg | Bin .../images/characters/juan_cuesta.jpg | Bin .../images/characters/lucia.jpg | Bin .../images/characters/mariano.jpg | Bin .../images/characters/marisa.jpg | Bin .../images/characters/mauri.jpg | Bin .../images/characters/mozo_mudanza_1.jpg | Bin .../images/characters/mozo_mudanza_2.jpg | Bin .../images/characters/natalia.jpg | Bin .../images/characters/nieves.jpg | Bin .../images/characters/pablo.jpg | Bin {public => static}/images/characters/paco.jpg | Bin .../images/characters/paloma.jpg | Bin .../images/characters/rebeca.jpg | Bin .../images/characters/roberto.jpg | Bin .../images/characters/santiago_segura.jpg | Bin .../characters/tecnico_control_plagas.jpg | Bin .../characters/tecnico_laboratorio_adn.jpg | Bin .../images/characters/vendedor_alarmas.jpg | Bin .../vendedor_cabina_hidromasajes.jpg | Bin .../characters/vendedor_equipos_espionaje.jpg | Bin .../characters/vendedor_ordenadores.jpg | Bin .../characters/vendedor_puertas_blindadas.jpg | Bin .../images/characters/vicenta.jpg | Bin {public => static}/images/characters/yago.jpg | Bin {public => static}/images/home.jpg | Bin sitemap.xml => static/sitemap.xml | 0 {src/store/modules => store}/actors.js | 21 +- {src/store/modules => store}/chapters.js | 21 +- {src/store/modules => store}/characters.js | 22 +- tests/unit/App.spec.js | 9 +- tests/unit/components/ActorCard.spec.js | 13 +- tests/unit/components/ChapterCard.spec.js | 17 +- tests/unit/components/CharacterCard.spec.js | 13 +- tests/unit/components/Footer.spec.js | 6 +- tests/unit/components/Header.spec.js | 6 +- tests/unit/components/Menu.spec.js | 107 +- .../unit/{views => pages}/ActorDetail.spec.js | 89 +- tests/unit/{views => pages}/Actors.spec.js | 78 +- .../{views => pages}/ChapterDetail.spec.js | 88 +- .../{views => pages}/CharacterDetail.spec.js | 89 +- .../unit/{views => pages}/Characters.spec.js | 79 +- tests/unit/{views => pages}/Home.spec.js | 8 +- tests/unit/{views => pages}/Season.spec.js | 90 +- .../plugins/anhqvClient/anhqvClient.spec.js | 2 +- tests/unit/store/actors.spec.js | 7 +- tests/unit/store/chapters.spec.js | 7 +- tests/unit/store/characters.spec.js | 7 +- tests/unit/utils/funcs.spec.js | 2 +- {src/utils => utils}/constants.js | 0 {src/utils => utils}/funcs.js | 0 {src/utils => utils}/index.js | 0 vue.config.js | 20 - 231 files changed, 17412 insertions(+), 16886 deletions(-) create mode 100644 .babelrc rename {src/assets => assets}/banner.gif (100%) rename {src => assets}/styles/_variables.scss (100%) delete mode 100644 babel.config.js rename {src/components => components}/ActorCard.vue (73%) rename {src/components => components}/ChapterCard.vue (66%) rename {src/components => components}/CharacterCard.vue (72%) rename {src/components => components}/Footer.vue (94%) rename {src/components => components}/Header.vue (95%) rename {src/components => components}/Menu.vue (60%) rename src/App.vue => layouts/default.vue (88%) create mode 100644 locales/es.js create mode 100644 middleware/README.md create mode 100644 nuxt.config.js create mode 100644 pages/actors/_slug/index.vue rename src/views/Actors.vue => pages/actors/index.vue (57%) create mode 100644 pages/characters/_slug/index.vue rename src/views/Characters.vue => pages/characters/index.vue (57%) rename src/views/Home.vue => pages/index.vue (73%) rename src/views/ChapterDetail.vue => pages/seasons/_season_number/chapters/_slug/index.vue (60%) rename src/views/Season.vue => pages/seasons/index.vue (59%) create mode 100644 plugins/README.md rename {src/plugins => plugins}/anhqvClient/client.js (100%) rename {src/plugins => plugins}/anhqvClient/index.js (76%) create mode 100644 plugins/element-ui.js create mode 100644 plugins/nuxt-anhqv-client.js rename {src/plugins => plugins}/vueAnhqvClient.js (100%) delete mode 100644 public/index.html delete mode 100644 server.js delete mode 100644 src/i18n.js delete mode 100644 src/locales/es.json delete mode 100644 src/main.js delete mode 100644 src/router/index.js delete mode 100644 src/store/index.js delete mode 100644 src/store/modules/index.js delete mode 100644 src/views/ActorDetail.vue delete mode 100644 src/views/CharacterDetail.vue rename {public => static}/images/actors/adria-collado.jpg (100%) rename {public => static}/images/actors/antonio-gomez.jpg (100%) rename {public => static}/images/actors/dani-ballesteros.jpg (100%) rename {public => static}/images/actors/daniel-guzman.jpg (100%) rename {public => static}/images/actors/desconocido.jpg (100%) rename {public => static}/images/actors/edu-garcia.jpg (100%) rename {public => static}/images/actors/eduardo-gomez.jpg (100%) rename {public => static}/images/actors/emma-penella.jpg (100%) rename {public => static}/images/actors/fernando-tejero.jpg (100%) rename {public => static}/images/actors/gemma-cuervo.jpg (100%) rename {public => static}/images/actors/guillermo-ortega.jpg (100%) rename {public => static}/images/actors/jose-luis-gil.jpg (100%) rename {public => static}/images/actors/joseba-apaolaza.jpg (100%) rename {public => static}/images/actors/laura-pamplona.jpg (100%) rename {public => static}/images/actors/loles-leon.jpg (100%) rename {public => static}/images/actors/luis-merlo.jpg (100%) rename {public => static}/images/actors/malena-alterio.jpg (100%) rename {public => static}/images/actors/maria-adanez.jpg (100%) rename {public => static}/images/actors/marivi-bilbao.jpg (100%) rename {public => static}/images/actors/santiago-segura.jpg (100%) rename {public => static}/images/actors/sofia-nieto.jpg (100%) rename {public => static}/images/chapters/1x01.jpg (100%) rename {public => static}/images/chapters/1x02.jpg (100%) rename {public => static}/images/chapters/1x03.jpg (100%) rename {public => static}/images/chapters/1x04.jpg (100%) rename {public => static}/images/chapters/1x05.jpg (100%) rename {public => static}/images/chapters/1x06.jpg (100%) rename {public => static}/images/chapters/1x07.jpg (100%) rename {public => static}/images/chapters/1x08.jpg (100%) rename {public => static}/images/chapters/1x09.jpg (100%) rename {public => static}/images/chapters/1x10.jpg (100%) rename {public => static}/images/chapters/1x11.jpg (100%) rename {public => static}/images/chapters/1x12.jpg (100%) rename {public => static}/images/chapters/1x13.jpg (100%) rename {public => static}/images/chapters/1x14.jpg (100%) rename {public => static}/images/chapters/1x15.jpg (100%) rename {public => static}/images/chapters/1x16.jpg (100%) rename {public => static}/images/chapters/1x17.jpg (100%) rename {public => static}/images/chapters/2x01.jpg (100%) rename {public => static}/images/chapters/2x02.jpg (100%) rename {public => static}/images/chapters/2x03.jpg (100%) rename {public => static}/images/chapters/2x04.jpg (100%) rename {public => static}/images/chapters/2x05.jpg (100%) rename {public => static}/images/chapters/2x06.jpg (100%) rename {public => static}/images/chapters/2x07.jpg (100%) rename {public => static}/images/chapters/2x08.jpg (100%) rename {public => static}/images/chapters/2x09.jpg (100%) rename {public => static}/images/chapters/2x10.jpg (100%) rename {public => static}/images/chapters/2x11.jpg (100%) rename {public => static}/images/chapters/2x12.jpg (100%) rename {public => static}/images/chapters/2x13.jpg (100%) rename {public => static}/images/chapters/2x14.jpg (100%) rename {public => static}/images/chapters/3x01.jpg (100%) rename {public => static}/images/chapters/3x02.jpg (100%) rename {public => static}/images/chapters/3x03.jpg (100%) rename {public => static}/images/chapters/3x04.jpg (100%) rename {public => static}/images/chapters/3x05.jpg (100%) rename {public => static}/images/chapters/3x06.jpg (100%) rename {public => static}/images/chapters/3x07.jpg (100%) rename {public => static}/images/chapters/3x07b.jpg (100%) rename {public => static}/images/chapters/3x08.jpg (100%) rename {public => static}/images/chapters/3x09.jpg (100%) rename {public => static}/images/chapters/3x10.jpg (100%) rename {public => static}/images/chapters/3x11.jpg (100%) rename {public => static}/images/chapters/3x12.jpg (100%) rename {public => static}/images/chapters/3x13.jpg (100%) rename {public => static}/images/chapters/3x14.jpg (100%) rename {public => static}/images/chapters/3x15.jpg (100%) rename {public => static}/images/chapters/3x16.jpg (100%) rename {public => static}/images/chapters/3x17.jpg (100%) rename {public => static}/images/chapters/3x18.jpg (100%) rename {public => static}/images/chapters/3x19.jpg (100%) rename {public => static}/images/chapters/3x20.jpg (100%) rename {public => static}/images/chapters/3x21.jpg (100%) rename {public => static}/images/chapters/3x22.jpg (100%) rename {public => static}/images/chapters/3x23.jpg (100%) rename {public => static}/images/chapters/3x24.jpg (100%) rename {public => static}/images/chapters/3x25.jpg (100%) rename {public => static}/images/chapters/3x25b.jpg (100%) rename {public => static}/images/chapters/3x26.jpg (100%) rename {public => static}/images/chapters/3x27.jpg (100%) rename {public => static}/images/chapters/3x28.jpg (100%) rename {public => static}/images/chapters/3x29.jpg (100%) rename {public => static}/images/chapters/3x30.jpg (100%) rename {public => static}/images/chapters/3x31.jpg (100%) rename {public => static}/images/chapters/3x32.jpg (100%) rename {public => static}/images/chapters/3x33.jpg (100%) rename {public => static}/images/chapters/4x01.jpg (100%) rename {public => static}/images/chapters/4x02.jpg (100%) rename {public => static}/images/chapters/4x03.jpg (100%) rename {public => static}/images/chapters/4x04.jpg (100%) rename {public => static}/images/chapters/4x05.jpg (100%) rename {public => static}/images/chapters/4x06.jpg (100%) rename {public => static}/images/chapters/4x07.jpg (100%) rename {public => static}/images/chapters/4x08.jpg (100%) rename {public => static}/images/chapters/4x09.jpg (100%) rename {public => static}/images/chapters/4x10.jpg (100%) rename {public => static}/images/chapters/4x11.jpg (100%) rename {public => static}/images/chapters/4x12.jpg (100%) rename {public => static}/images/chapters/4x13.jpg (100%) rename {public => static}/images/chapters/4x14.jpg (100%) rename {public => static}/images/chapters/4x15.jpg (100%) rename {public => static}/images/chapters/5x01.jpg (100%) rename {public => static}/images/chapters/5x02.jpg (100%) rename {public => static}/images/chapters/5x03.jpg (100%) rename {public => static}/images/chapters/5x04.jpg (100%) rename {public => static}/images/chapters/5x05.jpg (100%) rename {public => static}/images/chapters/5x06.jpg (100%) rename {public => static}/images/chapters/5x07.jpg (100%) rename {public => static}/images/chapters/5x08.jpg (100%) rename {public => static}/images/chapters/5x09.jpg (100%) rename {public => static}/images/chapters/5x10.jpg (100%) rename {public => static}/images/chapters/5x11.jpg (100%) rename {public => static}/images/chapters/5x12.jpg (100%) rename {public => static}/images/chapters/5x13.jpg (100%) rename {public => static}/images/chapters/desconocido.jpg (100%) rename {public => static}/images/characters/agente_brigada_contra_socioadiccion.jpg (100%) rename {public => static}/images/characters/alex.jpg (100%) rename {public => static}/images/characters/alicia.jpg (100%) rename {public => static}/images/characters/andres.jpg (100%) rename {public => static}/images/characters/armando.jpg (100%) rename {public => static}/images/characters/bea.jpg (100%) rename {public => static}/images/characters/belen.jpg (100%) rename {public => static}/images/characters/carlos.jpg (100%) rename {public => static}/images/characters/carmen.jpg (100%) rename {public => static}/images/characters/concha.jpg (100%) rename {public => static}/images/characters/dani.jpg (100%) rename {public => static}/images/characters/desconocido.jpg (100%) rename {public => static}/images/characters/emilio.jpg (100%) rename {public => static}/images/characters/esther.jpg (100%) rename {public => static}/images/characters/exterminador_plagas.jpg (100%) rename {public => static}/images/characters/fernando.jpg (100%) rename {public => static}/images/characters/funcionario_perrera_municipal.jpg (100%) rename {public => static}/images/characters/isabel.jpg (100%) rename {public => static}/images/characters/jefe_seguridad.jpg (100%) rename {public => static}/images/characters/josemi.jpg (100%) rename {public => static}/images/characters/juan_cuesta.jpg (100%) rename {public => static}/images/characters/lucia.jpg (100%) rename {public => static}/images/characters/mariano.jpg (100%) rename {public => static}/images/characters/marisa.jpg (100%) rename {public => static}/images/characters/mauri.jpg (100%) rename {public => static}/images/characters/mozo_mudanza_1.jpg (100%) rename {public => static}/images/characters/mozo_mudanza_2.jpg (100%) rename {public => static}/images/characters/natalia.jpg (100%) rename {public => static}/images/characters/nieves.jpg (100%) rename {public => static}/images/characters/pablo.jpg (100%) rename {public => static}/images/characters/paco.jpg (100%) rename {public => static}/images/characters/paloma.jpg (100%) rename {public => static}/images/characters/rebeca.jpg (100%) rename {public => static}/images/characters/roberto.jpg (100%) rename {public => static}/images/characters/santiago_segura.jpg (100%) rename {public => static}/images/characters/tecnico_control_plagas.jpg (100%) rename {public => static}/images/characters/tecnico_laboratorio_adn.jpg (100%) rename {public => static}/images/characters/vendedor_alarmas.jpg (100%) rename {public => static}/images/characters/vendedor_cabina_hidromasajes.jpg (100%) rename {public => static}/images/characters/vendedor_equipos_espionaje.jpg (100%) rename {public => static}/images/characters/vendedor_ordenadores.jpg (100%) rename {public => static}/images/characters/vendedor_puertas_blindadas.jpg (100%) rename {public => static}/images/characters/vicenta.jpg (100%) rename {public => static}/images/characters/yago.jpg (100%) rename {public => static}/images/home.jpg (100%) rename sitemap.xml => static/sitemap.xml (100%) rename {src/store/modules => store}/actors.js (75%) rename {src/store/modules => store}/chapters.js (76%) rename {src/store/modules => store}/characters.js (76%) rename tests/unit/{views => pages}/ActorDetail.spec.js (57%) rename tests/unit/{views => pages}/Actors.spec.js (52%) rename tests/unit/{views => pages}/ChapterDetail.spec.js (56%) rename tests/unit/{views => pages}/CharacterDetail.spec.js (57%) rename tests/unit/{views => pages}/Characters.spec.js (52%) rename tests/unit/{views => pages}/Home.spec.js (70%) rename tests/unit/{views => pages}/Season.spec.js (54%) rename {src/utils => utils}/constants.js (100%) rename {src/utils => utils}/funcs.js (100%) rename {src/utils => utils}/index.js (100%) delete mode 100644 vue.config.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..394c543 --- /dev/null +++ b/.babelrc @@ -0,0 +1,12 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "node": "current" + } + } + ] + ] +} diff --git a/.env.example b/.env.example index 8cf1a3b..9d24c26 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1 @@ VUE_APP_API_URL=url/to/api/ -PRERENDER_TOKEN= diff --git a/.eslintrc b/.eslintrc index 7b2355a..914fbbc 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,11 +1,12 @@ { "root": true, "env": { + "browser": true, "node": true }, "extends": [ - "plugin:vue/essential", - "eslint:recommended", + "@nuxtjs", + "plugin:nuxt/recommended", "airbnb-base" ], "parserOptions": { @@ -31,7 +32,8 @@ ], "no-debugger": [ "warn" - ] + ], + "vue/no-v-html": "off" }, "overrides": [ { diff --git a/.gitignore b/.gitignore index 6ea0f4a..7963b38 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store node_modules /dist +.nuxt # local env files .env.local diff --git a/src/assets/banner.gif b/assets/banner.gif similarity index 100% rename from src/assets/banner.gif rename to assets/banner.gif diff --git a/src/styles/_variables.scss b/assets/styles/_variables.scss similarity index 100% rename from src/styles/_variables.scss rename to assets/styles/_variables.scss diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 757ff9b..0000000 --- a/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - '@vue/cli-plugin-babel/preset', - ], -}; diff --git a/src/components/ActorCard.vue b/components/ActorCard.vue similarity index 73% rename from src/components/ActorCard.vue rename to components/ActorCard.vue index 9f2f5da..f839fa1 100644 --- a/src/components/ActorCard.vue +++ b/components/ActorCard.vue @@ -2,29 +2,32 @@ + :body-style="{ padding: '0px' }" + >
- +
+ style="padding: 14px;" + > - {{actor.shortname}} + {{ actor.shortname }} - {{detailButtonText}} + @click="goToDetail()" + > + {{ detailButtonText }} - + size="2x" + />
@@ -33,7 +36,12 @@ + + diff --git a/src/views/Actors.vue b/pages/actors/index.vue similarity index 57% rename from src/views/Actors.vue rename to pages/actors/index.vue index 820a08f..df8378c 100644 --- a/src/views/Actors.vue +++ b/pages/actors/index.vue @@ -5,17 +5,18 @@

+ :gutter="gutter" + > - - + > + @@ -25,43 +26,55 @@ import { mapState } from 'vuex'; import { Loading } from 'element-ui'; -import ActorCard from '../components/ActorCard.vue'; +import ActorCard from '../../components/ActorCard.vue'; -import utils from '../utils'; +import utils from '../../utils'; export default { name: 'Actors', components: { ActorCard, }, - data() { - return { - gutter: utils.VIEWS.ACTORS.GUTTER.DEFAULT, - }; + nuxtI18n: { + paths: { + es: '/actores', + }, }, - created() { - window.addEventListener('resize', this.handleResize); - this.handleResize(); - - this.loadingInstance = Loading.service({ - target: utils.LOADING.QUERY_SELECTOR, - background: 'rgba(0, 0, 0, 0.8)', - }); + async fetch() { + if (process.browser) { + this.loadingInstance = Loading.service({ + target: utils.LOADING.QUERY_SELECTOR, + background: 'rgba(0, 0, 0, 0.8)', + }); + } - this.$store.dispatch('actors/getAll') + return this.$store.dispatch('actors/getAll') .finally(() => { - this.loadingInstance.close(); + if (this.loadingInstance) this.loadingInstance.close(); }); }, - beforeDestroy() { - this.loadingInstance.close(); - window.removeEventListener('resize', this.handleResize); + data() { + return { + gutter: utils.VIEWS.ACTORS.GUTTER.DEFAULT, + }; }, computed: { ...mapState('actors', { actors: 'all', }), }, + created() { + if (process.browser) { + // eslint-disable-next-line nuxt/no-globals-in-created + window.addEventListener('resize', this.handleResize); + this.handleResize(); + } + }, + beforeDestroy() { + if (this.loadingInstance) this.loadingInstance.close(); + window.removeEventListener('resize', this.handleResize); + this.$store.dispatch('actors/destroyAll'); + }, methods: { handleResize() { if (utils.isMobile()) { diff --git a/pages/characters/_slug/index.vue b/pages/characters/_slug/index.vue new file mode 100644 index 0000000..93d8a8e --- /dev/null +++ b/pages/characters/_slug/index.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/src/views/Characters.vue b/pages/characters/index.vue similarity index 57% rename from src/views/Characters.vue rename to pages/characters/index.vue index a77c6ef..25ca164 100644 --- a/src/views/Characters.vue +++ b/pages/characters/index.vue @@ -5,17 +5,18 @@

+ :gutter="gutter" + > - - + > + @@ -25,44 +26,55 @@ import { mapState } from 'vuex'; import { Loading } from 'element-ui'; -import CharacterCard from '../components/CharacterCard.vue'; +import CharacterCard from '../../components/CharacterCard.vue'; -import utils from '../utils'; +import utils from '../../utils'; export default { name: 'Characters', components: { CharacterCard, }, - data() { - return { - gutter: utils.VIEWS.CHARACTERS.GUTTER.DEFAULT, - }; + nuxtI18n: { + paths: { + es: '/personajes', + }, }, - created() { - window.addEventListener('resize', this.handleResize); - this.handleResize(); - - this.loadingInstance = Loading.service({ - target: utils.LOADING.QUERY_SELECTOR, - background: 'rgba(0, 0, 0, 0.8)', - }); + async fetch() { + if (process.browser) { + this.loadingInstance = Loading.service({ + target: utils.LOADING.QUERY_SELECTOR, + background: 'rgba(0, 0, 0, 0.8)', + }); + } - this.$store.dispatch('characters/getAll') + return this.$store.dispatch('characters/getAll') .finally(() => { - this.loadingInstance.close(); - window.prerenderReady = true; + if (this.loadingInstance) this.loadingInstance.close(); }); }, - beforeDestroy() { - this.loadingInstance.close(); - window.removeEventListener('resize', this.handleResize); + data() { + return { + gutter: utils.VIEWS.CHARACTERS.GUTTER.DEFAULT, + }; }, computed: { ...mapState('characters', { characters: 'all', }), }, + created() { + if (process.browser) { + // eslint-disable-next-line nuxt/no-globals-in-created + window.addEventListener('resize', this.handleResize); + this.handleResize(); + } + }, + beforeDestroy() { + if (this.loadingInstance) this.loadingInstance.close(); + window.removeEventListener('resize', this.handleResize); + this.$store.dispatch('characters/destroyAll'); + }, methods: { handleResize() { if (utils.isMobile()) { diff --git a/src/views/Home.vue b/pages/index.vue similarity index 73% rename from src/views/Home.vue rename to pages/index.vue index 87af5e0..476579e 100644 --- a/src/views/Home.vue +++ b/pages/index.vue @@ -1,101 +1,129 @@