Skip to content
This repository has been archived by the owner on Oct 31, 2018. It is now read-only.

Commit

Permalink
Add Jobs and Blog links to navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
grk committed May 22, 2015
1 parent 674c143 commit 57bda35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions source/index.slim
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ header class="header js-header"
div class="grid__item eight-twelfths text-right"
nav
ul class="nav nav-main js-nav-main"
li= link_to 'What we do', '#what-we-do', class: 'js-smooth-scroll'
li= link_to 'What we did', '#what-we-did', class: 'js-smooth-scroll'
li= link_to 'Who we are', '#who-we-are', class: 'js-smooth-scroll'
li= link_to 'Contact us', '#contact-us', class: 'js-smooth-scroll'
li= link_to 'What we do', '#what-we-do', class: 'js-scroll-spy js-smooth-scroll'
li= link_to 'What we did', '#what-we-did', class: 'js-scroll-spy js-smooth-scroll'
li= link_to 'Who we are', '#who-we-are', class: 'js-scroll-spy js-smooth-scroll'
li= link_to 'Contact us', '#contact-us', class: 'js-scroll-spy js-smooth-scroll'
li= link_to 'Jobs', 'http://jobs.ragnarson.com'
li= link_to 'Blog', 'http://blog.ragnarson.com'
ul class="nav nav-main-rwd"
li
= link_to '#', class: 'nav-main-rwd-navicon js-nav-main-rwd-navicon' do
Expand Down
4 changes: 2 additions & 2 deletions source/javascripts/ragnarson.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ scrollToSection = (event) ->

initScrollSpy = ->
document.sections = []
$('.js-nav-main').find('a').each ->
$('.js-nav-main').find('.js-scroll-spy').each ->
document.sections.push $(@).attr('href')

scrollSpy = ->
scrollSpy = (event) ->
scrollPosition = $(window).scrollTop() + event.data.offset
for section in document.sections
if scrollPosition >= $(section).offset().top
Expand Down

0 comments on commit 57bda35

Please sign in to comment.