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
{ | |
// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$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
export default { | |
data() { | |
return { isShown: false, isActive: false, boundingClientRect: {} } | |
}, | |
methods: { | |
intersectionCb(entries) { | |
if (entries[0].intersectionRatio > 0) { | |
this.isShown = true | |
this.isActive = true | |
this.boundingClientRect = entries[0].boundingClientRect |
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="dev-design" v-show="isShown" :style="{ opacity }"> | |
<img | |
v-for="(img, i) in imgsUrl" | |
:src="img" | |
:key="`img-${i}`" | |
v-show="currentImg === i" | |
/> | |
</div> | |
</template> |
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 ({ app }, inject) => { | |
inject('tf', (text) => text.replace(/[\u2028]/g, ' ')) | |
} |
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
float g = greyscale(texture2D(tMap, uv).r; | |
vec3 finalColor = mix(colorA, colorB, g); |
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
.line-ellipsis{ | |
overflow: hidden; | |
text-overflow: ellipsis; | |
display: -webkit-box; | |
-webkit-line-clamp: 2; /* number of lines to show */ | |
line-clamp: 2; | |
-webkit-box-orient: vertical; | |
} |
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 { SiteClient } = require('datocms-client') | |
const client = new SiteClient(process.env.GRAPHQL_TOKEN) | |
const fs = require('fs') | |
export default function () { | |
client.items | |
.all({ 'filter[type]': 'your_redirect_modelApiKey' }, { allPages: true }) | |
.then((records) => { | |
const array = records.map((el) => { | |
return { |
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
.b-r{ | |
border-radius: $radius; | |
overflow: hidden; | |
&.-animating{ | |
-webkit-mask-image: -webkit-radial-gradient(white, black); | |
} | |
} |
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 rating = '★★★★★☆☆☆☆☆'.slice(5-stars,10-stars) |
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
float scale(float _val, float _scale) { | |
_val -= 0.5; | |
_val *= _scale; | |
_val += 0.5; | |
return _val; | |
} | |
vec2 coverImage(vec2 _pos) { | |
float rS = uRes.x / uRes.y; | |
float rI = uImageRes.x / uImageRes.y; |
OlderNewer