From 27a252205e634449483041dd1ef01adaca58da87 Mon Sep 17 00:00:00 2001 From: Mateusz Barucha Date: Thu, 19 Feb 2015 18:51:06 +0100 Subject: [PATCH 1/4] Can close by pressing Escape key --- index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 969d9b5..82e7740 100755 --- a/index.html +++ b/index.html @@ -152,7 +152,14 @@

Sidebar Transitions

[].slice.call( document.querySelectorAll( 'form button' ) ).forEach( function( bttn ) { bttn.addEventListener( 'click', function( ev ) { ev.preventDefault(); } ); } ); + + $(document).keyup(function(e) { + if (e.keyCode == 27) { + // escape + $('.active .icon-close').click(); + } + }); })(); - \ No newline at end of file + From f454ecce85666aac1aea2feb1000a963dcc4877b Mon Sep 17 00:00:00 2001 From: Mateusz Barucha Date: Thu, 19 Feb 2015 18:53:53 +0100 Subject: [PATCH 2/4] Update index.html --- index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.html b/index.html index 82e7740..f61fdec 100755 --- a/index.html +++ b/index.html @@ -13,6 +13,7 @@ +
@@ -159,6 +160,9 @@

Sidebar Transitions

$('.active .icon-close').click(); } }); + $('.modal').click(function() { + $('.active .icon-close').click(); + }); })(); From 4222c3fabd6ab145c385ac5e766519604118f685 Mon Sep 17 00:00:00 2001 From: Mateusz Barucha Date: Thu, 19 Feb 2015 18:56:40 +0100 Subject: [PATCH 3/4] Update component.css --- css/component.css | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/css/component.css b/css/component.css index c151020..12ffd06 100755 --- a/css/component.css +++ b/css/component.css @@ -119,7 +119,7 @@ } /* Morph Button Style: Modal */ -.morph-button-modal::before { +.morph-button-modal .modal { position: fixed; top: 0; left: 0; @@ -132,14 +132,15 @@ -webkit-transition: opacity 0.5s; transition: opacity 0.5s; pointer-events: none; + display: block; } -.morph-button-modal.open::before { +.morph-button-modal.open .modal { opacity: 1; pointer-events: auto; } -.morph-button-modal.active::before { +.morph-button-modal.active .modal { z-index: 1800; } @@ -495,4 +496,4 @@ .morph-button-sidebar.open .morph-content { height: 100% !important; } -} \ No newline at end of file +} From b39e3322fa9441a609ffaf272eebaf777984f75c Mon Sep 17 00:00:00 2001 From: Mateusz Barucha Date: Thu, 19 Feb 2015 18:57:28 +0100 Subject: [PATCH 4/4] Update index.html --- index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.html b/index.html index f61fdec..f5705d0 100755 --- a/index.html +++ b/index.html @@ -40,6 +40,7 @@

Morphing Buttons Concept

Pea horseradish azuki bean lettuce avocado asparagus okra.

+
@@ -57,6 +58,7 @@

Login

or
+