app-root.html 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. <input type="submit" value="login">
  47. </form>
  48. </div>
  49. <div class="register" ng-if="!isLoginActive">
  50. <form ng-submit="createNewUser()" novalidate name="registerForm">
  51. <input autocomplete="off" type="email" placeholder="Email" ng-model="newUserObj.email" ng-required="true" name="email">
  52. <span ng-if="registerForm.email.$invalid && registerForm.email.$touched">Enter a valid email</span>
  53. <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">
  54. <span ng-if="registerForm.password.$touched && isShortPassword">Password should be at least 6 characters</span>
  55. <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">
  56. <span ng-if="confirmPasswordIncorrect && registerForm.confirmPassword.$touched">The passwords don't match, please try again</span>
  57. <input type="text" placeholder="Your phone number" ng-required="true" ng-model="newUserDataObj.phoneNumber" name="phoneNumber">
  58. <input type="submit" value="register">
  59. </form>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div ng-if="isShowDeleteItemModeToggle()" ng-click="deleteItemModeToggle()" class="delete-item-mode-btn">
  65. Delete mode
  66. </div>
  67. <!-- Fixed elements -->
  68. <i class="fa fa-bars" ng-click="toggleMenu()"></i>
  69. <div class="logo">
  70. Master Kitchen
  71. </div>
  72. <div class="undefined-btn"></div>
  73. </div>
  74. <main ng-view></main>
  75. <scroll-top></scroll-top>
  76. </div>