LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

CSS
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif, calibri;
  outline: none;
}
body {height: 2000px;}
::-webkit-scrollbar {
  background: transparent;
  width: 5px;
}
::-webkit-scrollbar-thumb {
  background-color: #394450
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.side-nav {
  height: 100%;
  width: 290px;
  background-color: #1b1e25;
  color: #CCC;
  -webkit-transform: translateX(-290px);
  -moz-transform: translateX(-290px);
  transform: translateX(-290px);
  -webkit-transition: all .3s ease;
  -moz-transition: all .3s ease;
  transition: all .3s ease;
  position: absolute;
  top: 0;
  left: 0;
  overflow: auto;
}
.side-nav .close-aside {
  position: absolute;
  top: 7px;
  right: 7px;
  cursor: pointer;
  color: #EEE;
}
.side-nav .heading {
  background-color: #22272d;
  padding: 15px 15px 15px 30px;
  overflow: hidden;
}
.side-nav .heading > img {
  border-radius: 50%;
  float: left;
  width: 28%;
}
.side-nav .info {
  float: left;
  width: 69%;
  margin-left: 3%;
}
.side-nav .heading .info > h3 > a {
  color: #EEE;
  font-weight: 100;
  margin-top: 4px;
  display: block;
  text-decoration: none;
  font-size: 18px;
}
.side-nav .heading .info > h3 > a:hover {
  color: #FFF;
}
.side-nav .heading .info > p {
  color: #BBB;
  font-size: 13px;
}
/* End heading */
/* Start search */
.side-nav .search {
  text-align: center;
  padding: 15px 30px;
  margin: 15px 0;
  position: relative;
}
.side-nav .search > input {
  width: 100%;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid #23262d;
  padding: 7px 0 7px;
  color: #DDD
}
.side-nav .search > input ~ i {
  position: absolute;
  top: 22px;
  right: 40px;
  display: block;
  color: #2b2f3a;
  font-size: 19px;
}
/* End search */

.side-nav .categories > li {
  padding: 17px 40px 17px 30px;
  overflow: hidden;
  border-bottom: 1px solid #1f222d;
  cursor: pointer;
}
.side-nav .categories > li > a {
  color: #AAA;
  text-decoration: none;
}
/* Start num: there are three options primary, danger and success like Bootstrap */
.side-nav .categories > li > a > .num {
  line-height: 0;
  border-radius: 3px;
  font-size: 14px;
  color: #FFF;
  padding: 0px 5px
}
.dang {background-color: #f35959}
.prim {background-color: #0275d8}
.succ {background-color: #5cb85c}
/* End num */
.side-nav .categories > li > a:hover {
  color: #FFF
}
.side-nav .categories > li > i {
  font-size: 18px;
  margin-right: 5px
}
.side-nav .categories > li > a:after {
  content: "\f053";
  font-family: fontAwesome;
  font-size: 11px;
  line-height: 1.8;
  float: right;
  color: #AAA;
  -webkit-transition: all .3s ease-in-out;
  -moz-transition: all .3s ease-in-out;
  transition: all .3s ease-in-out;
}
.side-nav .categories .opend > a:after {
  -webkit-transform: rotate(-90deg);
  -moz-transform: rotate(-90deg);
  transform: rotate(-90deg);
}
/* End categories */
/* Start dropdown menu */
.side-nav .categories .side-nav-dropdown {
  padding-top: 10px;
  padding-left: 30px;
  list-style: none;
  display: none;
}
.side-nav .categories .side-nav-dropdown > li > a {
  color: #AAA;
  text-decoration: none;
  padding: 7px 0;
  display: block;
}
/* End dropdown menu */
/* Start social media icons */
.side-nav .social-media {
  display: block;
  float: left;
  position: relative;
  top: 23%;
  left: 30px;
  padding: 20px 0;
  cursor: pointer;
  z-index: 0
}
.side-nav .social-media > a {
  text-decoration: none;
  color: #CCC;
  font-size: 18px;
}
.side-nav .social-media > a:not(:first-child) {margin-left: 10px}
.side-nav .social-media > a:first-child:hover {color: #3b5998}
.side-nav .social-media > a:nth-child(2):hover {color: #1da1f2}
.side-nav .social-media > a:nth-child(3):hover {color: #ae63e4}
.side-nav .social-media > a:nth-child(4):hover {color: #e01f3d}
/* End social media icons */
.show-side-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  color: white;
  font-size: 25px;
  color: #444;
  border: none;
  background-color: transparent;
  font-weight: normal;
  cursor: pointer
}
.show-side-nav {
  -webkit-transform: translateX(0);
  -moz-transform: translateX(0);
  transform: translateX(0);
}

/* Start media query */
@media (max-width: 767px) {
  .side-nav .categories > li {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .side-nav .search {
    padding: 10px 0 10px 30px
  }
}
JS
/*global $, console*/
/*
  By Mostafa Omar
	https://www.facebook.com/MustafaOmarIbrahiem
*/
$(function () {

	'use strict';

	(function () {

		var aside = $('.side-nav'),

			showAsideBtn = $('.show-side-btn'),

			slideNavDropdown = $('.side-nav-dropdown');


		showAsideBtn.on("click", function () {

			$("#" + $(this).data('show')).toggleClass('show-side-nav');

		});

	  // When the user clicks the window if side nav isn't the target, close side nav
		$(window).on('mouseup', function (e) {

			if (!aside.is(e.target) && aside.has(e.target).length === 0 && !showAsideBtn.is(e.target)) {

				aside.removeClass('show-side-nav');

			}

	    });

      // dropdown menu in the side nav
		$('.side-nav .categories li').on('click', function () {

			$(this).toggleClass('opend').siblings().removeClass('opend');

			if ($(this).hasClass('opend')) {

				$(this).find('.side-nav-dropdown').slideToggle('fast');

				$(this).siblings().find('.side-nav-dropdown').slideUp('fast');

			} else {

				$(this).find('.side-nav-dropdown').slideUp('fast');

			}

		});

		$('.side-nav .close-aside').on('click', function () {

			$('#' + $(this).data('close')).removeClass('show-side-nav');

		});

	}());
  
});
Host Instantly Drag and Drop Website Builder

 

Wed, 11/29/2017 - 11:19

Related Codes

Pen ID
Pen ID
Pen ID