You are here

we-megamenu-backend.html.twig in Drupal Mega Menu 8

Same filename and directory in other branches
  1. 8.x templates/we-megamenu-backend.html.twig
<div class="we-mega-menu">
  <button class="ico-toolbar ico-toolbar-horizontal" type="button" value="horizontal" title="Horizontal orientation">Horizontal orientation</button>
  <div class="we-mega-menu we-mega-menu-toolbar">
    <div class="we-mega-menu-bar we-mega-menu-config">
      <div class="row">
        <div class="col-md-12">
          <h2>WeMegaMenu Toolbar</h2>
          <p>This toolbar includes all settings of Drupal 8 Mega Menu, just select menu then configure. There are many many level of configuration: submenu setting, column setting and menu item setting.</p>
        </div>
        <div class="col-md-12">
          <div class="form-group">
            <label>Style</label>
            <select class="form-control we-mega-menu-cbx-style">
              <option value="Default">Default</option>
              <option value="Blue">Blue</option>
              <option value="Red">Red</option>
              <option value="Yellow">Yellow</option>
              <option value="Green">Green</option>
              <option value="White">White</option>
            </select>
          </div>

          <div class="form-group">
            <label>Animation</label>
            <select class="form-control we-mega-menu-cbx-animation">
              <option value="None" selected="selected">None</option>
              <option value="Fading">Fading</option>
              <option value="Slide">Slide</option>
              <option value="Zoom">Zoom</option>
              <option value="Elastic">Elastic</option>
            </select>
          </div>

          <div class="form-group we-mega-menu-action" style="display: none;">
            <label>Action</label>
            <select class="form-control we-mega-menu-cbx-action">
              <option value="hover" selected="selected">Hover</option>
              <option value="clicked">Clicked</option>
            </select>
          </div>

          <!-- <div class="form-group we-mega-menu-delay">
            <label>Delay (ms)</label>
            <input type="text" class="form-control we-mega-menu-txt-delay" placeholder="Delay">
          </div>

          <div class="form-group we-mega-menu-duration">
            <label>Duration (ms)</label>
            <input type="text" class="form-control we-mega-menu-txt-duration" placeholder="Duration">
          </div> -->
          <div class="clearfix">
            <div class="form-group form-fix-width">
              <label>Auto arrow</label>
              <label class="switch">
                <input type="checkbox" class="we-mega-menu we-mega-menu-chx-auto-arrow" name="submenu">
                <div class="slider"></div>
              </label>
            </div>

            
            <div class="form-group form-fix-width">
              <label>Show submenu</label>
              <label class="switch">
                <input type="checkbox" class="we-mega-menu we-mega-menu-chx-alway-show-submenu" name="submenu">
                <div class="slider"></div>
              </label>
            </div>

            <div class="form-group form-fix-width">
              <!-- Rectangular switch -->
              <label>Mobile collapse</label>
              <label class="switch">
                <input type="checkbox" class="we-mega-menu we-mega-menu-chx-mobile-collapse" name="mobile-collapse">
                <div class="slider"></div>
              </label>
            </div>
          </div>
          
        </div>
        
      </div>  
    </div>

    <div class="we-mega-menu-bar we-mega-menu-item-config">
      <div class="row">
        <div class="col-md-12">
          <h2>Menu Item Configuration</h2>
          <p>This allows you to configure each link you added in the Drupal core menu. You can: add block, have it styled by adding extra class, set icon (Bootstrap icons) and add description.</p>
        </div>
        <div class="col-md-12">
          <div class="clearfix">
            <div class="form-group form-fix-width submenu-wrapper">
              <!-- Rectangular switch -->
              <label>Submenu</label>
              <label class="switch">
                <input type="checkbox" class="we-mega-menu we-mega-menu-btn-submenu" name="we-mega-menu-btn-submenu">
                <div class="slider"></div>
              </label>
            </div>

            <div class="form-group form-fix-width group-menu-wrapper">
              <!-- Rounded switch -->
              <label>Group</label>
              <label class="switch">
                <input type="checkbox" class="we-mega-menu-chx-group">
                <div class="slider"></div>
              </label>
            </div>

            <div class="form-group form-fix-width">
              <label>Break column</label>
              <div class="align-inner align-break-column">
                <button type="button" class="btn btn-default we-mega-menu-btn-break-col" value="left">&lt;</button>
                <button type="button" class="btn btn-default we-mega-menu-btn-break-col" value="right">&gt;</button>
              </div>
            </div>
          </div>

          <div class="form-group">
            <label>Extra class</label>
            <input type="text" class="form-control we-mega-menu-txt-extra-class" placeholder="Extra class">
          </div>

          <div class="form-group">
            <label>Icon <a class="btn-get-icon" target="_blank" href="http://fontawesome.io/icons">Get icon</a></label>
            <input type="text" class="form-control we-mega-menu-txt-icon" placeholder="Icon">
          </div>

          <div class="form-group">
            <label>Item caption</label>
            <input type="text" class="form-control we-mega-menu-txt-caption" placeholder="Item caption">
          </div>

          <div class="form-group">
            <label>Target</label>
            <select class="form-control we-mega-menu-cbx-target">
              <option value="_self" selected="selected">_self</option>
              <option value="_blank">_blank</option>
              <option value="_parent">_parent</option>
              <option value="_top">_top</option>
            </select>
          </div>
        </div>
        
      </div>  
    </div>



    <div class="we-mega-menu-bar we-mega-menu-submenu-config">
      <div class="row">
        <div class="col-md-12">
          <h2>Submenu Configuration</h2>
          <p>Contains all the level 2+ items. Allows you to: add and remove row, set the submenu’s position, have it styled, edit its width...</p>
        </div>


        <div class="col-md-12">
          <div class="clearfix">
            <div class="form-group form-fix-width">
              <label>Add row</label>
              <button type="button" class="btn btn-default we-mega-menu-btn-add-row">+</button>
            </div>

            <div class="form-group form-fix-width">
              <!-- Rectangular switch -->
              <label>Hide when collapse</label>
              <label class="switch">
                <input type="checkbox" class="we-mega-menu hide-sub-when-collapse" name="hide-sub-when-collapse">
                <div class="slider"></div>
              </label>
            </div>
          </div>

          <div class="form-group btn-group">
            <label>Submenu width (px)</label>
            <input type="text" class="form-control we-mega-menu-txt-sub-menu-width" placeholder="Submenu width (px)">
          </div>

          <div class="form-group btn-group we-mega-menu-align-btn-group">
            <label>Alignment</label>
            <div class="align-inner">
              <button type="button" class="btn btn-default we-mega-menu-btn-align-left" aria-label="Left Align" data-value="left">
                <span class="glyphicon glyphicon-align-left" aria-hidden="true"></span>
              </button>

              <button type="button" class="btn btn-default we-mega-menu-btn-align-center" aria-label="Center Align" data-value="center">
                <span class="glyphicon glyphicon-align-center" aria-hidden="true"></span>
              </button>

              <button type="button" class="btn btn-default we-mega-menu-btn-align-right" aria-label="Right Align" data-value="right">
                <span class="glyphicon glyphicon-align-right" aria-hidden="true"></span>
              </button>

              <button type="button" class="btn btn-default we-mega-menu-btn-align-justify" aria-label="Justify" data-value="justify">
                <span class="glyphicon glyphicon-align-justify" aria-hidden="true"></span>
              </button>
            </div>
          </div>

          <div class="form-group">
            <label>Extra class</label>
            <input type="text" class="form-control we-mega-menu-txt-extra-class" placeholder="Extra class">
          </div>
        </div>
        
      </div>  
    </div>







    <div class="we-mega-menu-bar we-mega-menu-column-config">
      <div class="row">
        <div class="col-md-12">
          <h2>Column Configuration</h2>
          <p>Allows you to: add and remove column, set grid, add block to column and style the column with extra class</p>
        </div>

        <div class="col-md-12">
          <div class="clearfix">
            <div class="form-group form-fix-width">
              <label>Add/remove Column</label>
              <div class="group-actions-btn">
                <button type="button" class="btn btn-default we-mega-menu-btn-remove-col we-mega-menu-btn-add-row">-</button>
                <button type="button" class="btn btn-default we-mega-menu-btn-add-col we-mega-menu-btn-add-row">+</button>
              </div>
            </div>

            <div class="form-group form-fix-width">
              <!-- Rectangular switch -->
              <label>Hide when collapse</label>
              <label class="switch">
                <input type="checkbox" class="we-mega-menu we-mega-menu-btn-hide-when-collapse" name="we-mega-menu-btn-hide-when-collapse">
                <div class="slider"></div>
              </label>
            </div>
            <div class="form-group form-fix-width">
              <!-- Rectangular switch -->
              <label>Show block title</label>
              <label class="switch">
                <input type="checkbox" class="we-mega-menu btn-show-block-title" name="btn-show-block-title" checked="">
                <div class="slider"></div>
              </label>
            </div>
          </div>

          <div class="form-group">
            <label>Grid (1-12)</label>
            <select class="form-control we-mega-menu cbx-we-mega-menu-col-width">
              {% for i in 1..12 %}
                <option value="{{ i }}">{{ i }}</option>
              {% endfor %}
            </select>
          </div>

          <div class="form-group">
            <label>Blocks</label>
            <select class="form-control cbx-select-block">
              <option value="">Select Blocks</option>
              {% for bid, block_name in blocks %}
                <option value="{{ bid }}"> {{ block_name }} </option>
              {% endfor %}
            </select>
          </div>

          

          <div class="form-group">
            <label>Extra class</label>
            <input type="text" class="form-control we-mega-menu-txt-extra-class" placeholder="Extra class">
          </div>
        </div>
        
      </div>  
    </div>









    <div class="we-mega-menu-bar we-mega-menu-actions">
      <div class="row">
        <div class="col-md-12">
          <button class="btn btn-success btn-save" type="submit">Save</button>
          <button class="btn btn-danger btn-reset" type="submit">Reset</button>
          <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#resetToDefault">
            Reset To Default
          </button>
        </div>
      </div>
    </div>

    <!-- Modal reset to default -->
    <div class="modal fade" id="resetToDefault" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">Warning</h4>
          </div>
          <div class="modal-body">
            Are you sure reset menu to default ?
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-danger btn-reset-to-default">Reset To Default</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
        </div>
      </div>
    </div>

  </div>
</div>

<nav {{ attributes }}>
  <div class="container-fluid">
    {{ content }}
  </div>
</nav>

File

templates/we-megamenu-backend.html.twig
View source
  1. <div class="we-mega-menu">
  2. <button class="ico-toolbar ico-toolbar-horizontal" type="button" value="horizontal" title="Horizontal orientation">Horizontal orientation</button>
  3. <div class="we-mega-menu we-mega-menu-toolbar">
  4. <div class="we-mega-menu-bar we-mega-menu-config">
  5. <div class="row">
  6. <div class="col-md-12">
  7. <h2>WeMegaMenu Toolbar</h2>
  8. <p>This toolbar includes all settings of Drupal 8 Mega Menu, just select menu then configure. There are many many level of configuration: submenu setting, column setting and menu item setting.</p>
  9. </div>
  10. <div class="col-md-12">
  11. <div class="form-group">
  12. <label>Style</label>
  13. <select class="form-control we-mega-menu-cbx-style">
  14. <option value="Default">Default</option>
  15. <option value="Blue">Blue</option>
  16. <option value="Red">Red</option>
  17. <option value="Yellow">Yellow</option>
  18. <option value="Green">Green</option>
  19. <option value="White">White</option>
  20. </select>
  21. </div>
  22. <div class="form-group">
  23. <label>Animation</label>
  24. <select class="form-control we-mega-menu-cbx-animation">
  25. <option value="None" selected="selected">None</option>
  26. <option value="Fading">Fading</option>
  27. <option value="Slide">Slide</option>
  28. <option value="Zoom">Zoom</option>
  29. <option value="Elastic">Elastic</option>
  30. </select>
  31. </div>
  32. <div class="form-group we-mega-menu-action" style="display: none;">
  33. <label>Action</label>
  34. <select class="form-control we-mega-menu-cbx-action">
  35. <option value="hover" selected="selected">Hover</option>
  36. <option value="clicked">Clicked</option>
  37. </select>
  38. </div>
  39. <!-- <div class="form-group we-mega-menu-delay">
  40. <label>Delay (ms)</label>
  41. <input type="text" class="form-control we-mega-menu-txt-delay" placeholder="Delay">
  42. </div>
  43. <div class="form-group we-mega-menu-duration">
  44. <label>Duration (ms)</label>
  45. <input type="text" class="form-control we-mega-menu-txt-duration" placeholder="Duration">
  46. </div> -->
  47. <div class="clearfix">
  48. <div class="form-group form-fix-width">
  49. <label>Auto arrow</label>
  50. <label class="switch">
  51. <input type="checkbox" class="we-mega-menu we-mega-menu-chx-auto-arrow" name="submenu">
  52. <div class="slider"></div>
  53. </label>
  54. </div>
  55. <div class="form-group form-fix-width">
  56. <label>Show submenu</label>
  57. <label class="switch">
  58. <input type="checkbox" class="we-mega-menu we-mega-menu-chx-alway-show-submenu" name="submenu">
  59. <div class="slider"></div>
  60. </label>
  61. </div>
  62. <div class="form-group form-fix-width">
  63. <!-- Rectangular switch -->
  64. <label>Mobile collapse</label>
  65. <label class="switch">
  66. <input type="checkbox" class="we-mega-menu we-mega-menu-chx-mobile-collapse" name="mobile-collapse">
  67. <div class="slider"></div>
  68. </label>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="we-mega-menu-bar we-mega-menu-item-config">
  75. <div class="row">
  76. <div class="col-md-12">
  77. <h2>Menu Item Configuration</h2>
  78. <p>This allows you to configure each link you added in the Drupal core menu. You can: add block, have it styled by adding extra class, set icon (Bootstrap icons) and add description.</p>
  79. </div>
  80. <div class="col-md-12">
  81. <div class="clearfix">
  82. <div class="form-group form-fix-width submenu-wrapper">
  83. <!-- Rectangular switch -->
  84. <label>Submenu</label>
  85. <label class="switch">
  86. <input type="checkbox" class="we-mega-menu we-mega-menu-btn-submenu" name="we-mega-menu-btn-submenu">
  87. <div class="slider"></div>
  88. </label>
  89. </div>
  90. <div class="form-group form-fix-width group-menu-wrapper">
  91. <!-- Rounded switch -->
  92. <label>Group</label>
  93. <label class="switch">
  94. <input type="checkbox" class="we-mega-menu-chx-group">
  95. <div class="slider"></div>
  96. </label>
  97. </div>
  98. <div class="form-group form-fix-width">
  99. <label>Break column</label>
  100. <div class="align-inner align-break-column">
  101. <button type="button" class="btn btn-default we-mega-menu-btn-break-col" value="left">&lt;</button>
  102. <button type="button" class="btn btn-default we-mega-menu-btn-break-col" value="right">&gt;</button>
  103. </div>
  104. </div>
  105. </div>
  106. <div class="form-group">
  107. <label>Extra class</label>
  108. <input type="text" class="form-control we-mega-menu-txt-extra-class" placeholder="Extra class">
  109. </div>
  110. <div class="form-group">
  111. <label>Icon <a class="btn-get-icon" target="_blank" href="http://fontawesome.io/icons">Get icon</a></label>
  112. <input type="text" class="form-control we-mega-menu-txt-icon" placeholder="Icon">
  113. </div>
  114. <div class="form-group">
  115. <label>Item caption</label>
  116. <input type="text" class="form-control we-mega-menu-txt-caption" placeholder="Item caption">
  117. </div>
  118. <div class="form-group">
  119. <label>Target</label>
  120. <select class="form-control we-mega-menu-cbx-target">
  121. <option value="_self" selected="selected">_self</option>
  122. <option value="_blank">_blank</option>
  123. <option value="_parent">_parent</option>
  124. <option value="_top">_top</option>
  125. </select>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. <div class="we-mega-menu-bar we-mega-menu-submenu-config">
  131. <div class="row">
  132. <div class="col-md-12">
  133. <h2>Submenu Configuration</h2>
  134. <p>Contains all the level 2+ items. Allows you to: add and remove row, set the submenu’s position, have it styled, edit its width...</p>
  135. </div>
  136. <div class="col-md-12">
  137. <div class="clearfix">
  138. <div class="form-group form-fix-width">
  139. <label>Add row</label>
  140. <button type="button" class="btn btn-default we-mega-menu-btn-add-row">+</button>
  141. </div>
  142. <div class="form-group form-fix-width">
  143. <!-- Rectangular switch -->
  144. <label>Hide when collapse</label>
  145. <label class="switch">
  146. <input type="checkbox" class="we-mega-menu hide-sub-when-collapse" name="hide-sub-when-collapse">
  147. <div class="slider"></div>
  148. </label>
  149. </div>
  150. </div>
  151. <div class="form-group btn-group">
  152. <label>Submenu width (px)</label>
  153. <input type="text" class="form-control we-mega-menu-txt-sub-menu-width" placeholder="Submenu width (px)">
  154. </div>
  155. <div class="form-group btn-group we-mega-menu-align-btn-group">
  156. <label>Alignment</label>
  157. <div class="align-inner">
  158. <button type="button" class="btn btn-default we-mega-menu-btn-align-left" aria-label="Left Align" data-value="left">
  159. <span class="glyphicon glyphicon-align-left" aria-hidden="true"></span>
  160. </button>
  161. <button type="button" class="btn btn-default we-mega-menu-btn-align-center" aria-label="Center Align" data-value="center">
  162. <span class="glyphicon glyphicon-align-center" aria-hidden="true"></span>
  163. </button>
  164. <button type="button" class="btn btn-default we-mega-menu-btn-align-right" aria-label="Right Align" data-value="right">
  165. <span class="glyphicon glyphicon-align-right" aria-hidden="true"></span>
  166. </button>
  167. <button type="button" class="btn btn-default we-mega-menu-btn-align-justify" aria-label="Justify" data-value="justify">
  168. <span class="glyphicon glyphicon-align-justify" aria-hidden="true"></span>
  169. </button>
  170. </div>
  171. </div>
  172. <div class="form-group">
  173. <label>Extra class</label>
  174. <input type="text" class="form-control we-mega-menu-txt-extra-class" placeholder="Extra class">
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. <div class="we-mega-menu-bar we-mega-menu-column-config">
  180. <div class="row">
  181. <div class="col-md-12">
  182. <h2>Column Configuration</h2>
  183. <p>Allows you to: add and remove column, set grid, add block to column and style the column with extra class</p>
  184. </div>
  185. <div class="col-md-12">
  186. <div class="clearfix">
  187. <div class="form-group form-fix-width">
  188. <label>Add/remove Column</label>
  189. <div class="group-actions-btn">
  190. <button type="button" class="btn btn-default we-mega-menu-btn-remove-col we-mega-menu-btn-add-row">-</button>
  191. <button type="button" class="btn btn-default we-mega-menu-btn-add-col we-mega-menu-btn-add-row">+</button>
  192. </div>
  193. </div>
  194. <div class="form-group form-fix-width">
  195. <!-- Rectangular switch -->
  196. <label>Hide when collapse</label>
  197. <label class="switch">
  198. <input type="checkbox" class="we-mega-menu we-mega-menu-btn-hide-when-collapse" name="we-mega-menu-btn-hide-when-collapse">
  199. <div class="slider"></div>
  200. </label>
  201. </div>
  202. <div class="form-group form-fix-width">
  203. <!-- Rectangular switch -->
  204. <label>Show block title</label>
  205. <label class="switch">
  206. <input type="checkbox" class="we-mega-menu btn-show-block-title" name="btn-show-block-title" checked="">
  207. <div class="slider"></div>
  208. </label>
  209. </div>
  210. </div>
  211. <div class="form-group">
  212. <label>Grid (1-12)</label>
  213. <select class="form-control we-mega-menu cbx-we-mega-menu-col-width">
  214. {% for i in 1..12 %}
  215. <option value="{{ i }}">{{ i }}</option>
  216. {% endfor %}
  217. </select>
  218. </div>
  219. <div class="form-group">
  220. <label>Blocks</label>
  221. <select class="form-control cbx-select-block">
  222. <option value="">Select Blocks</option>
  223. {% for bid, block_name in blocks %}
  224. <option value="{{ bid }}"> {{ block_name }} </option>
  225. {% endfor %}
  226. </select>
  227. </div>
  228. <div class="form-group">
  229. <label>Extra class</label>
  230. <input type="text" class="form-control we-mega-menu-txt-extra-class" placeholder="Extra class">
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. <div class="we-mega-menu-bar we-mega-menu-actions">
  236. <div class="row">
  237. <div class="col-md-12">
  238. <button class="btn btn-success btn-save" type="submit">Save</button>
  239. <button class="btn btn-danger btn-reset" type="submit">Reset</button>
  240. <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#resetToDefault">
  241. Reset To Default
  242. </button>
  243. </div>
  244. </div>
  245. </div>
  246. <!-- Modal reset to default -->
  247. <div class="modal fade" id="resetToDefault" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  248. <div class="modal-dialog" role="document">
  249. <div class="modal-content">
  250. <div class="modal-header">
  251. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  252. <h4 class="modal-title" id="myModalLabel">Warning</h4>
  253. </div>
  254. <div class="modal-body">
  255. Are you sure reset menu to default ?
  256. </div>
  257. <div class="modal-footer">
  258. <button type="button" class="btn btn-danger btn-reset-to-default">Reset To Default</button>
  259. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  260. </div>
  261. </div>
  262. </div>
  263. </div>
  264. </div>
  265. </div>
  266. <nav {{ attributes }}>
  267. <div class="container-fluid">
  268. {{ content }}
  269. </div>
  270. </nav>