Commit b169fbee authored by Thomas Park's avatar Thomas Park
Browse files

added smooth scrolling

parent 0a291e36
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -888,9 +888,8 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -888,9 +888,8 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -888,9 +888,8 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
......@@ -4,7 +4,8 @@ body {
}
section {
margin-top: 100px;
margin-top: 60px;
padding-top: 100px;
}
/* index */
......@@ -295,10 +296,6 @@ body .one .bsa_it_p {
}
/* subnav */
section {
padding-top: 60px;
}
.subnav {
margin-bottom: 60px;
......
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -888,9 +888,8 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -888,9 +888,8 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
......@@ -32,7 +32,7 @@
</script>
</head>
<body class="index">
<body class="index" id="top">
<script src="js/bsa.js"></script>
<div class="navbar navbar-fixed-top">
......@@ -546,7 +546,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -568,10 +568,10 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootswatch.js"></script>
<script>
<script type="text/javascript">
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
</script>
<script>
<script type="text/javascript">
var taglines = [
'Free themes for <a target="_blank" href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a>',
'Add color to your <a target="_blank" href="http://twitter.github.com/bootstrap/">Bootstrap</a> site without touching a color picker',
......
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -888,9 +888,8 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
(function ($) {
$(function(){
// fix sub nav on scroll
var $win = $(window),
$body = $('body'),
$nav = $('.subnav'),
navHeight = $('.navbar').first().height(),
subnavHeight = $('.subnav').first().height(),
subnavTop = $('.subnav').length && $('.subnav').offset().top - navHeight,
marginTop = parseInt($body.css('margin-top'), 10);
isFixed = 0;
processScroll();
$win.on('scroll', processScroll);
function processScroll() {
var i, scrollTop = $win.scrollTop();
if (scrollTop >= subnavTop && !isFixed) {
isFixed = 1;
$nav.addClass('subnav-fixed');
$body.css('margin-top', marginTop + subnavHeight + 'px');
} else if (scrollTop <= subnavTop && isFixed) {
isFixed = 0;
$nav.removeClass('subnav-fixed');
$body.css('margin-top', marginTop + 'px');
}
}
});
})(window.jQuery);
\ No newline at end of file
// tooltips
$('a[rel=tooltip]').tooltip({
'placement': 'bottom'
});
// recent news
function parseRSS(url, callback) {
$.ajax({
url: 'http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' + encodeURIComponent(url),
......@@ -10,4 +14,93 @@ function parseRSS(url, callback) {
callback(data.responseData.feed);
}
});
}
\ No newline at end of file
}
// smooth scroll
$(document).ready(function() {
function filterPath(string) {
return string
.replace(/^\//,'')
.replace(/(index|default).[a-zA-Z]{3,4}$/,'')
.replace(/\/$/,'');
}
var locationPath = filterPath(location.pathname);
var scrollElem = scrollableElement('html', 'body');
$('a[href*=#]').each(function() {
var thisPath = filterPath(this.pathname) || locationPath;
if ( locationPath == thisPath
&& (location.hostname == this.hostname || !this.hostname)
&& this.hash.replace(/#/,'') ) {
var $target = $(this.hash), target = this.hash;
if (target) {
var targetOffset = $target.offset().top;
$(this).click(function(event) {
event.preventDefault();
$(scrollElem).animate({scrollTop: targetOffset}, 400, function() {
location.hash = target;
});
});
}
}
});
// use the first element that is "scrollable"
function scrollableElement(els) {
for (var i = 0, argLength = arguments.length; i <argLength; i++) {
var el = arguments[i],
$scrollElement = $(el);
if ($scrollElement.scrollTop()> 0) {
return el;
} else {
$scrollElement.scrollTop(1);
var isScrollable = $scrollElement.scrollTop()> 0;
$scrollElement.scrollTop(0);
if (isScrollable) {
return el;
}
}
}
return [];
}
});
// subnav
(function ($) {
$(function(){
// fix sub nav on scroll
var $win = $(window),
$body = $('body'),
$nav = $('.subnav'),
navHeight = $('.navbar').first().height(),
subnavHeight = $('.subnav').first().height(),
subnavTop = $('.subnav').length && $('.subnav').offset().top - navHeight,
marginTop = parseInt($body.css('margin-top'), 10);
isFixed = 0;
processScroll();
$win.on('scroll', processScroll);
function processScroll() {
var i, scrollTop = $win.scrollTop();
if (scrollTop >= subnavTop && !isFixed) {
isFixed = 1;
$nav.addClass('subnav-fixed');
$body.css('margin-top', marginTop + subnavHeight + 'px');
} else if (scrollTop <= subnavTop && isFixed) {
isFixed = 0;
$nav.removeClass('subnav-fixed');
$body.css('margin-top', marginTop + 'px');
}
}
});
})(window.jQuery);
\ No newline at end of file
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -890,7 +890,6 @@
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -888,9 +888,8 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -888,9 +888,8 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -888,9 +888,8 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Blog</a>
<a href="http://feeds.feedburner.com/bootswatch">RSS</a>
......@@ -888,9 +888,8 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/application.js"></script>
<script src="../js/bootswatch.js"></script>
......
......@@ -33,7 +33,7 @@
</head>
<body class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<script src="../js/bsa.js"></script>
......@@ -51,7 +51,7 @@
<div class="nav-collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a onclick="pageTracker._link(this.href); return false;" href="http://news.bootswatch.com">News</a></li>
<li><a id="swatch-link" href="/#gallery">Gallery</a></li>
<li><a id="swatch-link" href="../#gallery">Gallery</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Preview <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
......@@ -865,7 +865,7 @@
<hr>
<footer id="footer">