Created
July 26, 2015 05:09
-
-
Save brendanpuck/6b9dddc229b533917b4d to your computer and use it in GitHub Desktop.
Revisions
-
brendanpuck created this gist
Jul 26, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ Expanding Nav Element --------------------- a pure CSS implementation based on the morphing buttons codrops article demo - http://tympanus.net/Development/ButtonComponentMorph/index7.html# Forked from [Scott](http://codepen.io/scottohara/)'s Pen [Expanding Nav Element](http://codepen.io/scottohara/pen/AoFvD/). A [Pen](http://codepen.io/brendanpuck/pen/RPeyzO) by [Brendan](http://codepen.io/brendanpuck) on [CodePen](http://codepen.io/). [License](http://codepen.io/brendanpuck/pen/RPeyzO/license). 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,77 @@ <input type="checkbox" id="nav-expand" class="invis" /> <nav class="nav-side"> <label for="nav-expand" class="btn-label"> Click plz </label> <ul class="menu-list"> <li> <a href="#!" title="descriptive title"> Link Label </a> </li> <li> <a href="#!" title="descriptive title"> ಠ_ಠ Link Label </a> </li> <li> <a href="#!" title="descriptive title"> Link Label </a> </li> <li> <a href="#!" title="descriptive title"> Link Label </a> </li> <li> <a href="#!" title="descriptive title"> Link Label </a> </li> <li> <a href="#!" title="descriptive title"> Link Label </a> </li> </ul> </nav> <main class="main-base" role="main"> <header class="header-base" role="banner"> <div class="content"> <h1> Display Sidebar/Settings on Click/Press of Icon </h1> </div> </header> <article> <div class="content"> <p> Bacon ipsum dolor sit amet filet mignon prosciutto ham hock boudin pork chop swine shoulder beef. Flank andouille ground round strip steak pork bacon venison ham hock, tongue turducken. Venison jowl hamburger salami bacon capicola. Chuck ribeye sirloin spare ribs, venison beef t-bone prosciutto swine strip steak. Chuck jowl spare ribs tenderloin prosciutto. Pancetta pork chop venison bacon short ribs porchetta. Short loin short ribs kielbasa biltong t-bone tail brisket porchetta pork pork loin chicken. </p> <p> Pork belly meatball sirloin ribeye pork loin meatloaf. Tongue kielbasa chuck sausage, turducken jerky hamburger t-bone fatback frankfurter pork loin pig venison tail. Sirloin tri-tip kevin shankle salami doner jerky capicola leberkas tongue drumstick. Tongue turkey prosciutto salami tri-tip. Shank doner sirloin landjaeger pancetta beef ribs. </p> <p> Frankfurter pork loin short ribs andouille kevin. T-bone tail pig chuck prosciutto brisket. Landjaeger tail fatback beef porchetta, biltong shoulder turkey shankle kevin jowl pancetta brisket pork belly boudin. Short loin tenderloin swine, hamburger bresaola rump shank ground round ham kielbasa chicken pancetta capicola. Boudin chicken frankfurter, pig kielbasa flank ball tip. Corned beef pastrami landjaeger, meatloaf flank shankle pig meatball chuck pork loin swine. </p> <p> Pork belly meatball sirloin ribeye pork loin meatloaf. Tongue kielbasa chuck sausage, turducken jerky hamburger t-bone fatback frankfurter pork loin pig venison tail. Sirloin tri-tip kevin shankle salami doner jerky capicola leberkas tongue drumstick. Tongue turkey prosciutto salami tri-tip. Shank doner sirloin landjaeger pancetta beef ribs. </p> <p> Frankfurter pork loin short ribs andouille kevin. T-bone tail pig chuck prosciutto brisket. Landjaeger tail fatback beef porchetta, biltong shoulder turkey shankle kevin jowl pancetta brisket pork belly boudin. Short loin tenderloin swine, hamburger bresaola rump shank ground round ham kielbasa chicken pancetta capicola. Boudin chicken frankfurter, pig kielbasa flank ball tip. Corned beef pastrami landjaeger, meatloaf flank shankle pig meatball chuck pork loin swine. </p> </div> </article> <footer> <div class="content"> <p> Oh bai </p> </div> </footer> </main> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,132 @@ *, *::after, *::before { box-sizing: border-box; font-family: arial; line-height: 2; margin: 0; } body { background: #333; overflow-x: hidden; @media screen and (max-width: 500px) { font-size: 80%; } } p { margin-bottom: 24px; &:last-child { margin-bottom: 0; } } .content { margin: auto; max-width: 1000px; padding: 20px; } .invis { height: 1px; left: -999px; position: absolute; top: -999px; visibility: hidden; width: 1px; } .main-base { background: #ddd; left: 0px; position: relative; transition: all .3s; header, footer { background: #aaa; color: #fff; } } footer a { color: #fff; } .nav-side { background: #E85657; color: #fff; box-shadow: 0 0 10px rgba(0,0,0,.1); height: 80px; left: 0; top: 0; overflow: hidden; padding: 8px 0; position: fixed; transition: all .3s; width: 80px; z-index: 2; } .menu-list { height: 0%; list-style: none; margin: 0; overflow: hidden; padding: 0; transition: all .3s; a { border-bottom: 1px solid #eee; color: #fff; display: block; padding: 12px 8px; text-decoration: none; &:hover { background: rgba(0,0,0,.5); } } } .btn-label { cursor: pointer; margin-left: 4px; } #nav-expand:checked + .nav-side { bottom: 0; height: 100%; left: 0; width: 200px; .menu-list { height: 100%; } .btn-label { color: transparent; display: inline-block; height: 20px; line-height: 20px; text-align: center; width: 20px; &:hover { background: #eee; } &::before { color: #000; content: "X"; line-height: 20px; } } + .main-base { left: 200px; } }