Authored by jinhu.tung

remove unused files

1 -<!DOCTYPE html>  
2 -<html>  
3 - <head>  
4 - <meta charset="utf-8">  
5 - <title>A Gentle Introduction</title>  
6 -  
7 - <script  
8 - src="https://rawgit.com/flatiron/director/master/build/director.min.js">  
9 - </script>  
10 -  
11 - <script>  
12 - var author = function () { console.log("author"); };  
13 - var books = function () { console.log("books"); };  
14 - var viewBook = function (bookId) {  
15 - console.log("viewBook: bookId is populated: " + bookId);  
16 - };  
17 -  
18 - var routes = {  
19 - '/author': author,  
20 - '/books': [books, function() {  
21 - console.log("An inline route handler.");  
22 - }],  
23 - '/books/view/:bookId': viewBook  
24 - };  
25 -  
26 - var router = Router(routes);  
27 -  
28 - router.init();  
29 - </script>  
30 - </head>  
31 -  
32 - <body>  
33 - <ul>  
34 - <li><a href="#/author">#/author</a></li>  
35 - <li><a href="#/books">#/books</a></li>  
36 - <li><a href="#/books/view/1">#/books/view/1</a></li>  
37 - </ul>  
38 - </body>  
39 -</html>  
1 -<!DOCTYPE html>  
2 -<html>  
3 - <head>  
4 - <meta charset="utf-8">  
5 - <title>A Gentle Introduction 2</title>  
6 -  
7 - <script  
8 - src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js">  
9 - </script>  
10 -  
11 - <script  
12 - src="https://rawgit.com/flatiron/director/master/build/director.min.js">  
13 - </script>  
14 -  
15 - <script>  
16 - $('document').ready(function() {  
17 - //  
18 - // create some functions to be executed when  
19 - // the correct route is issued by the user.  
20 - //  
21 - var showAuthorInfo = function () { console.log("showAuthorInfo"); };  
22 - var listBooks = function () { console.log("listBooks"); };  
23 -  
24 - var allroutes = function() {  
25 - var route = window.location.hash.slice(2);  
26 - var sections = $('section');  
27 - var section;  
28 -  
29 - section = sections.filter('[data-route=' + route + ']');  
30 -  
31 - if (section.length) {  
32 - sections.hide(250);  
33 - section.show(250);  
34 - }  
35 - };  
36 -  
37 - //  
38 - // define the routing table.  
39 - //  
40 - var routes = {  
41 - '/author': showAuthorInfo,  
42 - '/books': listBooks  
43 - };  
44 -  
45 - //  
46 - // instantiate the router.  
47 - //  
48 - var router = Router(routes);  
49 -  
50 - //  
51 - // a global configuration setting.  
52 - //  
53 - router.configure({  
54 - on: allroutes  
55 - });  
56 -  
57 - router.init();  
58 - });  
59 - </script>  
60 - </head>  
61 -  
62 - <body>  
63 - <section data-route="author">Author Name</section>  
64 - <section data-route="books">Book1, Book2, Book3</section>  
65 - <ul>  
66 - <li><a href="#/author">#/author</a></li>  
67 - <li><a href="#/books">#/books</a></li>  
68 - </ul>  
69 - </body>  
70 -</html>