Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block j2is

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View useSmoothScroll.js
import {
useRef, useCallback, useEffect, useState
} from 'react';
import smoothscroll from 'smoothscroll-polyfill';
function useSmoothScroll() {
const scrollRafPending = useRef(false);
const scrollRafInstance = useRef(false);
j2is / img.twig
Created Jan 22, 2019
Macro for responsive images
View img.twig
# macros for responsive images
# usage simple: {{ macro_img.responsive(asset) }}
# usage extra: {{ macro_img.responsive(assetThumbnail, {alt: 'some thumb', class: ['thumb-class'], {style: 'thumb'}}) }}
You can’t perform that action at this time.