Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View joebailey26's full-sized avatar

Joe Bailey joebailey26

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

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 / navigation_drawer.html
Created September 30, 2019 18:58
A navigational menu with slide out drawer on mobile
<!DOCTYPE html>
<html lang="en-GB">
<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="" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">