Skip to content

Instantly share code, notes, and snippets.

View joebailey26's full-sized avatar

Joe Bailey joebailey26

View GitHub Profile
@joebailey26
joebailey26 / scroll.html
Last active January 14, 2021 22:27
Smooth Scroll
<style>
:root:focus-within {
scroll-behavior: smooth;
}
@media screen and (prefers-reduced-motion: reduce) {
:root:focus-within {
scroll-behavior: auto;
}
}
</style>
@joebailey26
joebailey26 / gh-pages-deploy.md
Created December 16, 2019 18:15 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@joebailey26
joebailey26 / navigation_drawer.html
Created September 30, 2019 18:58
A navigational menu with slide out drawer on mobile
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Navigation Drawer</title>
<meta name="description" content="Navigation Drawer">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<style>