app-root.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <div class="app-root" ng-controller="AppRootController" ng-class="isOpenMenu?'open-menu' : 'close-menu'" ng-init="load()">
  2. <div class="header-line">
  3. <!-- Fixed elements -->
  4. <nav-menu toggle-menu="toggleMenu()" ng-class="isOpenMenu?'open-menu' : 'close-menu'"></nav-menu>
  5. <div ng-click="toggleMenu()" class="overlay" ng-class="{'overlay-active': isOpenMenu}"></div>
  6. <div class="overlay2"></div>
  7. <selected-meals meals="meals"></selected-meals>
  8. <div class="preload-screen">
  9. <img src="content\images\preloader\Double Ring-1s-200px.gif">
  10. </div>
  11. <div class="selected-meals-btn" ng-click="openSelectedMeals()" ng-show="isShowMealsBtn()">
  12. <span>{{selectedNumber}}</span>
  13. <span class="selected-meals-tip">BAG</span>
  14. </div>
  15. <a ng-click="goToShoppingCart()" class="shopping-cart-icon">
  16. <span class="fa fa-shopping-cart"></span>
  17. </a>
  18. <div ng-if="!isUserSigned" class="login-btn" ng-click="openPopup()">
  19. <span class="fa fa-sign-in"></span>
  20. Login
  21. </div>
  22. <div ng-if="isUserSigned" class="sign-out-btn" ng-click="signOut()">
  23. <span class="fa fa-sign-in"></span>
  24. Sign out
  25. </div>
  26. <div class="login-popup">
  27. <div class="cancel" ng-click="cancelPopup()">
  28. <span class="fa fa-times"></span>
  29. </div>
  30. <div class="login-popup-wrapper">
  31. <div class="btns">
  32. <button type="button" ng-class="{'btn-active': isLoginActive}" ng-click="isLoginActive = true">login</button>
  33. <button type="button" ng-class="{'btn-active': !isLoginActive}" ng-click="isLoginActive = false">register</button>
  34. </div>
  35. <div class="content">
  36. <div class="login" ng-if="isLoginActive">
  37. <form ng-submit="signInUser()" novalidate name="loginForm">
  38. <input type="email" placeholder="Email" ng-model="signInUserObj.email" ng-required="true" name="email">
  39. <span ng-if="loginForm.email.$invalid && loginForm.email.$touched">Enter a valid email</span>
  40. <input type="password" placeholder="Password" ng-model="signInUserObj.password" ng-required="true" name="password">
  41. <input type="submit" value="login">
  42. </form>
  43. </div>
  44. <div class="register" ng-if="!isLoginActive">
  45. <form ng-submit="createNewUser()" novalidate name="registerForm">
  46. <input type="email" placeholder="Email" ng-model="newUserObj.email" ng-required="true" name="email">
  47. <span ng-if="registerForm.email.$invalid && registerForm.email.$touched">Enter a valid email</span>
  48. <input ng-change="onPasswordInput()" ng-class="{'invalid': passwordErrorMessage && isShortPassword}" type="password" placeholder="Create a password" ng-model="newUserObj.password" name="password" ng-required="true">
  49. <span ng-if="passwordErrorMessage && isShortPassword">{{passwordErrorMessage}}</span>
  50. <!-- <input type="password" placeholder="Confirm your password">
  51. <input type="text" placeholder="Your phone number"> -->
  52. <input type="submit" value="register">
  53. </form>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. <!-- Fixed elements -->
  59. <i class="fa fa-bars" ng-click="toggleMenu()"></i>
  60. <div class="logo">
  61. Master Kitchen
  62. </div>
  63. <div class="undefined-btn"></div>
  64. </div>
  65. <main ng-view></main>
  66. </div>