Skip to content

Commit

Permalink
Merge branch 'release/v0.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jualoppaz committed May 30, 2020
2 parents 9290099 + 4a6a0e3 commit 88371f7
Show file tree
Hide file tree
Showing 32 changed files with 1,559 additions and 50 deletions.
11 changes: 11 additions & 0 deletions assets/styles/_global.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import './variables.scss';

.pointer{
cursor: pointer;
}
Expand Down Expand Up @@ -36,3 +38,12 @@
}
}
}

a {
color: $color-text-black;
text-decoration: none;

&:hover{
color: $color-text-blue;
}
}
File renamed without changes.
File renamed without changes.
130 changes: 130 additions & 0 deletions components/chapters/ChapterSceneEvents.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<template>
<div id="chapter-scene-events">
<div class="block">
<div id="scene-title">
<el-tag type="primary">
{{ chapter.scenes[index].title }}
</el-tag>
</div>
<el-timeline
v-if="hasEvents()"
id="events-list"
>
<el-timeline-item
v-for="event in chapter.scenes[index].events"
:key="event.id"
:timestamp="getNodeTimestamp(event)"
placement="top"
:icon="getNodeIcon(event)"
:type="getNodeType(event)"
:color="getNodeColor(event)"
:size="getNodeSize()"
>
<el-card>
<h4 class="event-characters">
<el-avatar
v-for="character in event.characters"
:key="character.id"
:size="characterAvatarSize"
:src="character.image_url"
:alt="character.image_alt"
:title="character.shortname"
/>
</h4>
<div class="event-text">
<i>{{ event.text }}</i>
</div>
</el-card>
</el-timeline-item>
</el-timeline>
<p v-else id="empty-block">
<el-alert
:title="emptyEventsText"
type="warning"
:closable="false"
/>
</p>
</div>
</div>
</template>

<script>
import { mapState } from 'vuex';
import utils from '../../utils';
export default {
name: 'ChapterSceneEvents',
props: {
order: {
type: Number,
default: 1,
},
},
data() {
return {
characterAvatarSize: 'small',
eventTypeDialog: utils.VIEWS.SEASONS.DETAIL.CHAPTERS.DETAIL.SCENES.EVENTS.TYPE.DIALOG,
emptyEventsText: this.$t('VIEWS.SEASONS.DETAIL.CHAPTERS.DETAIL.SCENES.DETAIL.EVENTS.EMPTY'),
};
},
computed: {
...mapState('chapters', {
chapter: 'current',
}),
index() {
return this.order - 1;
},
},
methods: {
getNodeTimestamp(event) {
return String(event.order);
},
getNodeIcon(event) {
if (event.type === this.eventTypeDialog) return 'el-icon-more';
return '';
},
getNodeType(event) {
if (event.type === this.eventTypeDialog) return 'primary';
return 'info';
},
getNodeColor(event) {
if (event.type === this.eventTypeDialog) return '';
return '';
},
getNodeSize() {
return 'large';
},
hasEvents() {
return this.chapter.scenes[this.index]
&& this.chapter.scenes[this.index].events
&& this.chapter.scenes[this.index].events.length;
},
},
};
</script>

<style lang="scss" scoped>
#chapter-scene-events{
#scene-title{
text-align: center;
.el-tag{
height: auto;
white-space: normal;
}
}
#events-list{
margin-top: 10px;
.event-characters{
margin-top: 0;
}
.event-text {
text-align: justify;
}
}
}
</style>
53 changes: 53 additions & 0 deletions components/chapters/ChapterScenesList.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<template>
<div id="chapter-scenes-list">
<el-tabs :tab-position="tabPosition">
<el-tab-pane
v-for="scene in chapter.scenes"
:key="scene.id"
:label="getTabLabel(scene)"
>
<ChapterSceneEvents :order="scene.order" />
</el-tab-pane>
</el-tabs>
</div>
</template>

<script>
import { mapState } from 'vuex';
import ChapterSceneEvents from './ChapterSceneEvents.vue';
export default {
name: 'ChapterScenesList',
components: {
ChapterSceneEvents,
},
data() {
return {
tabPosition: 'left',
};
},
computed: {
...mapState('chapters', {
chapter: 'current',
}),
},
methods: {
getTabLabel(scene) {
return String(scene.id);
},
},
};
</script>

<style lang="scss" scoped>
.el-tabs {
::v-deep .el-tabs__header {
height: 450px;
overflow: hidden;
}
::v-deep .el-tabs__content {
padding-right: 15px;
}
}
</style>
File renamed without changes.
14 changes: 3 additions & 11 deletions components/Footer.vue → components/layout/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{ copyrightText }}
</div>
<div id="author">
<a href="http://www.juanmanuellopezpazos.es" target="_blank">{{ authorText }}</a>
👨‍💻 <a href="http://www.juanmanuellopezpazos.es" target="_blank" :title="authorTitle">{{ authorText }}</a>
</div>
</div>
</template>
Expand All @@ -15,7 +15,8 @@ export default {
data() {
return {
copyrightText: 'Copyright ©2020',
authorText: '👨‍💻 Juan Manuel López Pazos',
authorTitle: this.$t('FOOTER.AUTHOR.TITLE'),
authorText: 'Juan Manuel López Pazos',
};
},
};
Expand All @@ -41,14 +42,5 @@ export default {
}
}
}
a {
text-decoration: none;
color: $color-text-black;
&:hover{
color: $color-text-blue;
}
}
}
</style>
File renamed without changes.
13 changes: 11 additions & 2 deletions components/Menu.vue → components/layout/Menu.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<el-aside id="aside-menu">
<div id="logo">
<img src="/images/menu/anhqv.jpg">
<img src="/images/menu/anhqv.jpg" :alt="logoImageAlt">
</div>
<el-menu :default-openeds="defaultOpeneds" :collapse="isCollapsed">
<el-menu-item index="1">
Expand Down Expand Up @@ -97,13 +97,19 @@
</nuxt-link>
</el-menu-item>
</el-submenu>
<el-menu-item index="5">
<nuxt-link :to="{ name: `api-doc___${$i18n.locale}` }" :title="apiDocLinkTitle">
<i class="el-icon-info" />
<span>{{ apiDocItemText }}</span>
</nuxt-link>
</el-menu-item>
</el-menu>
</el-aside>
</template>

<script>
import utils from '../utils';
import utils from '../../utils';
export default {
name: 'Menu',
Expand All @@ -112,6 +118,7 @@ export default {
return {
isCollapsed: false,
defaultOpeneds: ['4'],
logoImageAlt: this.$t('MENU.LOGO.ALT'),
charactersItemText: this.$t('MENU.CHARACTERS.TEXT'),
homeItemText: this.$t('MENU.HOME.TEXT'),
actorsItemText: this.$t('MENU.ACTORS.TEXT'),
Expand All @@ -129,6 +136,8 @@ export default {
thirdSeasonLinkTitle: this.$t('MENU.SEASONS.THIRD_SEASON.LINK.TITLE'),
fourthSeasonLinkTitle: this.$t('MENU.SEASONS.FOURTH_SEASON.LINK.TITLE'),
fifthSeasonLinkTitle: this.$t('MENU.SEASONS.FIFTH_SEASON.LINK.TITLE'),
apiDocLinkTitle: this.$t('MENU.API_DOC.LINK.TITLE'),
apiDocItemText: this.$t('MENU.API_DOC.TEXT'),
};
},
mounted() {
Expand Down
6 changes: 3 additions & 3 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<script>
import VueAdBlockDetect from 'vue-adblock-detect';
import Menu from '../components/Menu.vue';
import Header from '../components/Header.vue';
import Footer from '../components/Footer.vue';
import Menu from '../components/layout/Menu.vue';
import Header from '../components/layout/Header.vue';
import Footer from '../components/layout/Footer.vue';
export default {
name: 'App',
Expand Down
27 changes: 27 additions & 0 deletions locales/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export default
},
},
MENU: {
LOGO: {
ALT: 'Logo de la serie española Aquí No Hay Quien Viva (ANHQV)',
},
ACTORS: {
TEXT: 'Actores',
LINK: {
Expand Down Expand Up @@ -63,6 +66,12 @@ export default
},
},
},
API_DOC: {
TEXT: 'API REST',
LINK: {
TITLE: 'Documentación de la API REST',
},
},
},
VIEWS: {
HOME: {
Expand Down Expand Up @@ -170,9 +179,27 @@ export default
VIDEO: {
TITLE: 'Vídeo del capítulo',
},
SCENES: {
EMPTY: 'No hay escenas registradas.',
TITLE: 'Escenas del capítulo',
DETAIL: {
EVENTS: {
EMPTY: 'No hay eventos registrados.',
},
},
},
},
},
},
},
API_DOC: {
TITLE: 'API REST',
TEXT: '<p>En esta página se muestra la documentación Swagger de la API REST de la web <a href="http://www.anhqv-stats.es">ANHQV STATS</a>. Decir que se trata de una API <strong>NO OFICIAL</strong> de la serie Aquí No Hay Quien Viva. En ella podrás consultar información sobre: <strong>personajes</strong>, <strong>actores</strong>, <strong>capítulos</strong>, <strong>escenas</strong>... y hasta <strong>diálogos</strong>.</p>',
},
},
FOOTER: {
AUTHOR: {
TITLE: 'Página web personal de Juan Manuel López Pazos',
},
},
};
1 change: 1 addition & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default {
*/
css: [
'element-ui/lib/theme-chalk/index.css',
'swagger-ui/dist/swagger-ui.css',
],
/*
** Plugins to load before mounting the App
Expand Down
Loading

0 comments on commit 88371f7

Please sign in to comment.