Skip to content

Commit

Permalink
Revert "toggle animation and vue scroll reveal"
Browse files Browse the repository at this point in the history
This reverts commit 33473b6.
  • Loading branch information
amirafzali committed Feb 16, 2021
1 parent 33473b6 commit 2c9c7c1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 120 deletions.
42 changes: 1 addition & 41 deletions my/src/assets/css/status.css
Original file line number Diff line number Diff line change
Expand Up @@ -682,13 +682,6 @@ a {
-moz-animation: statusanimation 140s ease infinite;
animation: statusanimation 140s ease infinite; */
}
.staticBackground {
background: rgb(0,0,0);
/* background: linear-gradient(180deg,#7a72e5 45%, #ab5797 50%); */
background: linear-gradient(270deg,#7067e0,#973d82);
/* background-size: 800% 800%; */
background-size: 200% 200%;
}

@-webkit-keyframes statusanimation {
0% {
Expand Down Expand Up @@ -846,37 +839,4 @@ a {
.swag-url {
color: orange;
font-weight: 500;
}
.act-btn {
font-weight: bold;
text-align: center;
text-decoration: none;
font-family: 'Montserrat', sans-serif;
opacity: 0.99;
padding: 10px 23%;
color: white;
transition: 0.1s ease-in-out;
cursor: pointer;
z-index: 100;
width: 97.5%;
}

.act-btn-group {
z-index: 10;
float:right !important;
}

.toggle-btn-grp{
padding: 0px !important;
float:right !important;
}

.act-btn__reset {
background-color: rgba(255, 255, 255, 0.1) !important;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2) !important;
padding: 0 !important;
}

.togbtn {
padding:0 !important;
}
}
15 changes: 0 additions & 15 deletions my/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ interface StoreState {
db: firebase.firestore.Firestore;
firebase: any;
currentHackathon: string;
animationToggle: boolean,
}

// export the store
Expand All @@ -22,19 +21,5 @@ export default new Vuex.Store({
db,
firebase,
currentHackathon: 'DH7',
animationToggle: window.localStorage.getItem('animationToggle') === 'true',
} as StoreState,
getters:{
animateBackground: state => {
return state.animationToggle;
}
},
mutations:{
changeAnimate (state, payload){
state.animationToggle = payload;
localStorage.setItem('animationToggle', payload);
location.reload();
}
}
});
sessionStorage.clear();
17 changes: 15 additions & 2 deletions my/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,20 @@ export interface ApplicationModel {
snack: SnackBar;
resetDialogue: boolean;
submitDialogue: boolean;
toggleAnimation: boolean;
}

export interface SubmitModel {
app: AppContents;

// this needs to be typed
questions: any;
authorizations: any;
updateTimeout: any;
snack: SnackBar;
resetDialogue: boolean;
submitDialogue: boolean;
loadingDialogue: boolean;
loadingError: boolean;
}

export interface AppContents {
Expand Down Expand Up @@ -75,6 +88,7 @@ export interface AppContents {
};
general: {
coffee: string;
emails: boolean,
team: string;
termsAndConditions: boolean;
code: boolean;
Expand Down Expand Up @@ -146,7 +160,6 @@ export interface StatusModel {
splashMessage: string;
busSelected: string;
rsvp: {coming: boolean, origin: string};
toggleAnimation: boolean;
}

export interface ApplyState {
Expand Down
49 changes: 4 additions & 45 deletions my/src/views/Apply.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,14 @@
</a><br>
</div>
</div>
<div :class="{backgroundStatic: toggleAnimation, background: !toggleAnimation}">
<div class="background">
<Nav class="fit" />
<v-container class="act-btn-group toggle-btn-grp" text-xs-center>
<v-layout align-center justify-center row wrap>
<v-flex xs12>
<v-btn class="act-btn act-btn__reset" @click="changeAnimation">Toggle Animations</v-btn>
</v-flex>
</v-layout>
</v-container>

<v-snackbar top right :color="snack.color" v-model="snack.visible" :timeout="snack.timeout">
{{ snack.message }}
<v-btn :color="snack.btnColor" flat text @click="snack.visible = false">Close</v-btn>
</v-snackbar>
<ValidationObserver ref="form">
<form action>

<div class="cardify">
<p class="big">Apply here.</p>
<p class="small">
Expand Down Expand Up @@ -71,7 +62,7 @@
<ValidationProvider
v-for="(authorization, i) in authorizations"
:key="'authorization_' + i"
:rules="{ mustBe: true }"
:rules="authorization.requirements"
:name="authorization.label"
v-slot="{ errors }"
>
Expand Down Expand Up @@ -124,7 +115,6 @@ import 'firebase/firestore';
import 'firebase/storage';
import VueScrollReveal from 'vue-scroll-reveal';
import deepmerge from 'deepmerge';
import store from '../store';
import Nav from '@/components/Nav.vue';
import Card from '@/components/Card.vue';
Expand All @@ -150,8 +140,7 @@ Vue.use(VueScrollReveal, {
duration: 1000,
scale: 1.35,
distance: '10px',
mobile: !store.getters.animateBackground,
desktop: !store.getters.animateBackground,
mobile: true,
reset: true,
});
Expand Down Expand Up @@ -191,7 +180,6 @@ Vue.component('ValidationProvider', ValidationProvider);
Vue.component('ValidationObserver', ValidationObserver);
export default Vue.extend({
store,
data(): ApplicationModel {
return {
app: getBlankApplication(),
Expand All @@ -205,11 +193,9 @@ export default Vue.extend({
visible: false,
message: 'Progress saved!',
},
toggleAnimation: this.$store.getters.animateBackground,
resetDialogue: false,
submitDialogue: false,
};
},
components: {
Card,
Expand All @@ -218,10 +204,6 @@ export default Vue.extend({
Dialog,
},
methods: {
changeAnimation: function(){
this.toggleAnimation = !this.toggleAnimation;
this.$store.commit("changeAnimate", this.toggleAnimation)
},
async logout() {
try {
await firebase.auth().signOut();
Expand Down Expand Up @@ -383,7 +365,6 @@ export default Vue.extend({
mounted(): void {
this.questions = applicationQuestions;
this.authorizations = authorizations;
},
});
</script>
Expand Down Expand Up @@ -439,10 +420,6 @@ export default Vue.extend({
padding: 20px 0 40px 0;
}
.toggle-btn-grp{
padding-bottom: 0px !important;
}
@media only screen and (max-width: 960px) {
.act-btn-group {
width: 90%;
Expand Down Expand Up @@ -503,25 +480,7 @@ export default Vue.extend({
v-snackbar {
background-color: red !important;
}
.backgroundStatic{
width: 100% !important;
min-width: 100vw;
height: 100%;
background-size: cover;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
/* background: linear-gradient(269deg, #6D0169, #D9636D, #405BC4, #1D847C, #7C2ECC, #4179BE); */
background: linear-gradient(
269deg,
#7c1078,
#e8727c,
#4f6ad3,
#2c938b,
#8b3ddb,
#5088cd
);
background-size: 1400% 1400%;
}
.background {
width: 100% !important;
min-width: 100vw;
Expand Down
18 changes: 1 addition & 17 deletions my/src/views/Status.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
/>
</div>
</v-app>
<v-app key="2" v-if="true" class="dashboard" :class="{staticBackground: toggleAnimation, statusbackground: !toggleAnimation}">
<v-app key="2" v-if="true" class="dashboard statusbackground">
<Navbar2 />

<div class="wrap">
<!--Column#1-->
<div class="col col6">
Expand Down Expand Up @@ -251,13 +250,6 @@
</a>
</div>
</div>
<v-container class="act-btn-group toggle-btn-grp" text-xs-center>
<v-layout align-center justify-center row wrap class="togbtn">
<v-flex xs12>
<v-btn class="act-btn act-btn__reset" @click="changeAnimation">Toggle Animations</v-btn>
</v-flex>
</v-layout>
</v-container>
</div>
<div class="box box5 status tablet">
<div class="currentStatus" v-if="step < 8">
Expand Down Expand Up @@ -302,7 +294,6 @@
</div>
</div>
</div>

<v-snackbar top right :color="snack.color" v-model="snack.visible" :timeout="snack.timeout">
{{ snack.message }}
<v-btn :color="snack.btnColor" flat text @click="snack.visible = false">Close</v-btn>
Expand All @@ -327,12 +318,10 @@ import { mapGetters } from 'vuex';
import db from '../firebase_init';
import { StatusModel } from '../types';
import { busCities } from '../data';
import store from '../store';
const allUniversities = [];
export default Vue.extend({
store,
mixins: [validationMixin],
name: 'Status',
data(): StatusModel {
Expand Down Expand Up @@ -431,7 +420,6 @@ export default Vue.extend({
splashMessage: '',
busSelected: 'Not bussing',
rsvp: { coming: false, origin: '' },
toggleAnimation: this.$store.getters.animateBackground,
};
},
components: {
Expand Down Expand Up @@ -459,10 +447,6 @@ export default Vue.extend({
},
methods: {
// Grabs the application from where its store in firebase
changeAnimation: function(){
this.toggleAnimation = !this.toggleAnimation;
this.$store.commit("changeAnimate", this.toggleAnimation)
},
fetchFromFirebase(): Promise<any> {
return this.$store.state.db
.collection(this.$store.state.currentHackathon)
Expand Down

0 comments on commit 2c9c7c1

Please sign in to comment.