From d84e9e74cadc97af63025884167a73b6815fa754 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 3 Jul 2012 02:05:56 +0200 Subject: o Adding a side bar. --- public/javascripts/gui.js | 11 +++++++++++ public/stylesheets/style.css | 29 +++++++++++++++++++++++------ 2 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 public/javascripts/gui.js (limited to 'public') diff --git a/public/javascripts/gui.js b/public/javascripts/gui.js new file mode 100644 index 0000000..f235f6d --- /dev/null +++ b/public/javascripts/gui.js @@ -0,0 +1,11 @@ +$(document).ready(function() { + /* Needed if the static top navbar is being used. + * Add data-offset='60' to as well. + var offset = 60; + $('#navbar ul li a').click(function(event) { + event.preventDefault(); + $($(this).attr('href'))[0].scrollIntoView(); + scrollBy(0, -offset); + }); + */ +}); diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 30e047d..ccb2639 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -1,8 +1,25 @@ -body { - padding: 50px; - font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; +.sidebar-nav { + padding: 9px 0; +} + +.sidebar-nav-fixed { + position:fixed; + /* Only used with top, static navbar + top:60px; */ + top:20px; + width:21.97%; +} + +@media (max-width: 767px) { + .sidebar-nav-fixed { + width:auto; + } +} + +@media (max-width: 979px) { + .sidebar-nav-fixed { + position:static; + width: auto; + } } -a { - color: #00B7FF; -} \ No newline at end of file -- cgit v1.2.3