This file contains hidden or 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
| /** | |
| * Code that will fit the text to the card of project-grid-item if is only one word vanillajs | |
| */ | |
| const fitText = () => { | |
| const projectGridItems = document.querySelectorAll('.project-grid-item'); | |
| projectGridItems.forEach((item) => { | |
| const text = item.querySelector('.title'); | |
| // get length of words | |
| const textLength = text.innerText.split(' ').length; |
This file contains hidden or 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' | |
| import {SplitText} from 'gsap/SplitText' | |
| import CustomEase from 'gsap/CustomEase' | |
| gsap.registerPlugin(ScrollTrigger) | |
| gsap.registerPlugin(SplitText) | |
| document.addEventListener('DOMContentLoaded', () => { | |
| const animations = { |
This file contains hidden or 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
| // of course gulp | |
| const {src, dest, parallel, series, watch} = require('gulp'); | |
| // variables | |
| const build = true; // true para compilar e minificar os arquivos - false para não minificar e nem usar babel (performance maior), use true para compilar o projeto final | |
| const jsBuildDir = './assets/dist/js/'; // diretório de destino do bundle.js compilado | |
| const cssBuildDir = './'; // diretório de destino do style.css compilado | |
| // css | |
| const sass = require('gulp-sass'); |
This file contains hidden or 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
| [alias] | |
| # Shorthand for checkout | |
| co = checkout | |
| # Shorthand for branch | |
| br = branch | |
| # Shorthand for commit | |
| ci = commit | |
| # Shorthand for status | |
| st = status | |
| # Hide file from Git tracking |
This file contains hidden or 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
| <?php | |
| function rw_image_resize( $attachment_id, $width, $height, $crop = true ) | |
| { | |
| $path = get_attached_file( $attachment_id ); | |
| if ( ! file_exists( $path ) ) | |
| { | |
| return false; | |
| } | |
| $upload = wp_upload_dir(); |
NewerOlder