This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="home" transition="slideHome"> | |
<h1>{{ msg }}</h1> | |
<div id="work"> | |
<article class="project-item" v-for="project in projects"> | |
<a v-link="project.url"> | |
<div class="project-item__inner"> | |
<h1 class="project-item__title">{{ project.title }}</h1> | |
<div class="project-item__thumb" v-bind:style=""></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="single" transition="slideSingle"> | |
<h1>{{ title }}</h1> | |
</div> | |
</template> | |
<script> | |
import Vue from 'vue' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './css/reset/normalize.scss' | |
import './css/base/base.scss' | |
import Vue from 'vue' | |
import VueRouter from 'vue-router' | |
import About from './about.vue' | |
import Home from './home.vue' | |
import Single from './single.vue' | |
Vue.use(VueRouter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.current == (this.total - 1) ? (this.current = 0 && this.prev = (this.total - 1)) : (this.current += 1 && this.prev = (this.current - 1)) | |
if(this.current == (this.total - 1)) { | |
this.current = 0 | |
this.prev = (this.total - 1) | |
} else { | |
this.current += 1 | |
this.prev = (this.current - 1) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios') | |
module.exports = { | |
generate: { | |
routes: function () { | |
return axios.get('http://exmaple.com/api/cases') | |
.then((res) => { | |
return res.data.objects.map((content) => { | |
return { | |
route: '/case/' + content.slug, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
async asyncData ({ params, error, payload }) { | |
if (payload) return { content: payload } | |
else return { | |
content: 'something else' | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Scrollbar, { ScrollbarPlugin } from 'smooth-scrollbar' | |
class InvertDeltaPlugin extends ScrollbarPlugin { | |
static pluginName = 'invertDelta' | |
static defaultOptions = { | |
events: [], | |
} | |
transformDelta(delta, fromEvent) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import TweenMax from 'gsap' | |
import event from 'dom-events' | |
import lerp from '~/assets/js/functions/lerp' | |
export default class Smooth { | |
constructor() { | |
this.createBound() | |
this.content = document.querySelector('.js-scroll-content') | |
this.sections = [...this.content.querySelectorAll('.js-scroll-section')] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import TweenMax from 'gsap' | |
import event from 'dom-events' | |
import lerp from '~/assets/js/functions/lerp' | |
export default class Smooth { | |
constructor() { | |
this.createBound() | |
this.content = document.querySelector('.js-scroll-content') | |
this.sections = [...this.content.querySelectorAll('.js-scroll-section')] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import TweenMax from 'gsap' | |
import events from 'dom-events' | |
export default class Magnetic { | |
constructor() { | |
this.elem = document.querySelector('[data-magnetic]') | |
this.cursor = { | |
x: 0, | |
y: 0 |
OlderNewer