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="character-screen__vertical-wave"> | |
<svg | |
viewBox="0 0 202 1449" | |
version="1.1" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
> | |
<g | |
id="Page-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
<div class="hero__marquee marquee"> | |
<div class="marquee__text"> | |
<!-- HTML Markup --> | |
</div> | |
<div class="marquee__text"> | |
<!-- HTML Markup --> | |
</div> | |
<div class="marquee__text"> | |
<!-- HTML Markup --> | |
</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
let callCount = 0; | |
let bucketCount = 0; | |
// Bucket Settings | |
const bucketCapacity = 8; | |
const leakRate = 2; | |
const leakTime = 1000; | |
// Call Settings | |
const callAmount = 5; |
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
/*------------------------ | |
Libraries | |
------------------------*/ | |
const axios = require("axios"); | |
const fs = require("fs"); | |
const FormData = require("form-data"); | |
/*------------------------ | |
Download the file. | |
Good article on how to download a file and send with form data - https://maximorlov.com/send-a-file-with-axios-in-nodejs/ |
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
async function printFiles () { | |
const files = await getFilePaths(); | |
await Promise.all(files.map(async (file) => { | |
const contents = await fs.readFile(file, 'utf8') | |
console.log(contents) | |
})); | |
} |
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
function createSticker(sticker, xPosition = 100, yPosition = 100) { | |
fetch(sticker.svg) | |
.then(res => res.text()) | |
.then(svg => { | |
// Body Creation | |
// Save a blank array of vertex sets. | |
const vertexSets = []; | |
// Use the dom parser to parse our svg. |
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
/*------------------------- | |
Calculate Container Margin | |
-------------------------*/ | |
document.addEventListener('DOMContentLoaded', event => { | |
let root = document.documentElement; | |
// Calculate Container Margin | |
function calculateContainerMargin() { | |
const container = document.querySelector('.container'); |
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 gsap from 'gsap'; | |
import { ScrollTrigger } from 'gsap/ScrollTrigger'; | |
function initScrollDirectionIndicator() { | |
// GSAP Plugins | |
gsap.registerPlugin(ScrollTrigger); | |
/*---------------------------- | |
Elements | |
----------------------------*/ |
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 Flickity from 'flickity-fade'; | |
require('flickity-imagesloaded'); | |
/** | |
* Init Flickity | |
* | |
* @param node container - The container element node. Flickity gallery and arrows should be within this container. | |
* @param object flickityOptions - The specific flickity api options for this initialization. | |
* | |
* output Sets up a Flickity slider instance with standard slider customizations done via the api. |
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
/*------------------------- | |
Target Blank | |
--- | |
Link all external links to a new window. | |
-------------------------*/ | |
document.addEventListener('DOMContentLoaded', () => { | |
for (var c = document.getElementsByTagName('a'), a = 0; a < c.length; a++) { | |
var b = c[a]; | |
b.getAttribute('href') && |