app-root.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 ng-if="isUserSigned" 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. <a ng-if="isUserSigned && !isModeratorSigned" href="#!/user-page" class="user-page-icon">
  27. <span class="fa fa-user"></span>
  28. </a>
  29. <div class="login-popup">
  30. <div class="cancel" ng-click="cancelPopup()">
  31. <span class="fa fa-times"></span>
  32. </div>
  33. <div class="popup-cansel-wrapper" ng-click="cancelPopup()">
  34. </div>
  35. <div class="login-popup-wrapper">
  36. <div class="btns">
  37. <button type="button" ng-class="{'btn-active': isLoginActive}" ng-click="isLoginActive = true">login</button>
  38. <button type="button" ng-class="{'btn-active': !isLoginActive}" ng-click="isLoginActive = false">register</button>
  39. </div>
  40. <div class="content">
  41. <div class="login" ng-if="isLoginActive">
  42. <form ng-submit="signInUser()" novalidate name="loginForm">
  43. <input type="email" placeholder="Email" ng-model="signInUserObj.email" ng-required="true" name="email">
  44. <span ng-if="loginForm.email.$invalid && loginForm.email.$touched">Enter a valid email</span>
  45. <input type="password" placeholder="Password" ng-model="signInUserObj.password" ng-required="true" name="password">
  46. <span>{{signInUserError}}</span>
  47. <input type="submit" value="login">
  48. </form>
  49. </div>
  50. <div class="register" ng-if="!isLoginActive">
  51. <form ng-submit="createNewUser()" novalidate name="registerForm">
  52. <input autocomplete="off" type="email" placeholder="Email" ng-model="newUserObj.email" ng-required="true" name="email">
  53. <span ng-if="registerForm.email.$invalid && registerForm.email.$touched">Enter a valid email</span>
  54. <input ng-class="{'input-invalid': registerForm.password.$touched && isShortPassword}" ng-change="onPasswordInput()" type="password" placeholder="Create a password" ng-model="newUserObj.password" name="password" ng-required="true">
  55. <span ng-if="registerForm.password.$touched && isShortPassword">Password should be at least 6 characters</span>
  56. <input ng-change="onConfirmPasswordInput()" ng-class="{'input-invalid': confirmPasswordIncorrect && registerForm.confirmPassword.$touched}" type="password" placeholder="Confirm your password" ng-required="true" ng-model="registerObject.confirmPassword" name="confirmPassword">
  57. <span ng-if="confirmPasswordIncorrect && registerForm.confirmPassword.$touched">The passwords don't match, please try again</span>
  58. <input type="text" placeholder="Your phone number" ng-required="true" ng-model="newUserDataObj.phoneNumber" name="phoneNumber">
  59. <input type="submit" value="register">
  60. </form>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <div ng-if="isShowDeleteItemModeToggle()" ng-click="deleteItemModeToggle()" class="delete-item-mode-btn">
  66. Delete mode
  67. </div>
  68. <!-- Fixed elements -->
  69. <i class="fa fa-bars" ng-click="toggleMenu()"></i>
  70. <div class="logo">
  71. Master Kitchen
  72. </div>
  73. <div class="undefined-btn"></div>
  74. </div>
  75. <main ng-view></main>
  76. <scroll-top></scroll-top>
  77. </div>