Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Sidebar component added w/ demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven committed Apr 23, 2016
1 parent cefd063 commit 5c4fe1c
Show file tree
Hide file tree
Showing 8 changed files with 295 additions and 1 deletion.
98 changes: 98 additions & 0 deletions Jolt/css/sidebar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/* --------------------------------------------------------
Jolt Topbar CSS File
Version: 1.1.0
Author: Steven Morrison
Website: jolt.zaffri.com
GitHub: github.com/Zaffri
-------------------------------------------------------- */


#main-nav {
width: 100%;
padding-top: 15px;
}

#main-nav li {
list-style: none;
display: block;
}

#main-nav li a {
display: block;
width: 100%;
padding: 20px;
color: #a3a8a9;
}

#main-nav li a:hover {
background: #279df0;
color: #fff;
}

#main-nav .active {
background: #279df0;
color: #fff;
}

#side-bar, #side-body {
float: left;
}

#side-bar {
width: 330px;
background: #070c10;
color: #a3a8a9;
height: 100vh;
padding-top: 100px;
}

#side-bar h4 {
padding-left: 20px
}

@media (max-width: 950px) {
#side-bar {
position: fixed;
top: 0;
left: -330px;
-webkit-transition: left 1s ease-in;
-moz-transition: left 1s ease-in;
-ms-transition: left 1s ease-in;
-o-transition: left 1s ease-in;
transition: left 1s ease-in;
}
body #mobile-icon {
z-index: 9999;
left: 10px;
}
}

#mobile-checkbox {
display: none;
}

#mobile-icon {
width: 60px;
height: 50px;
cursor: pointer;
position: fixed;
top: 10px;
left: -70px;
}

.burger-bar {
width: 100%;
height: 5px;
margin-bottom: 8px;
background: #282828;
}

#mobile-checkbox:checked + #mobile-icon div {
background: #fff;
}

#mobile-checkbox:checked ~ #side-bar {
left: 0;
}
1 change: 1 addition & 0 deletions Jolt/css/sidebar.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 98 additions & 0 deletions Jolt/sidebar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/* --------------------------------------------------------
Jolt Topbar CSS File
Version: 1.1.0
Author: Steven Morrison
Website: jolt.zaffri.com
GitHub: github.com/Zaffri
-------------------------------------------------------- */


#main-nav {
width: 100%;
padding-top: 15px;
}

#main-nav li {
list-style: none;
display: block;
}

#main-nav li a {
display: block;
width: 100%;
padding: 20px;
color: #a3a8a9;
}

#main-nav li a:hover {
background: #279df0;
color: #fff;
}

#main-nav .active {
background: #279df0;
color: #fff;
}

#side-bar, #side-body {
float: left;
}

#side-bar {
width: 330px;
background: #070c10;
color: #a3a8a9;
height: 100vh;
padding-top: 100px;
}

#side-bar h4 {
padding-left: 20px
}

@media (max-width: 950px) {
#side-bar {
position: fixed;
top: 0;
left: -330px;
-webkit-transition: left 1s ease-in;
-moz-transition: left 1s ease-in;
-ms-transition: left 1s ease-in;
-o-transition: left 1s ease-in;
transition: left 1s ease-in;
}
body #mobile-icon {
z-index: 9999;
left: 10px;
}
}

#mobile-checkbox {
display: none;
}

#mobile-icon {
width: 60px;
height: 50px;
cursor: pointer;
position: fixed;
top: 10px;
left: -70px;
}

.burger-bar {
width: 100%;
height: 5px;
margin-bottom: 8px;
background: #282828;
}

#mobile-checkbox:checked + #mobile-icon div {
background: #fff;
}

#mobile-checkbox:checked ~ #side-bar {
left: 0;
}
44 changes: 44 additions & 0 deletions Jolt/test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>Jolt Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="stylesheet" type="text/css" href="css/global.css" />
<link rel="stylesheet" type="text/css" href="sidebar.css" />

</head>
<body>
<!-- Burger Icon -->
<input type="checkbox" id="mobile-checkbox" />
<label for="mobile-checkbox" id="mobile-icon">
<div class="burger-bar"></div>
<div class="burger-bar"></div>
<div class="burger-bar"></div>
</label>
<!-- Sidebar -->
<aside id="side-bar" >
<h4>MENU</h4>

<ul id="main-nav">
<li><a href="#" class="active">home</a></li
><li><a href="#">about</a></li
><li><a href="#">work</a></li
><li><a href="#">folio</a></li
><li><a href="#">contact</a></li>
</ul>
</aside>
<!-- End of Sidebar -->

<!-- Sidebody -->
<section id="side-body">



</section>
<!-- End of Sidebody -->
<div class="clear"></div>

</body>
</html>
11 changes: 10 additions & 1 deletion Release-notes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

---- Jolt 1.2.0 ----

Update: Sidebar componenet created - topbar alternative menu.
Update: Sidebar mobile toggle animation.
Update: Sidebar demo added.

--------------------


---- Jolt 1.1.0 ----

Update: #main-nav and logo area now have a width of auto by default, instead of percentage based.
Expand All @@ -11,7 +20,7 @@

---- Jolt 1.0.1 ----

Patch: Global default font (oxygen) was not working on smalle devices.
Patch: Global default font (oxygen) was not working on smaller devices.

--------------------

Expand Down
44 changes: 44 additions & 0 deletions demos/demo-sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>Jolt Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="stylesheet" type="text/css" href="../jolt/css/global.min.css" />
<link rel="stylesheet" type="text/css" href="../jolt/css/sidebar.min.css" />

</head>
<body>
<!-- Burger Icon -->
<input type="checkbox" id="mobile-checkbox" />
<label for="mobile-checkbox" id="mobile-icon">
<div class="burger-bar"></div>
<div class="burger-bar"></div>
<div class="burger-bar"></div>
</label>
<!-- Sidebar -->
<aside id="side-bar" >
<h4>MENU</h4>

<ul id="main-nav">
<li><a href="#" class="active">home</a></li
><li><a href="#">about</a></li
><li><a href="#">work</a></li
><li><a href="#">folio</a></li
><li><a href="#">contact</a></li>
</ul>
</aside>
<!-- End of Sidebar -->

<!-- Sidebody -->
<section id="side-body">



</section>
<!-- End of Sidebody -->
<div class="clear"></div>

</body>
</html>
File renamed without changes.
File renamed without changes.

0 comments on commit 5c4fe1c

Please sign in to comment.