Skip to content

Commit

Permalink
Merge branch 'release/v0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jualoppaz committed May 2, 2020
2 parents 34b73cd + ca5d068 commit f9fa9af
Show file tree
Hide file tree
Showing 63 changed files with 2,472 additions and 742 deletions.
38 changes: 38 additions & 0 deletions assets/styles/_global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.pointer{
cursor: pointer;
}

.fa-twitter {
color: $color-brand-twitter;
}

.fa-link{
color: $color-text-gray;
}

.fa-youtube{
color: $color-brand-youtube;
}

.fa-instagram{
color: $color-brand-instagram;
}

.fa-facebook {
color: $color-brand-facebook;
}

.social-networks {
text-align: center;

.networks-inline-list{
span{
margin: 10px;
cursor: pointer;

&:active, &:focus{
outline: none;
}
}
}
}
1 change: 1 addition & 0 deletions assets/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $color-text-green: #28a745;
$color-text-gray: #909399;
$color-border-gray: #e6e6e6;

$color-brand-facebook: #3b5998;
$color-brand-instagram: #e4405f;
$color-brand-paypal: #00457C;
$color-brand-twitter: #00acee;
Expand Down
31 changes: 15 additions & 16 deletions components/ActorCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,21 @@
<span class="actor-name"><b>{{ actor.shortname }}</b></span>
</el-row>
<el-row>
<el-button
type="primary"
plain
@click="goToDetail()"
<nuxt-link
:to="{
name: `actors-slug___${$i18n.locale}`,
params: {
slug: actor.slug,
},
}"
>
{{ detailButtonText }}
</el-button>
<el-button
type="primary"
plain
>
{{ detailButtonText }}
</el-button>
</nuxt-link>
<font-awesome-icon
v-if="actor.deathdate"
class="ribbon"
Expand All @@ -47,16 +55,7 @@ export default {
detailButtonText: this.$t('VIEWS.ACTORS.SEE_DETAIL.TEXT'),
};
},
methods: {
goToDetail() {
this.$router.push({
name: `actors-slug___${this.$i18n.locale}`,
params: {
slug: this.actor.slug,
},
});
},
},
methods: {},
};
</script>

Expand Down
32 changes: 15 additions & 17 deletions components/ChapterCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,21 @@
<span class="chapter-name"><b>{{ chapter.natural_id }} - {{ chapter.name }}</b></span>
</el-row>
<el-row>
<el-button
type="primary"
plain
@click="goToDetail()"
<nuxt-link
:to="{
name: `seasons-season_number-chapters-slug___${$i18n.locale}`,
params: {
slug: chapter.slug,
},
}"
>
{{ detailButtonText }}
</el-button>
<el-button
type="primary"
plain
>
{{ detailButtonText }}
</el-button>
</nuxt-link>
</el-row>
</div>
</el-card>
Expand All @@ -41,17 +49,7 @@ export default {
detailButtonText: this.$t('VIEWS.SEASONS.SEE_DETAIL.TEXT'),
};
},
methods: {
goToDetail() {
this.$router.push({
name: `seasons-season_number-chapters-slug___${this.$i18n.locale}`,
params: {
season_number: this.chapter.season,
slug: this.chapter.slug,
},
});
},
},
methods: {},
};
</script>

Expand Down
31 changes: 15 additions & 16 deletions components/CharacterCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,21 @@
<span class="character-name"><b>{{ character.shortname }}</b></span>
</el-row>
<el-row>
<el-button
type="primary"
plain
@click="goToDetail()"
<nuxt-link
:to="{
name: `characters-slug___${$i18n.locale}`,
params: {
slug: character.slug,
},
}"
>
{{ detailButtonText }}
</el-button>
<el-button
type="primary"
plain
>
{{ detailButtonText }}
</el-button>
</nuxt-link>
</el-row>
</div>
</el-card>
Expand All @@ -41,16 +49,7 @@ export default {
detailButtonText: this.$t('VIEWS.CHARACTERS.SEE_DETAIL.TEXT'),
};
},
methods: {
goToDetail() {
this.$router.push({
name: `characters-slug___${this.$i18n.locale}`,
params: {
slug: this.character.slug,
},
});
},
},
methods: {},
};
</script>

Expand Down
10 changes: 2 additions & 8 deletions components/Header.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
<template>
<div id="header">
<h1>{{ title }}</h1>
<h1>ANHQV STATS</h1>
</div>
</template>

<script>
export default {
name: 'Header',
computed: {
title() {
return this.$route.meta.title && this.$route.meta.title({
route: this.$route,
}).toUpperCase();
},
},
};
</script>

Expand Down
10 changes: 4 additions & 6 deletions components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,10 @@ export default {
fifthSeasonItemText: this.$t('MENU.SEASONS.FIFTH_SEASON.TEXT'),
};
},
created() {
if (process.browser) {
// eslint-disable-next-line nuxt/no-globals-in-created
window.addEventListener('resize', this.handleResize);
this.handleResize();
}
mounted() {
// eslint-disable-next-line nuxt/no-globals-in-created
window.addEventListener('resize', this.handleResize);
this.handleResize();
},
beforeDestroy() {
window.removeEventListener('resize', this.handleResize);
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
'<rootDir>/components/**/*.vue',
'<rootDir>/pages/**/*.vue',
'<rootDir>/plugins/anhqvClient/client.js',
'<rootDir>/store/**/*.js',
],
verbose: true,
};
33 changes: 31 additions & 2 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,38 @@ body{
}
#main {
padding: 0;
@media screen and (min-width: $tablet-min-width){
padding: 50px;
.banner {
h1 {
padding: 5px;
height: 75px;
line-height: 75px;
font-size: 20px;
text-align: center;
background: $color-text-blue; // #66b3ff;
box-shadow: inset 0 8px 8px -8px rgba(0,0,0,.3), inset 0 -8px 8px -8px rgba(0,0,0,.3);
color: $color-text-white;
margin: 0;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
@media screen and (min-width: $tablet-min-width){
height: 150px;
line-height: 150px;
font-size: 50px;
}
}
}
.wrapper {
padding: 20px;
@media screen and (min-width: $tablet-min-width){
padding: 50px;
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion locales/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export default
TITLE: '🛑 AdBlock detectado',
TEXT: 'Este sitio web tiene como única financiación los anuncios de Google AdSense. Para visitar este sitio web, por favor, desactiva AdBlock.',
},
SOCIAL_SHARING: {
SHARE: 'Comparte y comenta en tu red social favorita',
},
},
MENU: {
ACTORS: {
Expand Down Expand Up @@ -111,7 +114,7 @@ export default
TITLE: 'Temporada {number}',
CHAPTERS: {
DETAIL: {
TITLE: 'Capítulo {slug}',
TITLE: '{slug} - {name}',
INFO: {
TITLE: 'Datos del capítulo',
NAME: 'Capítulo',
Expand Down
5 changes: 5 additions & 0 deletions middleware/scroll-top.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default () => {
if (!process.server) {
window.document.getElementById('main').scrollTop = 0;
}
};
16 changes: 13 additions & 3 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ export default {
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
htmlAttrs: {
lang: 'es',
},
title: 'ANHQV STATS',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' },
{ hid: 'description', name: 'description', content: 'Información y estadísticas Aquí No Hay Quien Viva: personajes, actores, capítulos... y mucho más. ✅ Disponible API REST documentada.' },
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
Expand All @@ -40,6 +43,7 @@ export default {
plugins: [
'@/plugins/element-ui',
'@/plugins/nuxt-anhqv-client.js',
'@/plugins/nuxt-social-sharing.js',
],
/*
** Nuxt.js dev-modules
Expand Down Expand Up @@ -87,7 +91,10 @@ export default {
],

styleResources: {
scss: ['./assets/styles/*.scss'],
scss: [
'./assets/styles/_variables.scss',
'./assets/styles/_global.scss',
],
},
/*
** Axios module configuration
Expand All @@ -105,4 +112,7 @@ export default {
*/
extend(config) { },
},
router: {
middleware: ['scroll-top'],
},
};
Loading

0 comments on commit f9fa9af

Please sign in to comment.