Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: johnsonj/johnsonj.github.com
base: 9f67cb8aac
...
head fork: johnsonj/johnsonj.github.com
compare: dd097a61be
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 42 additions and 10 deletions.
  1. +4 −1 css/main.css
  2. +9 −9 index.html
  3. +29 −0 js/main.js
View
5 css/main.css
@@ -152,6 +152,9 @@ a, a:visited, a:hover {
margin-left: 5px;
margin-top: -5px;
}
+#nav-group a {
+ text-decoration: none;
+}
#sections {
}
@@ -165,7 +168,7 @@ a, a:visited, a:hover {
font-size: 47px;
}
#container.sticky #sections {
- margin-top: 120px;
+ margin-top: 170px;
}
.navigation:last-child {
margin-right: 0;
View
18 index.html
@@ -29,18 +29,18 @@ <h1 class="soft-shadow">jeff johnson</h1>
<span>I am not a web guy. I am not a software guy. I'm an engineer developing solutions for a changing world and it just so happens I speak 1's and 0's.</span>
</div>
<nav id="nav-group">
- <span class="navigation brown-back clickable" data-hover-buddy="projects">
+ <a href="#projects" class="navigation brown-back clickable" data-hover-buddy="projects">
<i class="icon-beaker"></i><span class="nav-title">projects</span>
- </span>
- <span class="navigation brown-back clickable" data-hover-buddy="resume">
+ </a>
+ <a href="#resume" class="navigation brown-back clickable" data-hover-buddy="resume">
<i class="icon-list-alt"></i><span class="nav-title">resume</span>
- </span>
- <span class="navigation brown-back clickable" data-hover-buddy="contact">
+ </a>
+ <a href="#contact" class="navigation brown-back clickable" data-hover-buddy="contact">
<i class="icon-phone"></i><span class="nav-title">contact</span>
- </span>
+ </a>
</nav>
<div id="sections">
- <div class="brown-back section" data-hover-buddy="projects" style="min-height: 300px;">
+ <div class="brown-back section" data-hover-buddy="projects" style="min-height: 300px;" id="projects">
<h2>projects</h2>
@@ -142,11 +142,11 @@ <h3 class="header">
</span>
</article>
</div>
- <div class="brown-back section" data-hover-buddy="resume">
+ <div class="brown-back section" data-hover-buddy="resume" id="resume">
<h2>resume</h2>
text-version coming soon
</div>
- <div class="brown-back section" data-hover-buddy="contact">
+ <div class="brown-back section" data-hover-buddy="contact" id="resume">
<h2>contact</h2>
email me, call me, linked-in me(?)
</div>
View
29 js/main.js
@@ -16,5 +16,34 @@
var sticky = direction === "down" && $(window).height() < ($('#sections').height() + 100)
$(this).parent().toggleClass('sticky', sticky)
});
+
+ // Wicked credit to
+ // http://www.zachstronaut.com/posts/2009/01/18/jquery-smooth-scroll-bugs.html
+ var scrollElement = 'html, body';
+ $('html, body').each(function () {
+ var initScrollTop = $(this).attr('scrollTop');
+ $(this).attr('scrollTop', initScrollTop + 1);
+ if ($(this).attr('scrollTop') == initScrollTop + 1) {
+ scrollElement = this.nodeName.toLowerCase();
+ $(this).attr('scrollTop', initScrollTop);
+ return false;
+ }
+ });
+
+ // Smooth scrolling for internal links
+ $("a[href^='#']").click(function(event) {
+ event.preventDefault();
+
+ var $this = $(this),
+ target = this.hash,
+ $target = $(target);
+
+ $(scrollElement).stop().animate({
+ 'scrollTop': $target.offset().top
+ }, 500, 'swing', function() {
+ window.location.hash = target;
+ });
+
+ });
});
})();

No commit comments for this range

Something went wrong with that request. Please try again.