Skip to content

Commit 4afa58c

Browse files
author
Lisa P
committed
navigation scroll + tweetlink
1 parent 30b126a commit 4afa58c

File tree

4 files changed

+36
-32
lines changed

4 files changed

+36
-32
lines changed

css/main.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ body,html {
1313
font-size: 18px;
1414
text-align: center;
1515
}
16+
:focus {outline:none;}
17+
::-moz-focus-inner {border:0;}
1618

1719
ul, ol {
1820
padding: 0;
@@ -26,7 +28,6 @@ h1, .h1 {
2628
font-size: 55px;
2729
font-weight: 800;
2830
}
29-
3031
.header {
3132
height: auto;
3233
background-color: #ac2931;

index.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@
2727
<div class="inner">
2828
<ul>
2929
<li>
30-
<a href="">
30+
<a href="#pledge">
3131
<i class="icon icon-question"></i>
3232
<span>Take the pledge</span>
3333
</a>
3434
</li>
3535
<li>
36-
<a href="">
36+
<a href="#about">
3737
<i class="icon icon-ribbon"></i>
3838
<span>Learn more</span>
3939
</a>
4040
</li>
4141
<li>
42-
<a href="">
42+
<a href="https://twitter.com/share?url=http://ruby-white-ribbon.org/&lang=" class="external" target="_blank">
4343
<i class="icon icon-twitter"></i>
4444
<span>Tweet support</span>
4545
</a>
4646
</li>
4747
</ul>
4848
</div>
4949
</header>
50-
<section class="section section--darkred" role="main">
50+
<section class="section section--darkred" role="main" id="pledge">
5151
<div class="inner">
5252
<div class="logo-ribbon"></div>
5353
<h1>Ruby White Ribbon</h1>
@@ -62,7 +62,7 @@ <h1>Ruby White Ribbon</h1>
6262
<div class="logo-ruby"></div>
6363
</div>
6464
</section>
65-
<section class="section section--lightred">
65+
<section class="section section--lightred" id="about">
6666
<div class="inner">
6767
<h2 class="h1">What is Ruby White Ribbon?</h2>
6868
<div class="about">
@@ -81,9 +81,7 @@ <h2 class="h1">What is Ruby White Ribbon?</h2>
8181

8282
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
8383
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
84-
<script src="js/plugins.js"></script>
8584
<script src="js/main.js"></script>
86-
8785
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
8886
<!-- <script>
8987
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=

js/main.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,30 @@
1+
// Avoid `console` errors in browsers that lack a console.
2+
(function() {
3+
var method;
4+
var noop = function () {};
5+
var methods = [
6+
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
7+
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
8+
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
9+
'timeStamp', 'trace', 'warn'
10+
];
11+
var length = methods.length;
12+
var console = (window.console = window.console || {});
113

14+
while (length--) {
15+
method = methods[length];
16+
17+
// Only stub undefined methods.
18+
if (!console[method]) {
19+
console[method] = noop;
20+
}
21+
}
22+
}());
23+
24+
$(function() {
25+
$('.header a:not(.external)').on('click', function(e) {
26+
e.preventDefault();
27+
var to = $(this).attr('href');
28+
$('html, body').animate({scrollTop: $(to).offset().top }, '5000');
29+
});
30+
})

js/plugins.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)