templates/partials/_nav.html.twig line 1

Open in your IDE?
  1. {% set nav_path = app.request.pathInfo %}
  2. {% set white_nav = (nav_path == "/login" or nav_path == "/register" or nav_path == "/activation_link") %}
  3. <!--Start Header -->
  4. <header class="nav-bg-w main-header navfix fixed-top menu-white" style="{% if white_nav %}background-color: white;{% endif %}" data-controller="nav">
  5. <div class="container-fluid m-pad">
  6. <div class="menu-header">
  7. <div class="dsk-logo"><a class="nav-brand" href="{{ path('home') }}">
  8. <img src="{{ asset('build/images/logo01.png') }}" alt="Logo" class="mega-darks-logo"/>
  9. </a></div>
  10. <div class="custom-nav" role="navigation">
  11. <ul class="nav-list onepge">
  12. <li><a href="{{ path('home') }}" class="menu-links">Home</a></li>
  13. <li>
  14. <a href="{{ path('about') }}" class="menu-links">About</a>
  15. </li>
  16. <li><a href="{{ path('blog') }}" class="menu-links">Blog</a></li>
  17. <li>
  18. <a href="{{ path('contact') }}" class="menu-links">Contact Us</a>
  19. </li>
  20. <li>
  21. <a href="tel:+18887816811" class="btn-br bg-btn3 top-banner phone">Let's Talk 1(888)781-6811</a>
  22. </li>
  23. {% if app.user %}
  24. <li class="dropdown">
  25. <a class="btn-br bg-btn6 dropdown-toggle" type="button" id="dropdownMenuButton1"
  26. data-bs-toggle="dropdown" aria-expanded="true">
  27. {{ app.user.email }}
  28. </a>
  29. {% if "ROLE_ADMIN" in app.user.roles %}
  30. <div class="nx-dropdown menu-dorpdown" style="top: 48px;">
  31. <div class="sub-menu-section bg-light border rounded"
  32. style="padding: 20px 0 20px 0">
  33. <div class="sub-menu-center-block">
  34. <div class="sub-menu-column smfull">
  35. <ul>
  36. <li><a href="{{ path('admin_dashboard') }}">Dashboard</a></li>
  37. <li><a href="{{ path('app_logout') }}">Logout</a></li>
  38. </ul>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. {% else %}
  44. <div class="nx-dropdown menu-dorpdown" style="top: 48px;">
  45. <div class="sub-menu-section bg-light border rounded"
  46. style="padding: 20px 0 20px 0">
  47. <div class="sub-menu-center-block">
  48. <div class="sub-menu-column smfull">
  49. <ul>
  50. <li><a href="{{ path('app_user_order') }}">My Orders</a></li>
  51. <li><a href="{{ path('user_settings') }}">Settings</a></li>
  52. <li><a href="{{ path('app_user_payment') }}">Billing</a></li>
  53. <li><a href="{{ path('app_logout') }}">Logout</a></li>
  54. </ul>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. {% endif %}
  60. </li>
  61. {% else %}
  62. <li>
  63. <a href="{{ path('app_login') }}" class="btn-br bg-btn5">Login</a>
  64. </li>
  65. <li>
  66. <a href="{{ path('app_register') }}" class="btn-br bg-btn6">Register</a>
  67. </li>
  68. {% endif %}
  69. <li>
  70. <a href="{{ path('cart') }}" class="btn-round- btn-br bg-btn">
  71. <i class="fas fa-shopping-cart"></i>
  72. {% if cart().orderItems.toArray|length != 0 %}
  73. {% if cart().orderItems.unwrap|length != 0 %}
  74. <span class="addtocart">
  75. {{ cart().orderItems.unwrap|length }}
  76. </span>
  77. {% endif %}
  78. {% endif %}
  79. </a>
  80. </li>
  81. </ul>
  82. </div>
  83. <div class="mobile-menu2">
  84. <ul class="mob-nav2">
  85. <Li>
  86. <a href="tel:+18887816811" class="btn-br bg-btn top-banner phone">Let's Talk 1(888)781-6811</a>
  87. </Li>
  88. <li class="align-self-center">
  89. <a href="{{ path('cart') }}" class="btn-round- btn-br bg-btn">
  90. <i class="fas fa-shopping-cart"></i>
  91. {% if cart().orderItems.toArray|length != 0 %}
  92. {% if cart().orderItems.unwrap|length != 0 %}
  93. <span class="addtocart">
  94. {{ cart().orderItems.unwrap|length }}
  95. </span>
  96. {% endif %}
  97. {% endif %}
  98. </a>
  99. {# <a class="btn-round- trngl btn-br bg-btn btshad-b1">#}
  100. {# <i class="fas fa-user"></i>#}
  101. {# </a>#}
  102. {# <div class="contact-inquiry">#}
  103. {# <div class="contact-info-">#}
  104. {# <div class="contct-heading">Account</div>#}
  105. {# <div class="inquiry-card-nn">#}
  106. {# <div class="title-inq-c">Already a user ?</div>#}
  107. {# <ul>#}
  108. {# <li class="mb0 w-100">#}
  109. {# <a href="{{ path('app_login') }}" class="btn-br bg-btn5 w-100 py-2">Login</a>#}
  110. {# </li>#}
  111. {# </ul>#}
  112. {# </div>#}
  113. {# <div class="inquiry-card-nn">#}
  114. {# <div class="title-inq-c">Register here</div>#}
  115. {# <ul>#}
  116. {# <li class="mb0">#}
  117. {# <a href="{{ path('app_register') }}" class="btn-br bg-btn6 w-100 py-2">Register</a>#}
  118. {# </li>#}
  119. {# </ul>#}
  120. {# </div>#}
  121. {# </div>#}
  122. {# </div>#}
  123. </li>
  124. <li class="navm-" style="height: 85px; width: 40px;">
  125. <a class="toggle" href="#">
  126. <span></span>
  127. </a>
  128. </li>
  129. </ul>
  130. </div>
  131. </div>
  132. <!--Mobile Menu-->
  133. <nav id="main-nav">
  134. <ul class="first-nav">
  135. <li><a href="{{ path('app_login') }}" class="menu-links">Login</a></li>
  136. <li><a href="{{ path('app_register') }}" class="menu-links">Register</a></li>
  137. <li><a href="{{ path('home') }}" class="menu-links">Home</a></li>
  138. <li><a href="{{ path('about') }}" class="menu-links">About</a></li>
  139. <li><a href="{{ path('blog') }}" class="menu-links">Blog</a></li>
  140. <li><a href="{{ path('contact') }}" class="menu-links">Contact Us</a></li>
  141. </ul>
  142. </nav>
  143. </div>
  144. </header>
  145. <!--end Header -->