Revert "Original fade in transitions, PR now made into dev."

This reverts commit 1397e0bebc.
This commit is contained in:
Haydon Curteis-Lateo
2019-10-04 11:22:26 +01:00
parent 1397e0bebc
commit e67efc027e
2 changed files with 7 additions and 47 deletions

View File

@@ -99,35 +99,6 @@ h1 {
grid-gap: 1rem; grid-gap: 1rem;
} }
// Fade in title and cards and rows
.fade-title {
&-enter {
opacity: 0;
&-to {
opacity: 1;
}
&-active {
transition: opacity .1s ease-in-out;
}
}
}
.fade-card {
&-enter {
opacity: 0;
&-to {
opacity: 1;
}
&-active {
transition: opacity .1s ease-in-out;
}
}
}
@media (max-width: 400px) { @media (max-width: 400px) {
.layout { .layout {

View File

@@ -1,15 +1,12 @@
<template lang="pug"> <template lang="pug">
div div
transition(name="fade-title" @after-enter="afterEnter") h1 {{ category.title }}
h1(v-if="showTitle") {{ category.title }} .cards(v-if="areCardsVisible")
transition(name="fade-card") template(v-for='resource in category.resources' )
.cards(v-if="areCardsVisible && showCards") Card(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
template(v-for='resource in category.resources' ) table(v-if="!areCardsVisible")
Card(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle') template(v-for='resource in category.resources' )
transition(name="fade-card") TableRow(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
table(v-if="!areCardsVisible && showCards")
template(v-for='resource in category.resources' )
TableRow(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
</template> </template>
<script> <script>
@@ -22,8 +19,6 @@ export default {
categoryRouteTitle: this.$route.params.category, categoryRouteTitle: this.$route.params.category,
index: '', index: '',
activeCard: '', activeCard: '',
showTitle: false,
showCards: false,
}; };
}, },
computed: { computed: {
@@ -47,14 +42,8 @@ export default {
} catch (e) { } catch (e) {
console.error(e); console.error(e);
} }
},
afterEnter(el) {
this.showCards = true;
} }
}, },
mounted() {
this.showTitle = true;
},
created() { created() {
this.activeCard = this.$route.query.card || '' this.activeCard = this.$route.query.card || ''
}, },