Skip to content

Commit b87bec7

Browse files
committed
Merge pull request jsonwebtoken#110 from jsonwebtoken/docs
Add introduction section
2 parents 38c876d + 5b85577 commit b87bec7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+671
-405
lines changed

Gruntfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ module.exports = function (grunt) {
1010
options: {
1111
livereload: true
1212
},
13-
files: ['Gruntfile.js', 'js/**/*.js', 'stylus/**/*.styl', 'html/**/*.jade'],
14-
// files: ['Gruntfile.js', 'js/**/*.js', 'stylus/**/*.styl', 'html/**/*.jade', 'html/index.html'],
13+
files: ['Gruntfile.js', 'js/**/*.js', 'stylus/**/*.styl', 'views/**/*.jade'],
1514
tasks: ['build']
1615
}
1716
},
@@ -35,7 +34,8 @@ module.exports = function (grunt) {
3534
jade: {
3635
compile: {
3736
files: {
38-
'index.html': 'html/index.jade'
37+
'index.html': 'views/index.jade',
38+
'introduction/index.html': 'views/introduction.jade'
3939
}
4040
}
4141
},

css/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

html/index.jade

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

index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

introduction/index.html

Lines changed: 82 additions & 0 deletions
Large diffs are not rendered by default.

js/app.js

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,9 @@ function parseHash() {
1515
}
1616

1717
if (parseSearch().value || parseHash().id_token) {
18-
19-
$('body').removeClass('load');
20-
21-
scrollTo($('#debugger'));
18+
scrollTo($('#debugger-io'));
2219
}
2320

24-
// } else if (localStorage.getItem('visited')) {
25-
26-
// $('body').addClass('refreshed');
27-
28-
// } else {
29-
30-
// $('body').addClass('introduction').removeClass('load');
31-
32-
// }
33-
3421
function safeLocalStorageSetItem(key, value) {
3522
try {
3623
localStorage.setItem(key, value);
@@ -40,6 +27,28 @@ function safeLocalStorageSetItem(key, value) {
4027
}
4128
safeLocalStorageSetItem("visited", "1");
4229

30+
/*
31+
* Go to url hash from intro section
32+
*/
33+
if (location.href.indexOf("#debugger") != -1) {
34+
scrollTo($('#debugger-io'));
35+
}
36+
37+
if (location.href.indexOf("#libraries") != -1) {
38+
scrollTo($('#libraries-io'));
39+
}
40+
41+
/*
42+
* Show icon
43+
*/
44+
$(window).scroll(function() {
45+
if ($(window).scrollTop() >= 130) {
46+
$("nav.navbar").addClass("fixed")
47+
} else {
48+
$("nav.navbar").removeClass("fixed")
49+
};
50+
});
51+
4352
/*
4453
* Show menu mobile
4554
*/
@@ -79,7 +88,7 @@ $('.accordion').accordion({
7988
/*
8089
* Scroll to section
8190
*/
82-
$('a[href^="#"].scrollto').on('click', function(event) {
91+
$('a[href^="#"].scrollto').on('click', function(event) {
8392
var target = $( $(this).attr('href') );
8493

8594
if( target.length ) {
@@ -99,11 +108,9 @@ $(window).on('scroll', function () {
99108
var bottom = top + $(this).outerHeight();
100109

101110
if (cur_pos >= top && cur_pos <= bottom) {
102-
$submenu.find('a').removeClass('active').closest('nav.menu').removeClass('active');
103-
sections.removeClass('active');
111+
$submenu.find('a.scrollto').removeClass('active').closest('nav.menu').removeClass('active');
104112

105-
$(this).addClass('active');
106-
$submenu.find('a[href="#' + $(this).attr('id') + '"]').addClass('active').closest('nav.menu').addClass('active');
113+
$submenu.find('a.scrollto[href="#' + $(this).attr('id') + '"]').addClass('active').closest('nav.menu').addClass('active');
107114
}
108115
});
109116
});
@@ -204,14 +211,6 @@ var $grid = $('.libraries-sv').isotope({
204211
}
205212
});
206213

207-
$(window).scroll(function() {
208-
if ($(window).scrollTop() > 150) {
209-
$(".navbar").addClass("fixed")
210-
} else {
211-
$(".navbar").removeClass("fixed")
212-
};
213-
});
214-
215214
$('.filter select').on( 'change', function() {
216215
$grid.isotope({ filter: $(this).val() });
217216
});

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"grunt-contrib-watch": "^0.6.1",
2121
"grunt-mocha-phantomjs": "0.7.0",
2222
"grunt-usemin": "^2.0.2",
23-
"matchdep": "~0.3.0"
23+
"matchdep": "~0.3.0",
24+
"markdown": "^0.5.0"
2425
},
2526
"scripts": {
2627
"test": "grunt test --verbose",

stylus/app.styl

Lines changed: 80 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ body
263263
a
264264
color white
265265
font-size 30px
266-
margin 20% 0
266+
margin 10% 0
267267

268268
.supported
269269
display block
@@ -289,7 +289,15 @@ body
289289
+breakpoint("tablet")
290290
padding 140px 0 60px
291291
+breakpoint("desktop")
292-
padding 150px 0 40px
292+
padding 150px 0 60px
293+
294+
h1
295+
color white
296+
margin 25px 0 0
297+
+breakpoint("tablet")
298+
font-size 34px
299+
+breakpoint("desktop")
300+
font-size 40px
293301

294302
p
295303
color white
@@ -883,26 +891,32 @@ body
883891
max-width 875px
884892
margin 5px auto
885893

886-
.btn, a.btn
887-
transition(background-color 0.2s ease)
888-
text-transform uppercase
889-
letter-spacing 2px
890-
font-weight bold
891-
border 1px solid #d0d2d3
892-
line-height 30px
893-
padding 15px 30px
894-
font-size 15px
895-
border-radius 3px
896-
text-decoration none
897-
display inline-block
898-
margin-top 30px
899-
&.btn-success
900-
background-color #eb5424
894+
.btn, a.btn
895+
transition(background-color 0.2s ease)
896+
text-transform uppercase
897+
letter-spacing 2px
898+
font-weight bold
899+
border 1px solid #d0d2d3
900+
line-height 30px
901+
padding 15px 30px
902+
font-size 15px
903+
border-radius 3px
904+
text-decoration none
905+
display inline-block
906+
margin-top 30px
907+
&.btn-success
908+
background-color #eb5424
909+
color white
910+
border-color transparent
911+
&:hover
912+
background-color darken(#eb5424, 30%)
901913
color white
902-
border-color transparent
903-
&:hover
904-
background-color darken(#eb5424, 30%)
905-
color white
914+
915+
.btn, a.btn
916+
&.btn-lg
917+
background-color #D63AFF
918+
color white
919+
border none
906920

907921
.token
908922
margin-top 35px
@@ -914,6 +928,51 @@ body
914928
letter-spacing: 1px;
915929

916930

931+
// plain-text
932+
933+
.plain-text
934+
.container
935+
max-width 630px
936+
937+
h2
938+
margin-top 50px
939+
font-size 25px
940+
941+
h3
942+
font-size 20px
943+
944+
p
945+
line-height 1.8
946+
font-size 18px
947+
948+
code
949+
background-color rgba(#D8D8D8,.35)
950+
font-size 75%
951+
border-radius 3px
952+
padding 2px 4px
953+
954+
img
955+
width 100%
956+
957+
958+
// go-tool
959+
960+
.go-tool
961+
text-align center
962+
border-top 1px solid #DDD
963+
p
964+
font-size 15px
965+
display inline-block
966+
text-transform uppercase
967+
+breakpoint("tablet")
968+
margin-right 20px
969+
.btn.btn-success
970+
background-color #D63AFF
971+
margin 0
972+
&:hover
973+
background-color darken(#D63AFF, 30%)
974+
975+
917976
// footer
918977

919978
footer

0 commit comments

Comments
 (0)