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
.uppercase { | |
font-feature-settings: 'case' on; | |
} |
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
/////// install first | |
npm i -D scrollmagic gsap scrollmagic-plugin-gsap | |
/////// plugin | |
/* eslint-disable import/no-webpack-loader-syntax */ | |
import Vue from 'vue' | |
import { TweenMax, TimelineMax } from 'gsap' | |
import * as ScrollMagic from 'scrollmagic' |
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
mounted() { | |
const pixelScript = this.shareInfo.pixelScript | |
const analyticsScript = this.shareInfo.analyticsScript | |
if (pixelScript.includes('<script>')) { | |
document.body.appendChild(this.htmlToElements(pixelScript)) | |
} | |
if (analyticsScript.includes('<script>')) { | |
document.body.appendChild(this.htmlToElements(analyticsScript)) | |
} |
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 Vue from 'vue' | |
Vue.directive('mouse-down', { | |
bind: function (el, binding, vnode) { | |
el.clickOutsideEvent = function (event) { | |
// here I check that click was outside the el and his childrens | |
if (!(el == event.target || el.contains(event.target))) { | |
// and if it did, call method provided in attribute value | |
vnode.context[binding.expression](event); | |
} |
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
chooseWithArrows(e) { | |
const SCROLL_BOX = this.$refs.scrollWithArrow | |
let scrollDiv; | |
if (e.keyCode == '38') { | |
//check if i is smaller than 0 | |
this.i - 1 < 0 ? this.i = this.searchHendler.length-1 : this.i -=1; | |
//add animation using this variable | |
this.scrollTo = this.searchHendler[this.i][this.name] | |
//check offset of child component | |
scrollDiv = SCROLL_BOX.childNodes[this.i].offsetTop |
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.$nextTick(() => { | |
this.$refs.searchInput.focus(); | |
}) |
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
``` | |
answer() { | |
const answer = this.text.answer | |
const splitedAnswer = answer.split(';') | |
if (splitedAnswer.length > 1) { | |
const createNode = (x) => '<li>' + x + '</li>' | |
const list = splitedAnswer.map(createNode) | |
return '<ul>' + list.join('') + '</ul>' | |
} | |
return answer |
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> | |
<section> | |
<svg class="" height="20" width="20" viewBox="0 0 20 20"> | |
<circle r="10" cx="10" cy="10" fill="white" /> | |
<circle v-for="(item, index) in pie" :key="index" r="5" cx="10" cy="10" fill="transparent" | |
stroke="tomato" | |
stroke-width="10" | |
:stroke-dasharray="item.width + ' 31.42'" | |
:transform="'rotate(' + item.rotate + ')'" /> | |
<circle r="5" cx="10" cy="10" fill="white" stroke-width="0"/> |
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
:style="`display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; text-overflow: ellipsis; -webkit-line-clamp: ${};`" |
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
var checkScrollSpeed = (function(settings){ | |
settings = settings || {}; | |
var lastPos, newPos, timer, delta, | |
delay = settings.delay || 50; // in "ms" (higher means lower fidelity ) | |
function clear() { | |
lastPos = null; | |
delta = 0; | |
} |
NewerOlder