sidebar.html 35.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181
<section>
	<h1 class="blue" data-id="#basics/sidebar"><i class="ace-icon fa fa-desktop grey"></i> Sidebar</h1>

	<div class="hr hr-double hr32"></div>
	
	<!-- #section:basics/sidebar -->
	<h2 class="blue lighter help-title" data-id="#basics/sidebar.layout">
		Sidebar Basics
	</h2>
	<div class="space-4"></div>

	<!-- #section:basics/sidebar.layout -->
	<div class="help-content">
		<h3 class="info-title smaller">1. Layout</h3>
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				Default HTML layout used for sidebar is:
				<div>
				 <span class="thumbnail inline">
					<img src="images/sidebar.png" />
				 </span>
				</div>
				<ol>
					<li>
						<b>shortcut buttons</b>: optional
					</li>
					<li>
						<b>.nav-list</b>: contains sidebar items
					</li>
					<li>
						<b>expand/collapse button</b>: optional
					</li>
				</ol>
				
				<div class="space-4"></div>
<pre data-language="html">
<div class="sidebar responsive" id="sidebar">
 <div class="sidebar-shortcuts" id="sidebar-shortcuts">
   ...
 </div>
 
 <ul class="nav nav-list">
   ...
 </ul>
 
 <div class="sidebar-toggle sidebar-collapse">
   ...
 </div>
</div><!-- /.sidebar -->
</pre>
				Please note that for most Javascript functions to perform without problem,
				you should specify <b>id</b> attribute of elements, for example, sidebar element can have
				<code>#sidebar</code> id attribute.
			</li>

			<li>
				Starting with the following file you can find more details:
				<br />
				<code data-open-file="html" class="open-file"><span class="brief-show">mustache/app/views/layouts/partials/_shared/</span>sidebar.mustache</code>
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->


		<h3 class="info-title smaller" data-id="#basics/sidebar.layout.item">2. Menu item</h3>
		<!-- #section:basics/sidebar.layout.item -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				First level menu item has the following markup:
				<pre data-language="html">
<li>
  <a href="#">
    <i class="menu-icon fa fa-leaf"></i>
    <span class="menu-text">
      Item text
    </span>
    <b class="arrow fa fa-angle-down"></b>
    <!-- arrow down icon if there's a submenu -->
  </a>
 
  <b class="arrow"></b>
  <!-- optional arrow for minimized menu & hover submenu -->

  <ul class="submenu">
   ....
  </ul>
</li>
				</pre>

				<code data-open-file="html" class="open-file"><span class="brief-show">mustache/app/views/layouts/partials/_shared/sidebar/</span>item.mustache</code>
			</li>
			
			<li>
				Icons should have <code>.menu-icon</code> class.
				<br />
				First level menu item's text should be inside <code>.menu-text</code> element,
				but this isn't needed for deeper levels:
				<pre data-language="html">
<!-- first level item -->
<li>
  <a href="#">
    <i class="menu-icon fa fa-caret-right"></i>
    <span class="menu-text">level 2 item text</span>
    <b class="arrow fa fa-angle-down"></b>
  </a>
</li>

<!-- second level item -->
<li>
  <a href="#">
    <i class="menu-icon fa fa-caret-right"></i>
    level 2 item text
    <b class="arrow fa fa-angle-down"></b>
  </a>
</li>
				</pre>
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		<!-- /section:basics/sidebar.layout.item -->
		
		
		<h3 class="info-title smaller" data-id="#basics/sidebar.layout.shortcuts">3. Shortcut Buttons</h3>
		<!-- #section:basics/sidebar.layout.shortcuts -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				It consists of <code>.sidebar-shortcuts-large</code> and
				<code>.sidebar-shortcuts-mini</code> which is displayed when sidebar is minimized (collapsed)
			</li>
			<li>
<pre data-language="html">
<div class="sidebar-shortcuts" id="sidebar-shortcuts">

  <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
    <button class="btn btn-success"><i class="ace-icon fa fa-signal"></i></button>
    <button class="btn btn-info"><i class="ace-icon fa fa-pencil"></i></button>
    <button class="btn btn-warning"><i class="ace-icon fa fa-users"></i></button>
    <button class="btn btn-danger"><i class="ace-icon fa fa-cogs"></i></button>
  </div>

  <div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
    <span class="btn btn-success"></span>
    <span class="btn btn-info"></span>
    <span class="btn btn-warning"></span>
    <span class="btn btn-danger"></span>
  </div>

</div>
</pre>
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		<!-- /section:basics/sidebar.layout.shortcuts -->
		
		
		<h3 class="info-title smaller" data-id="#basics/sidebar.layout.minimize">4. Minimize Button</h3>
		<!-- #section:basics/sidebar.layout.minimize -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				Sidebar collapse/expand button is used to minimize/restore sidebar.
				<br />
				<div class="alert alert-info">
					It should have a <code>data-target</code> attribute which points to sidebar ID.
				</div>
<pre data-language="html">
  <div class="sidebar responsive" id="sidebar">
  .
  .
  .
  <div data-target="#sidebar" id="sidebar-collapse" class="sidebar-toggle sidebar-collapse">
     <i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
  </div>
 </div><!-- /.sidebar -->
</pre>
			</li>
			
			<li>
				There is also another <code>.sidebar-expand</code> button for sidebar in <a href="#basics/sidebar.mobile.style2" class="help-more">2nd mobile view style</a>.
				<br />
				In that case, sidebar is automatically minimized and the button is used to expand it.
				<br />
				Also it should have a <code>data-target</code> attribute which points to sidebar ID.
<pre data-language="html">
 <div class="sidebar responsive-min" id="sidebar">
   .
   .
   .
   <div data-target="#sidebar" id="sidebar-expand" class="sidebar-toggle sidebar-expand">
     <i class="ace-icon fa fa-angle-double-right" data-icon1="ace-icon fa fa-angle-double-right" data-icon2="ace-icon fa fa-angle-double-left"></i>
   </div>
 </div><!-- /.sidebar -->
</pre>
			</li>
		
			<li>
				You can use <code>data-icon1</code>
				and <code>data-icon2</code> attributes to specify icons to use in collapsed/expanded state
			</li>
			
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		<!-- /section:basics/sidebar.layout.minimize -->

		
		<h3 class="info-title smaller" data-id="#basics/sidebar.layout.badge">5. Other notes</h3>
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				<!-- #section:basics/sidebar.layout.badge -->
				To add a badge or label inside menu items, you should put it inside <code>.menu-text</code> element:
<pre data-language="html">
 <span class="menu-text">
   Menu Text
   <span class="badge badge-info">4</span>
 </span>
</pre>

You can also include a tooltip:
<pre data-language="html">
 <span class="menu-text">
   Menu Text
   <span class="label label-transparent tooltip-error" title="some title for tooltip!">
     <i class="red ace-icon fa fa-exclamation-triangle"></i>
   </span>
 </span>
</pre>
				<!-- /section:basics/sidebar.layout.badge -->
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		
		
		<h3 class="info-title smaller">6. Sidebar options</h3>
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				See <a href="#basics/sidebar.options" class="help-more">sidebar options section</a> for more info.
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		
	</div><!-- /.help-content -->
	<!-- /section:basics/sidebar.layout -->

	
	
	
	
	<div class="hr hr-double hr32"></div>
	<h2 class="blue lighter help-title" data-id="#basics/sidebar.functions">
		Sidebar functions
	</h2>
	<div class="space-4"></div>

	<!-- #section:basics/sidebar.functions -->
	<div class="help-content">
		<h3 class="info-title smaller">Basic functions</h3>
		<div class="info-section">
			<ul class="info-list list-unstyled">
				<li>
					To enable sidebar functions on an element you should use the following piece of code:
<pre data-language="javascript">
 $('.sidebar').ace_sidebar();
 //or
 $('#my-specific-sidebar').ace_sidebar();
</pre>
				</li>

				<li>
				By default all <code>.sidebar</code> elements are initiliazed on page load.
				</li>
				
				<li>
				The following functions are available for sidebar:
					<ul>
						<li><b>toggleMenu:</b> collapses or expands sidebar.
<pre data-language="javascript">
 $('.sidebar').ace_sidebar('toggleMenu');
 $('.sidebar').ace_sidebar('toggleMenu', toggleButton);
 //if there is an optional toggleButton element, its icons will be flipped

 $('.sidebar').ace_sidebar('toggleMenu', false);
 //optional false value means don't save changes to cookies

 $('.sidebar').ace_sidebar('toggleMenu', [toggleButton , false/true ]);
 //optional second value means save or don't save changes to cookies
</pre>
						</li>
						
						<li>
							<b>collapse</b> collapses sidebar and <b>expand</b> expands sidebar:
<pre data-language="javascript">
 $('#my-sidebar').ace_sidebar('collapse');
 $('#my-sidebar').ace_sidebar('collapse', toggleButton);
 //if there is an optional toggleButton element, its icons will be flipped
</pre>
							<div class="alert alert-info">
							Please note that if you want to have minimized sidebar by default you should
							make the changes using CSS classes as described in <a href="#settings.sidebar" class="help-more">sidebar settings</a>
							</div>
						</li>
						
						<li>
							<b>toggle</b>, <b>hide</b> or <b>show</b>
							are used for submenus:
<pre data-language="javascript">
 $('#my-sidebar').ace_sidebar('toggle', [sub, 300]);
 //first parameter is submenu to toggle and second is duration in milliseconds.
</pre>
						</li>
					</ul>
				
				</li>
			</ul>
		</div><!-- /.info-section -->
		
		
		<h3 class="info-title smaller">Sidebar scrollbars</h3>
		<div class="info-section">
			<ul class="info-list list-unstyled">
				<li>
					There are two approaches for sidebar scrollbars which you can choose
					by using custom JS builder tool.
				</li>
				<li>
					First approach is used by default and works only for fixed sidebar.
					<br />
					There is no cropping of elements because of <em>overflow:hidden</em> CSS property.
				</li>
				<li>
					Second approach can be used both by fixed and normal sidebars and
					uses <em>overflow:hidden</em> CSS property.
				
				<li>				
					To add scrollbars to sidebar you should use the following function:
<pre data-language="javascript">
 $('.sidebar').ace_sidebar_scroll({
    //options here
 });
</pre>
					By default all <code>.sidebar</code> elements have scrollbars enabled on page load
					and activated when appropriate.
				</li>
				
				<li>
					The following options are available for first approach:
					<ul>
						<li><code>scroll_to_active</code> scroll to active item on page load</li>
						<li><code>include_shortcuts</code> include shortcut buttons in scroll area</li>
						<li><code>include_toggle</code> include toggle button in scroll area or not</li>
						<!-- <li><code>scrollbars_outside</code> whether scrollbars should be outside of sidebar area or not</li> -->
						<li><code>scroll_style</code> scrollbar style as described in custom scrollbars section</li>
						<li><code>mousewheel_lock</code> whether to lock mouse wheel on sidebar even if it hasn't scrollbars or not</li>
						
						<li><code>only_if_fixed</code> used in 2nd approach only</li>
						<li><code>smooth_scroll</code> used in first approach only. Specify a number to enable smooth scrolling or false to disable</li>
					</ul>
				</li>
				
				<li>
					The following functions are also available:
					<ul>
						<li><code>reset</code> reset scrollbars</li>
						<li><code>updateStyle</code> updates scrollbars style class:
<pre data-language="javascript">
 $('#my-sidebar').ace_sidebar_scroll('updateStyle', 'scroll-dark no-track');
 //for example such update is done which switching to another skin in Ace's demo
</pre>
						</li>
					</ul>
				</li>
			</ul>
		</div><!-- /.info-section -->
		
		
		<h3 class="info-title smaller">Submenu positioning and scrollbars</h3>
		<div class="info-section">
			<ul class="info-list list-unstyled">
				<li>
					To enable submenu adjustment, hiding delay and scrollbar feature you should use the following function:
<pre data-language="javascript">
 $('.sidebar').ace_sidebar_hover({
    //options here
 });
</pre>
					By default all <code>.sidebar</code> elements have this feature enabled on page load
					and activated when appropriate.
				</li>
				
				<li>
					The following options are available:
					<ul>
						<li><code>sub_hover_delay</code> time in milliseconds to hide a submenu after mouse leaves it. Default is 750</li>
						<li><code>sub_scroll_style</code> scrollbar style as described in custom scrollbars section</li>
					</ul>
				</li>
				
				<li>
					The following functions are also available:
					<ul>
						<li><code>reset</code> reset scrollbars</li>
						<li><code>updateStyle</code> updates submenu scrollbars style class:
<pre data-language="javascript">
 $('#my-sidebar').ace_sidebar_hover('updateStyle', 'scroll-dark no-track');
 //for example it can be done when switching to another skin dynamically
</pre>
						</li>
						<li><code>changeDir</code> changes scrollbars direction (left) for example if you are using RTL:
<pre data-language="javascript">
 $('#my-sidebar').ace_sidebar_hover('changeDir', 'left');
</pre>
						</li>
					</ul>
				</li>
				
			</ul>
		</div><!-- /.info-section -->

	</div><!-- /.help-content -->
	<!-- /section:basics/sidebar.functions -->
	
	
	
	
	
	<div class="hr hr-double hr32"></div>
	<h2 class="blue lighter help-title" data-id="#basics/sidebar.mobile">
		Responsive Sidebar
	</h2>
	<div class="space-4"></div>

	<!-- #section:basics/sidebar.mobile -->
	<div class="help-content">
		<h3 class="info-title smaller">Mobiles Views</h3>
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				There are 3 styles of responsive (mobile view) sidebar when screen size is below <b>992px</b>.
				<br />
				<i class="fa fa-hand-o-right"></i> You can change this value by changing
				Bootstrap <code>@grid-float-breakpoint-max</code> variable
				and	recompiling LESS files.
				<br />
				See <a href="#files/css" class="help-more">CSS section</a>
			</li>
			</ul>
		</div>
		
		
		<h3 class="info-title smaller" data-id="#basics/sidebar.mobile.style1">1. Default mobile menu style</h3>
		<!-- #section:basics/sidebar.mobile.style1 -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				<h4 class="grey lighter" >Default mobile menu style</h4>
				<div>
				  <span class="thumbnail inline">
					<img src="images/sidebar-mobile1.png" />
				  </span>
				</div>
				You should add <code>.responsive</code> class to <code>.sidebar</code> element.
			</li>
			
			<li>
				You can also add <code>.push_away</code> class to <code>.sidebar</code> to push content when sidebar is shown:
<pre data-language="html">
 <div id="sidebar" class="sidebar responsive push_away">
 </div>
</pre>
			</li>
			
			<li>
				You can add <code>data-auto-hide=true</code> attribute for sidebar to automatically hide when 
				user clicks outside of its area:
<pre data-language="html">
 <div id="sidebar" class="sidebar responsive" data-auto-hide="true">
 </div>
</pre>
			</li>
		  </ul>
		</div>
		<!-- /section:basics/sidebar.mobile.style1 -->
		 
		 
		 
		<h3 class="info-title smaller" data-id="#basics/sidebar.mobile.style2">2. Automatically minimized menu style</h3>
		<!-- #section:basics/sidebar.mobile.style2 -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				<div>
						  <span class="thumbnail inline">
							<img src="images/sidebar-mobile2.png" />
						  </span>
						</div>

						You should add <code>.responsive-min</code> class to <code>.sidebar</code> element
						and there should also be an <b>invisible toggle button</b> present, right before sidebar.
						
						<br />
						An additional <code>.sidebar-toggle.sidebar-expand</code> button, expands sidebar in mobile view:
						(<a href="#basics/sidebar.layout.minimize" class="help-more">More info</a>)
						<br />
						<div class="alert alert-info">
							It should have a <code>data-target</code> attribute which points to sidebar ID.
						</div>
						<div class="space-4"></div>
<pre data-language="html">
<a href="#" class="menu-toggler invisible" id="menu-toggler"></a>
<div id="sidebar" class="sidebar responsive-min">
  .
  .
  .
  .
 <div class="sidebar-toggle sidebar-collapse">
    ...
 </div>
 
 <div data-target="#sidebar" class="sidebar-toggle sidebar-expand">
    ...
 </div>
</div>
</pre>
			</li>
			<li>
				You can add <code>data-auto-hide=true</code> attribute for sidebar to automatically become minimized when 
				user clicks outside of its area:
<pre data-language="html">
 <div id="sidebar" class="sidebar responsive-min" data-auto-hide="true">
 </div>
</pre>
			</li>
		  </ul>
		 </div>
		 <!-- /section:basics/sidebar.mobile.style2 -->

		 
		 <h3 class="info-title smaller" data-id="#basics/sidebar.mobile.style3">3. Bootstrap collapse style</h3>
		<!-- #section:basics/sidebar.mobile.style3 -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				<h4 class="grey lighter" data-id="#basics/sidebar.mobile.style3"></h4>
				<div>
				  <span class="thumbnail inline">
					<img src="images/toggle-sidebar-3.png" />
				  </span>
				</div>

				For this you should add <code>.collapse.navbar-collapse</code> class
				to <code>.sidebar</code> element and have the correct <a href="#basics/sidebar.mobile.toggle" class="help-more">toggle buttons</a> inside navbar:
				<br />
				<pre data-language="html">
<div id="sidebar" class="sidebar collapse navbar-collapse">
</div>
</pre>
			</li>

		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		<!-- /section:basics/sidebar.mobile.style3 -->
	
	
	
	
		<h3 class="info-title smaller" data-id="#basics/sidebar.mobile.toggle">Toggle Button</h3>
		<!-- #section:basics/sidebar.mobile.toggle -->
		<div class="info-section">
		  <ul class="info-list list-unstyled">
		  	<li>
				In default responsive (mobile) style and collapsible responsive style,
				toggle buttons are used to show and hide sidebar.
			</li>
			<li>
				Buttons can are either before brand text container (<code>.navbar-header</code>) or inside it
				and	it should have <code>data-target</code> attribute which points to sidebar's ID.
				<div>
				 <span class="thumbnail inline">
					<img src="images/toggle-sidebar-1.png" />
				 </span>
				</div>
<pre data-language="html">
 <button data-target="#sidebar" type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler">
   <span class="sr-only">Toggle sidebar</span>
   <span class="icon-bar"></span>
   <span class="icon-bar"></span>
   <span class="icon-bar"></span>
 </button>

 <div class="navbar-header pull-left">
   <!-- toggle button can also be here -->
   
   <!-- brand text -->
   
   <!-- toggle button can also be here -->
 </div>
</pre>
			</li>
			
			<li>
				If you want to use old style toggle button,
				you should insert it before <code>.sidebar</code> element.
				<br />
				<div>
				 <span class="thumbnail inline">
					<img src="images/toggle-sidebar-11.png" />
				 </span>
				</div>
<pre data-language="html">
 <a href="#" data-target="#sidebar" class="menu-toggler" id="menu-toggler">
   <span class="sr-only">Toggle sidebar</span>
   <span class="toggler-text"></span>
 </a>
 <div class="sidebar responsive" id="sidebar">
   ...
 </div>
</pre>
				
				<br />

				It should have a <code>span.toggler-text</code> inside it and you can change
				<b>MENU</b> text to something else by modifying
				<code>@toggler-text</code> variable inside <code>assets/css/less/sidebar/old-toggle-button.less</code>
				and recompiling <code>ace.less</code>
			</li>
			
			<li>
				In 2nd mobile menu style, you should add an invisible <code>.menu-toggler</code> element right before <code>.sidebar</code>
<pre data-language="html">
 <a class="invisible menu-toggler" id="menu-toggler"></a>
 <div class="sidebar responsive-min">
 ...
 </div>
</pre>
			</li>
			
			
			<li>
				For collapse style sidebar in mobile view (3rd style),
				you should use <code>data-toggle</code> and <code>data-target</code> attributes:
				<div>
				 <span class="thumbnail inline">
					<img src="images/toggle-sidebar-3.png" />
				 </span>
				</div>
<pre data-language="html">
&lt;button class="pull-right navbar-toggle collapsed" type="button"
           data-toggle="collapse" data-target=".sidebar">
  &lt;span class="sr-only">Toggle sidebar&lt;/span>
  &lt;span class="icon-bar">&lt;/span>
  &lt;span class="icon-bar">&lt;/span>
  &lt;span class="icon-bar">&lt;/span>
&lt;/button>
</pre>

<pre data-language="html">
 <!-- collapse style toggle buttons can be here -->
 <div class="navbar-header pull-left">
   <a class="navbar-brand" href="#">
      <!-- brand text is here -->
   </a>
   <!-- collapse style toggle buttons can be here -->
 </div>
</pre>

			</li>
			
		  </ul>
		</div>
		<!-- /section:basics/sidebar.mobile.toggle -->
	</div>
	<!-- /section:basics/sidebar.mobile -->

		
		
	<div class="hr hr-double hr32"></div>
	<h2 class="help-title blue lighter" data-id="#basics/sidebar.options">
		Sidebar Options
	</h2>
	<div class="space-4"></div>

	<!-- #section:basics/sidebar.options -->
	<div class="help-content">
		<h3 class="info-title smaller" data-id="#basics/sidebar.horizontal">1. Horizontal Sidebar</h3>
		<!-- #section:basics/sidebar.horizontal -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
			For horizontal menu you should add <code>.h-sidebar</code> class to <code>.sidebar</code> and <code>.h-navbar</code> to <code>.navbar</code> element:
<pre data-language="html">
 <div id="navbar" class="navbar navbar-default h-navbar navbar-collapse">
 </div>
 <div id="main-container">
    <div id="sidebar" class="sidebar h-sidebar collapse navbar-collapse">
     .
     .
     .
    </div>
 </div>
</pre>
			</li>

			<li>
				You should also add <code>.hover</code> class to all <b>LI</b> elements, so that submenus are shown on mouse hover:
<pre data-language="html">
 <ul class="nav nav-list">
   <li class="hover">
     <a href="#">
       ...
     </a>
     <b class="arrow"></b>
     <ul class="submenu">
       ...
     </ul>
   </li>
 </ul>
</pre>
			</li>
			
			<li>
				Add <code>.no-gap</code> to horizontal menu to remove gap.
				<br />
				Add <code>.lower-highlight</code> to move the highlight bar lower.
				<br />
				Add <code>.h-navbar</code> to <code>.navbar</code> to add shadow to it.
				
<pre data-language="html">
<div id="sidebar" class="sidebar h-sidebar no-gap lower-highlight">
</div>
</pre>

<pre data-language="html">
<div id="navbar" class="navbar h-navbar">
</div>
</pre>
			</li>

			<li>
				Horizontal menu is only visible when screen width is above <b>991px</b>.
				<br />
				You can choose any of the three possible mobile menu styles for smaller widths.
			</li>
			
			<li>
				Also, in demo page, when horizontal menu is fixed and you scroll down,
				it moves up gradually.
				<br />
				To enable this, you should include the following code in your page:
				<br />
				<code data-open-file="javascript" class="open-file"><span class="brief-show">mustache/app/views/assets/scripts/</span>top-menu.js</code>
			</li>
			
			<li>
				If you want the header (h1) text to be aligned with content area text,
				you can either add <code>.no-margin-left</code> class to <code>h1</code> header element or
				add <code>.no-margin</code> class to the <code>.row</code> element which encloses content area!
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		<!-- /section:basics/sidebar.horizontal -->
		
		
		
		<h3 class="info-title smaller" data-id="#basics/sidebar.hover">2. Submenu on Hover</h3>
		<!-- #section:basics/sidebar.hover -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
			You can have submenus to be displayed on mouse hover instead of click.
			</li>
			<li>
			For that you should add <code>.hover</code> class to each <b>LI</b> element
			and also add <code>.arrow</code> element before submenus.
<pre data-language="html">
 <ul class="nav nav-list">
   <li class="hover">
    <a href="#">
      ...
    </a>
    <b class="arrow"></b>
    <ul class="submenu">
      ...
    </ul>
   </li>
 </ul>
</pre>
			</li>
			<li>
				Hover submenus are only available when screen width is above <b>991px</b>.
				<br />
				You can change that by modifying <code>@screen-hover-menu</code> variable inside
				<code>assets/css/less/variables.less</code> and recompile <code>ace.less</code>
				or use CSS builder tool.
			</li>			
			
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		<!-- /section:basics/sidebar.hover -->
		


		<h3 class="info-title smaller" data-id="#basics/sidebar.compact">3. Compact Sidebar</h3>
		<!-- #section:basics/sidebar.compact -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				Simply add <code>.compact</code> class to <code>.sidebar</code> element:
<pre data-language="html">
 <div class="sidebar responsive compact" id="sidebar">
 </div>
</pre>
			</li>
			
			<li>
				Compact sidebar is only available when screen width is above <b>991px</b>.
				<br />
				You can change that by modifying <code>@@screen-compact-menu</code> variable inside
				<code>assets/css/less/variables.less</code> and recompile <code>ace.less</code>
				or use CSS builder tool.
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		<!-- /section:basics/sidebar.compact -->


		<h3 class="info-title smaller" data-id="#basics/sidebar.highlight">4. Highlight Item</h3>
		<!-- #section:basics/sidebar.highlight -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				An alternative active item highlight.
				<br />
				Add <code>.highlight</code> to <b>LI</b> elements:
<pre data-language="html">
 <ul class="nav nav-list">
   <li class="highlight">
    ...
   </li>
 </ul>
</pre>
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		<!-- /section:basics/sidebar.highlight -->
		
		
		<h3 class="info-title smaller">5. Fixed Sidebar</h3>
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				Adding <code>.sidebar-fixed</code> class to <code>.sidebar</code> element makes it fixed by default:
<pre data-language="html">
 <div class="sidebar responsive sidebar-fixed" id="sidebar">
 </div>
</pre>
			</li>
			<li>
				For more info please see <a href="#settings.sidebar" class="help-more">sidebar settings</a>
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		
		
		<h3 class="info-title smaller">6. Minimized Sidebar</h3>
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				Adding <code>.menu-min</code> class to <code>.sidebar</code> element
				makes it minimized by default:
<pre data-language="html">
 <div class="sidebar responsive menu-min" id="sidebar">
 </div>
</pre>
			</li>
			
			<li>
				For more info please see <a href="#settings.sidebar" class="help-more">sidebar settings</a>
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		
		
		<h3 class="info-title smaller" data-id="#basics/sidebar.multiple">7. Multiple Sidebar</h3>
		<!-- #section:basics/sidebar.multiple -->
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				You can have more than one sidebar on a page.
			</li>
			
			<li>
				Each one should have <code>.sidebar</code> class and an ID attribute.
			</li>
			
			<li>
				First sidebar should be at its default place
				and second should be inside <code>.main-content-inner</code>:
<pre data-language="html">
<div class="main-content">
  <div class="main-content-inner">
    <div id="sidebar2" class="sidebar h-sidebar navbar-collapse collapse">
      <!-- second sidebar, horizontal -->
    </div>

    <div class="page-content">
      <!-- page content area -->
    </div>
  </div>
</div>
</pre>
			</li>
			
			<li>
				If second sidebar is not horizontal, then <code>.page-content</code> should also
				have <code>.main-content</code> class and <code>.footer</code> should be moved
				after it:
<pre data-language="html">
<div class="main-content">
  <div class="main-content-inner">
    <div id="sidebar2" class="sidebar responsive">
      <!-- second sidebar, horizontal -->
    </div>

    <div class="page-content main-content">
      <!-- page content area -->
    </div>

    <div class="footer"></div>
  </div>
</div>
</pre>
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		<!-- /section:basics/sidebar.multiple -->

	</div><!-- /.help-content -->
	<!-- /section:basics/sidebar.options -->


	
	<div class="hr hr-double hr32"></div>
	<h2 class="help-title blue lighter" data-id="#basics/sidebar.mark_active">
		Sidebar Active Item
	</h2>
	<div class="space-4"></div>

	<!-- #section:basics/sidebar.mark_active -->
	<div class="help-content">
		<h3 class="info-title smaller">Ajax</h3>
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
			<div>
				<span class="thumbnail inline">
					<img src="images/active.png" />
				</span>
			</div>

			
				If your page content is updated via ajax and you want to mark a different menu item as active,
				you can do like this as an example:

<pre data-language="javascript">
//inside the function when ajax content is loaded

//somehow get a reference to our newly clicked(selected) element's parent "LI"
var new_active = $(this).parent();

//remove ".active" class from all (previously) ".active" elements
$('.nav-list li.active').removeClass('active');

//add ".active" class to our newly selected item and all its parent "LI" elements
new_active.addClass('active').parents('.nav-list li').addClass('active');

//you can also update breadcrumbs:
var breadcrumb_items = [];
//$(this) is a reference to our clicked/selected element
$(this).parents('.nav-list li').each(function() {
  var link = $(this).find('> a');
  var text = link.text();
  var href = link.attr('href');
  breadcrumb_items.push({'text': text, 'href': href});
})
//now we have a breadcrumbs list and can replace breadcrumbs area
</pre>

			</li>
			
			<li>
				If you are using a client side application framework such as ember.js or angular.js,
				you may have other approaches that work better in the specific context.
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->
		
		
		<h3 class="info-title smaller">non-Ajax</h3>
		<div class="info-section">
		 <ul class="info-list list-unstyled">
			<li>
				If you navigate to other pages without ajax, you can have several approaches depending on your application.
			</li>
			
			<li>
				For example if you have a list of pages retrieved from a data source,
				you can lookup the item that matches current page and mark it as <b>active</b>.
				<br />
				You should also mark its parents as <b>active</b> and <b>open</b>
			</li>
			
			<li>
				In the following example we have a list of items.
				<br />
				We find our current item using its identifier.
				<br />
				Then we mark it as active, find its parent, mark the parent as active & open and repeat this action.
			</li>

			<li>
Sample PHP code:
<pre data-language="php">
//suppose we have a list of pages (associative array or other data structure)
//$menu_list = ... //retrieved from database
//or
 $menu_list = array(
    'id or name of page 1' => array (
         'href' => '#link1',
         'text' => 'item name or text',
       'parent' => 'parent id or name'
    )
    ,
   'id or name of page 2' => array (
         'href' => '#link2',
         'text' => 'item name or text',
       'parent' => 'parent id or name'
    )
    ,
   'new-user' => array (
         'href' => 'user/create',
         'text' => 'Add User',
       'parent' => 'operations'
    )
    ...
 );

//we somehow know the ID or tag or hash of the current page
//perhapse from a database lookup or by simply checking its URL
//for some pointers such as ID, file name, category name, etc ...
$current_page = 'new-user';
$breadcrumbs = array();//let's create our breadcrumbs array as well

//make_me should be a reference to current_item not a copy of it
$mark_me = &$menu_list[$current_page];
$open = false;
while(true) {//you can also use a recursive function instead of a loop
  $mark_me['active'] = true;//mark this as "active"
  if( $open ) $mark_me['open'] = true;//mark this as "open"
  
  $breadcrumbs[] = $mark_me;

  $parent_id = $mark_me['parent'];//see if it has a parent
  if( $parent_id == null || !isset($menu_list[$parent_id]) ) break;//if not, break
  
  $mark_me = &$menu_list[$parent_id];//set item's parent as the new "mark_me" and repeat
  $open = true;//parent elements should be marked as "open" too
}

foreach($menu_list as $id => $menu_item) {
  print('&lt;li class="');
   if( $menu_item['active'] ) print('active');
   if( $menu_item['open'] ) print(' open');
  print('"&gt;');
  //something like &lt;li class="active open"&gt; will be printed
  //...
  //print other parts of menu item
}

//now we also have a list of breadcrumb items to print later
</pre>

<hr />

Sample Javascript code (for example in Nodejs):
<pre data-language="javascript">
//suppose we have a list of pages (associative array or other data structure)
//var menu_list = ... //retrieved from database
//or
 var menu_list = {
    'id or name of page 1' : {
         'href' : '#link1',
         'text' : 'item name or text',
       'parent' : 'parent id or name'
    }
    ,
   'id or name of page 2' : {
         'href' : '#link2',
         'text' : 'item name or text',
       'parent' : 'parent id or name'
    }
    ,
   'new-user' : {
         'href' : 'user/create',
         'text' : 'Add User',
       'parent' : 'operations'
    }
    ...
 };

//we somehow know the ID or tag or hash of the current page
//perhapse from a database lookup or by simply checking its URL
//for some pointers such as ID, file name, category name, etc ...
var current_page = 'new-user';
var breadcrumbs = [];//let's create our breadcrumbs array as well

//make_me should be a reference to current_item not a copy of it
var mark_me = menu_list[current_page];
var open = false;
while(true) {//you can also use a recursive function instead of a loop
  mark_me['active'] = true;//mark this as "active"
  if( open ) mark_me['open'] = true;//mark this as "open"
  
  breadcrumbs.push(mark_me);

  var parent_id = mark_me['parent'];//see if it has a parent
  if( parent_id == null || !(parent_id in menu_list) ) break;//if not, break
  
  mark_me = menu_list[parent_id];//set item's parent as the new "mark_me" and repeat
  open = true;//parent elements should be marked as "open" too
}

var output = '';
for(var id in menu_list) if(menu_list.hasOwnProperty(id)) {
  var menu_item = menu_list[id];
  output += '&lt;li class="';
   if( menu_item['active'] ) output += 'active';
   if( menu_item['open'] ) output += ' open';
  output += '"&gt;';
  //something like &lt;li class="active open"&gt; will be printed
  //...
  //print other parts of menu item
}
console.log(output);

//now we also have a list of breadcrumb items to print later
</pre>

			</li>
			
			<li class="hidden">
			
			<div class="alert alert-info">
				In some languages such as PHP, you should make sure you are making changes to the item itself and not a copy of it.
				<br />
				For example in this assignment: <code>$mark_me = $menu_list[$current_page]</code>
				, when you modify <code>$mark_me</code> and for example mark it as active,
				changes are not reflected in
				<code>$menu_list[$current_page]</code> and therefore, when printing the <code>$menu_list</code> list,
				you won't have modified items.
				<br />
				For that you should make sure, you are using a reference not a copy:
				<code>$mark_me = <span class="bolder bigger-150 blue">&amp;</span>$menu_list[$current_page]</code>
				<br />
				Now <code>$mark_me</code> is a reference to <code>$menu_list[$current_page]</code>
				and therefore 
			</div>
			
			</li>
		 </ul><!-- /.info-list -->
		</div><!-- /.info-section -->

	</div><!-- /.help-content -->
	<!-- /section:basics/sidebar.mark_active -->
	
	
	<!-- /section:basics/sidebar -->	
</section>