-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.2.0: Use provider to show and hide menu
- Loading branch information
1 parent
23af698
commit e9e3920
Showing
14 changed files
with
186 additions
and
115 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,21 @@ | ||
angular.module('super-awesome-demo',['shoppinpal.ng-mobile-menu']); | ||
angular.module('super-awesome-demo',['shoppinpal.mobile-menu']) | ||
.config(['$routeProvider',function($routeProvider){ | ||
$routeProvider | ||
.when("/skinny", { | ||
templateUrl: "skinny.html"//, | ||
//controller: "SkinnyCtrl" | ||
}) | ||
.when("/wide", { | ||
templateUrl: "wide.html"//, | ||
//controller: "WideCtrl" | ||
}) | ||
.otherwise({ | ||
redirectTo: "/skinny" | ||
}); | ||
}]); | ||
// .controller('SkinnyCtrl', ['$scope', '$routeParams', DummyCtrl]) | ||
// .controller('WideCtrl', ['$scope', '$routeParams', DummyCtrl]); | ||
// | ||
//function DummyCtrl($scope, $routeParams) { | ||
// | ||
//} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#sp-hide-menu{display:none} | ||
#sp-nav,#sp-nav.wide{width:80%;overflow:hidden;position:absolute;top:0;left:0;height:100%}#sp-nav nav,#sp-nav.wide nav{display:block;background:black;color:white;z-index:5;height:100%}#sp-nav nav div,#sp-nav.wide nav div{z-index:5} | ||
#sp-page{position:absolute;width:100%;height:100%;float:right;z-index:10;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-duration:0.3s;transition-duration:0.3s} | ||
#sp-nav.show,#sp-nav.show.wide{left:0px;overflow-x:hidden} | ||
#sp-nav.show+#sp-page #sp-show-menu,#sp-nav.show.wide+#sp-page #sp-show-menu{display:none} | ||
#sp-nav.show+#sp-page #sp-hide-menu,#sp-nav.show.wide+#sp-page #sp-hide-menu{display:inline} | ||
#sp-nav.show+#sp-page,#sp-nav.show.wide+#sp-page{position:absolute;-webkit-transform:translateX(80%);transform:translateX(80%);-webkit-transition-duration:0.3s;transition-duration:0.3s;overflow-x:hidden;-webkit-overflow-scrolling:touch} | ||
body{overflow-x:hidden} | ||
@media (min-width:900px){#sp-nav{width:20%} #sp-nav.show+#sp-page{-webkit-transform:translateX(20%);transform:translateX(20%)}} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div id="sp-nav"> | ||
<div class="topcoat-list-container"> | ||
<ul class="topcoat-list"> | ||
<li class="topcoat-list__item">Navigation Item 1</li> | ||
<li class="topcoat-list__item">Navigation Item 2</li> | ||
<li class="topcoat-list__item">Navigation Item 3</li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div id="sp-page"> | ||
<div class="topcoat-navigation-bar"> | ||
<div class="topcoat-navigation-bar__item left quarter"> | ||
<a class="topcoat-icon-button--quiet" href="" ng-click="$spMenu.toggle()"> | ||
<span class="topcoat-icon topcoat-icon--menu-stack"></span> | ||
</a> | ||
</div> | ||
<div class="topcoat-navigation-bar__item center half"> | ||
<h1 class="topcoat-navigation-bar__title">ng-mobile-menu Demo</h1> | ||
</div> | ||
<div class="topcoat-navigation-bar__item right quarter"> | ||
<a class="topcoat-icon-button--quiet"> | ||
<span class="topcoat-icon topcoat-icon--edit"></span> | ||
</a> | ||
</div> | ||
</div> | ||
<p>This demo shows the ng-mobile-menu in action. The styling is all provided by Adobe's <a href="http://topcoat.io">Topcoat</a>. | ||
Go to the <a href="#/wide">wide demo</a>. | ||
</p> | ||
</div> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#sp-hide-menu{display:none} | ||
#sp-nav,#sp-nav.wide{width:80%;overflow:hidden;position:absolute;top:0;left:0;height:100%}#sp-nav nav,#sp-nav.wide nav{display:block;background:black;color:white;z-index:5;height:100%}#sp-nav nav div,#sp-nav.wide nav div{z-index:5} | ||
#sp-page{position:absolute;width:100%;height:100%;float:right;z-index:10;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-duration:0.3s;transition-duration:0.3s} | ||
#sp-nav:target,#sp-nav:target.wide{left:0px;overflow-x:hidden} | ||
#sp-nav:target+#sp-page #sp-show-menu,#sp-nav:target.wide+#sp-page #sp-show-menu{display:none} | ||
#sp-nav:target+#sp-page #sp-hide-menu,#sp-nav:target.wide+#sp-page #sp-hide-menu{display:inline} | ||
#sp-nav:target+#sp-page,#sp-nav:target.wide+#sp-page{position:absolute;-webkit-transform:translateX(80%);transform:translateX(80%);-webkit-transition-duration:0.3s;transition-duration:0.3s;overflow-x:hidden;-webkit-overflow-scrolling:touch} | ||
#sp-nav.show,#sp-nav.show.wide{left:0px;overflow-x:hidden} | ||
#sp-nav.show+#sp-page #sp-show-menu,#sp-nav.show.wide+#sp-page #sp-show-menu{display:none} | ||
#sp-nav.show+#sp-page #sp-hide-menu,#sp-nav.show.wide+#sp-page #sp-hide-menu{display:inline} | ||
#sp-nav.show+#sp-page,#sp-nav.show.wide+#sp-page{position:absolute;-webkit-transform:translateX(80%);transform:translateX(80%);-webkit-transition-duration:0.3s;transition-duration:0.3s;overflow-x:hidden;-webkit-overflow-scrolling:touch} | ||
body{overflow-x:hidden} | ||
@media (min-width:900px){#sp-nav{width:20%} #sp-nav:target+#sp-page{-webkit-transform:translateX(20%);transform:translateX(20%)}} | ||
@media (min-width:900px){#sp-nav{width:20%} #sp-nav.show+#sp-page{-webkit-transform:translateX(20%);transform:translateX(20%)}} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.