yarn add -D @zeit/next-css postcss-preset-env
yarn add tailwindcss
# or a copy-friendly version
yarn add -D @zeit/next-css postcss-preset-env postcss-easy-import && \
yarn add tailwindcss
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
const SCROLL_UP = 1; | |
const SCROLL_DOWN = -1; | |
const useScrollDirection = ({ | |
initialDirection, | |
thresholdPixels, | |
off | |
} = {}) => { | |
const [scrollDir, setScrollDir] = useState(initialDirection); |
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
.element { | |
-ms-overflow-style: none; /* Internet Explorer 10+ */ | |
scrollbar-width: none; /* Firefox */ | |
&::-webkit-scrollbar { | |
display: none; /* Safari and Chrome */ | |
} |
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
const hashLink = /(#)([^\s]+)/gi | |
function isAnchor (url) { | |
if (!process.client) { | |
return false | |
} | |
if (url) { | |
if ( | |
url.includes(location.href) && | |
hashLink.test(url) |
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
{ | |
"window.zoomLevel": 3, | |
"eslint.autoFixOnSave": true, | |
"eslint.validate": [ | |
{ | |
"language": "vue", | |
"autoFix": true | |
}, | |
{ | |
"language": "html", |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "client: chrome", | |
"url": "http://localhost:3000", | |
"webRoot": "${workspaceFolder}" | |
}, |
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
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
#! /usr/bin/env python | |
import asyncio | |
import tldextract | |
import functools | |
import os | |
import click | |
from urllib.parse import urlparse | |
from usp.tree import sitemap_tree_for_homepage | |
from pyppeteer import launch | |
from functools import wraps |
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
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/tailwind.min.css"> | |
<!-- Responsive indicators! --> | |
<div class="fixed top-0 right-0 z-50 bg-pink-500 text-white shadow-md px-2 rounded-bl font-mono"> | |
<span class="sm:hidden">default</span> | |
<span class="hidden sm:inline md:hidden">sm</span> | |
<span class="hidden md:inline lg:hidden">md</span> | |
<span class="hidden lg:inline xl:hidden">lg</span> | |
<span class="hidden xl:inline">xl</span> | |
</div> |