Skip to content

Commit

Permalink
Merge branch 'release/v0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jualoppaz committed Apr 19, 2020
2 parents 4c1bff6 + 07a43fe commit d3a7b1d
Show file tree
Hide file tree
Showing 231 changed files with 17,438 additions and 16,890 deletions.
12 changes: 12 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
]
}
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
VUE_APP_API_URL=url/to/api/
PRERENDER_TOKEN=<token here>
8 changes: 5 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"root": true,
"env": {
"browser": true,
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended",
"@nuxtjs",
"plugin:nuxt/recommended",
"airbnb-base"
],
"parserOptions": {
Expand All @@ -31,7 +32,8 @@
],
"no-debugger": [
"warn"
]
],
"vue/no-v-html": "off"
},
"overrides": [
{
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
.nuxt

# local env files
.env.local
Expand Down
File renamed without changes
File renamed without changes.
5 changes: 0 additions & 5 deletions babel.config.js

This file was deleted.

28 changes: 18 additions & 10 deletions src/components/ActorCard.vue → components/ActorCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@
<el-card
class="actor-card"
shadow="hover"
:body-style="{ padding: '0px' }">
:body-style="{ padding: '0px' }"
>
<div class="image-container">
<img v-bind:src="actor.image_url" class="image">
<img :src="actor.image_url" class="image">
</div>
<div
class="actor-card-info"
style="padding: 14px;">
style="padding: 14px;"
>
<el-row>
<span class="actor-name"><b>{{actor.shortname}}</b></span>
<span class="actor-name"><b>{{ actor.shortname }}</b></span>
</el-row>
<el-row>
<el-button
type="primary"
plain
v-on:click="goToDetail()">
{{detailButtonText}}
@click="goToDetail()"
>
{{ detailButtonText }}
</el-button>
<font-awesome-icon
v-if="actor.deathdate"
class="ribbon"
icon="ribbon"
size="2x">
</font-awesome-icon>
size="2x"
/>
</el-row>
</div>
</el-card>
Expand All @@ -33,7 +36,12 @@
<script>
export default {
name: 'ActorCard',
props: ['actor'],
props: {
actor: {
type: Object,
required: true,
},
},
data() {
return {
detailButtonText: this.$t('VIEWS.ACTORS.SEE_DETAIL.TEXT'),
Expand All @@ -42,7 +50,7 @@ export default {
methods: {
goToDetail() {
this.$router.push({
name: 'ActorDetail',
name: `actors-slug___${this.$i18n.locale}`,
params: {
slug: this.actor.slug,
},
Expand Down
30 changes: 19 additions & 11 deletions src/components/ChapterCard.vue → components/ChapterCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@
<el-card
class="chapter-card"
shadow="hover"
:body-style="{ padding: '0px' }">
:body-style="{ padding: '0px' }"
>
<div class="image-container">
<img v-bind:src="chapter.image_url" class="image">
<img :src="chapter.image_url" class="image">
</div>
<div
class="chapter-card-info"
style="padding: 14px;">
style="padding: 14px;"
>
<el-row>
<span class="chapter-name"><b>{{chapter.natural_id}} - {{chapter.name}}</b></span>
<span class="chapter-name"><b>{{ chapter.natural_id }} - {{ chapter.name }}</b></span>
</el-row>
<el-row>
<el-button
type="primary"
plain
v-on:click="goToDetail()">
{{detailButtonText}}
@click="goToDetail()"
>
{{ detailButtonText }}
</el-button>
</el-row>
</div>
Expand All @@ -27,19 +30,24 @@
<script>
export default {
name: 'ChapterCard',
props: ['chapter'],
props: {
chapter: {
type: Object,
required: true,
},
},
data() {
return {
detailButtonText: this.$t('VIEWS.CHAPTERS.SEE_DETAIL.TEXT'),
detailButtonText: this.$t('VIEWS.SEASONS.SEE_DETAIL.TEXT'),
};
},
methods: {
goToDetail() {
this.$router.push({
name: 'ChapterDetail',
name: `seasons-season_number-chapters-slug___${this.$i18n.locale}`,
params: {
season: this.chapter.season,
chapter_slug: this.chapter.slug,
season_number: this.chapter.season,
slug: this.chapter.slug,
},
});
},
Expand Down
24 changes: 16 additions & 8 deletions src/components/CharacterCard.vue → components/CharacterCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@
<el-card
class="character-card"
shadow="hover"
:body-style="{ padding: '0px' }">
:body-style="{ padding: '0px' }"
>
<div class="image-container">
<img v-bind:src="character.image_url" class="image">
<img :src="character.image_url" class="image">
</div>
<div
class="character-card-info"
style="padding: 14px;">
style="padding: 14px;"
>
<el-row>
<span class="character-name"><b>{{character.shortname}}</b></span>
<span class="character-name"><b>{{ character.shortname }}</b></span>
</el-row>
<el-row>
<el-button
type="primary"
plain
v-on:click="goToDetail()">
{{detailButtonText}}
@click="goToDetail()"
>
{{ detailButtonText }}
</el-button>
</el-row>
</div>
Expand All @@ -27,7 +30,12 @@
<script>
export default {
name: 'CharacterCard',
props: ['character'],
props: {
character: {
type: Object,
required: true,
},
},
data() {
return {
detailButtonText: this.$t('VIEWS.CHARACTERS.SEE_DETAIL.TEXT'),
Expand All @@ -36,7 +44,7 @@ export default {
methods: {
goToDetail() {
this.$router.push({
name: 'CharacterDetail',
name: `characters-slug___${this.$i18n.locale}`,
params: {
slug: this.character.slug,
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Footer.vue → components/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<div id="footer">
<div id="copyright">
{{copyrightText}}
{{ copyrightText }}
</div>
<div id="author">
<a href="https://www.juanmanuellopezpazos.es" target="_blank">{{authorText}}</a>
<a href="https://www.juanmanuellopezpazos.es" target="_blank">{{ authorText }}</a>
</div>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.vue → components/Header.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div id="header">
<h1>{{title}}</h1>
<h1>{{ title }}</h1>
</div>
</template>

Expand Down
70 changes: 37 additions & 33 deletions src/components/Menu.vue → components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,55 @@
</div>
<el-menu :default-openeds="defaultOpeneds" :collapse="isCollapsed">
<el-menu-item index="1">
<router-link
<nuxt-link
exact
to="/">
<i class="el-icon-s-home"></i>
<span>{{homeItemText}}</span>
</router-link>
to="/"
>
<i class="el-icon-s-home" />
<span>{{ homeItemText }}</span>
</nuxt-link>
</el-menu-item>
<el-menu-item index="2">
<router-link :to="{ name: 'Characters' }">
<i class="el-icon-user-solid"></i>
<span>{{charactersItemText}}</span>
</router-link>
<nuxt-link :to="{ name: `characters___${$i18n.locale}` }">
<i class="el-icon-user-solid" />
<span>{{ charactersItemText }}</span>
</nuxt-link>
</el-menu-item>
<el-menu-item index="3">
<router-link :to="{ name: 'Actors' }">
<i class="el-icon-star-on"></i>
<span>{{actorsItemText}}</span>
</router-link>
<nuxt-link :to="{ name: `actors___${$i18n.locale}` }">
<i class="el-icon-star-on" />
<span>{{ actorsItemText }}</span>
</nuxt-link>
</el-menu-item>
<el-submenu index="4">
<template slot="title">
<i class="el-icon-video-camera-solid"></i>
<span slot="title">{{seasonsItemText}}</span>
<i class="el-icon-video-camera-solid" />
<span slot="title">{{ seasonsItemText }}</span>
</template>
<el-menu-item index="4-1">
<router-link :to="{ name: 'SeasonDetails', params: { season_number: 1 } }">
<i class="el-icon-film"></i>{{firstSeasonItemText}}
</router-link>
<nuxt-link :to="{ name: `seasons___${$i18n.locale}`, params: { season_number: 1 } }">
<i class="el-icon-film" />{{ firstSeasonItemText }}
</nuxt-link>
</el-menu-item>
<el-menu-item index="4-2">
<router-link :to="{ name: 'SeasonDetails', params: { season_number: 2 } }">
<i class="el-icon-film"></i>{{secondSeasonItemText}}
</router-link>
<nuxt-link :to="{ name: `seasons___${$i18n.locale}`, params: { season_number: 2 } }">
<i class="el-icon-film" />{{ secondSeasonItemText }}
</nuxt-link>
</el-menu-item>
<el-menu-item index="4-3">
<router-link :to="{ name: 'SeasonDetails', params: { season_number: 3 } }">
<i class="el-icon-film"></i>{{thirdSeasonItemText}}
</router-link>
<nuxt-link :to="{ name: `seasons___${$i18n.locale}`, params: { season_number: 3 } }">
<i class="el-icon-film" />{{ thirdSeasonItemText }}
</nuxt-link>
</el-menu-item>
<el-menu-item index="4-4">
<router-link :to="{ name: 'SeasonDetails', params: { season_number: 4 } }">
<i class="el-icon-film"></i>{{fourthSeasonItemText}}
</router-link>
<nuxt-link :to="{ name: `seasons___${$i18n.locale}`, params: { season_number: 4 } }">
<i class="el-icon-film" />{{ fourthSeasonItemText }}
</nuxt-link>
</el-menu-item>
<el-menu-item index="4-5">
<router-link :to="{ name: 'SeasonDetails', params: { season_number: 5 } }">
<i class="el-icon-film"></i>{{fifthSeasonItemText}}
</router-link>
<nuxt-link :to="{ name: `seasons___${$i18n.locale}`, params: { season_number: 5 } }">
<i class="el-icon-film" />{{ fifthSeasonItemText }}
</nuxt-link>
</el-menu-item>
</el-submenu>
</el-menu>
Expand Down Expand Up @@ -82,8 +83,11 @@ export default {
};
},
created() {
window.addEventListener('resize', this.handleResize);
this.handleResize();
if (process.browser) {
// eslint-disable-next-line nuxt/no-globals-in-created
window.addEventListener('resize', this.handleResize);
this.handleResize();
}
},
beforeDestroy() {
window.removeEventListener('resize', this.handleResize);
Expand Down Expand Up @@ -130,7 +134,7 @@ export default {
text-decoration: none;
padding: 0 20px;
&.router-link-active, &:focus{
&.nuxt-link-active, &:focus{
color: $color-text-blue;
i {
Expand Down
24 changes: 20 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest',
verbose: true,
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^~/(.*)$': '<rootDir>/$1',
'^vue$': 'vue/dist/vue.common.js',
},
moduleFileExtensions: [
'js',
'vue',
'json',
],
transform: {
'^.+\\.js$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest',
},
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,vue}', '!**/node_modules/**'],
coverageReporters: ['html', 'text-summary'],
collectCoverageFrom: [
'<rootDir>/components/**/*.vue',
'<rootDir>/pages/**/*.vue',
'<rootDir>/plugins/anhqvClient/client.js',
],
verbose: true,
};
Loading

0 comments on commit d3a7b1d

Please sign in to comment.