|
3 | 3 | <head>
|
4 | 4 | <meta charset="UTF-8" />
|
5 | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6 |
| - <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1" /> |
7 | 7 | <link rel="icon" href="/favicon.ico" />
|
8 |
| - <title>Telescuff - <%= headerTitle %></title> |
9 |
| - <link |
10 |
| - rel='stylesheet' |
11 |
| - href='https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/paper/bootstrap.min.css' /> |
| 8 | + <title>Telescuff - <%= headerTitle %></title> |
| 9 | + <link |
| 10 | + rel='stylesheet' |
| 11 | + href='https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/united/bootstrap.min.css' /> |
12 | 12 | <script src='https://code.jquery.com/jquery-3.1.1.slim.min.js'></script>
|
13 | 13 | <script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js'></script>
|
14 |
| - <script |
| 14 | + <script |
15 | 15 | src='https://cdnjs.cloudflare.com/ajax/libs/localforage/1.5.0/localforage.min.js'
|
16 | 16 | ></script>
|
17 | 17 | <style>
|
18 | 18 | body {
|
19 | 19 | font-size: 15px;
|
20 |
| - background-color: #f3f3f3; |
| 20 | +/* background-color: #f3f3f3;*/ |
21 | 21 | }
|
22 | 22 | h1 > div > span {
|
23 | 23 | vertical-align: middle;
|
|
26 | 26 | margin: 5px;
|
27 | 27 | width: auto;
|
28 | 28 | box-shadow: 0 1px 2px rgba(0,0,0,0.3);
|
29 |
| - border-radius: 3px; |
30 |
| - background-color: #fff; |
31 |
| - } |
| 29 | + border-radius: 3px; |
| 30 | +/* background-color: #fff;*/ |
| 31 | + } |
32 | 32 | span.label {
|
33 | 33 | padding: .2em .6em;
|
34 | 34 | margin-left: 1em;
|
35 | 35 | vertical-align: middle;
|
36 | 36 | border-radius: 1em;
|
37 |
| - } |
| 37 | + } |
38 | 38 | </style>
|
39 |
| - |
| 39 | + |
40 | 40 | <script>
|
41 | 41 | $(document).ready(function () {
|
42 | 42 | localforage.getItem("<%= page %>links").then(function decorate (prevLinks) {
|
43 |
| - |
| 43 | +
|
44 | 44 | if (prevLinks === null) {
|
45 | 45 | prevLinks = [];
|
46 | 46 | }
|
47 |
| - |
| 47 | +
|
48 | 48 | var currLinks = [];
|
49 | 49 | $("td > a").each(function () {
|
50 |
| - var $el = $(this), |
| 50 | + var $el = $(this), |
51 | 51 | link = $el.text().trim();
|
52 | 52 | currLinks.push(link);
|
53 |
| - |
54 |
| - if (prevLinks.indexOf(link) == -1) { |
55 |
| - $el.parent().parent().prev().find('th').first().append( |
| 53 | +
|
| 54 | + if (prevLinks.indexOf(link) === -1) { |
| 55 | + $el.closest("tr").prev().find('th').first().append( |
56 | 56 | $('<span class="label label-primary">NEW</span>')
|
57 | 57 | );
|
58 | 58 | }
|
59 |
| - }); |
60 |
| - |
| 59 | + }); |
| 60 | +
|
61 | 61 | localforage.setItem("<%= page %>links", currLinks);
|
62 | 62 | });
|
63 | 63 | });
|
64 |
| - </script> |
| 64 | + </script> |
65 | 65 | </head>
|
66 |
| -<body> |
| 66 | +<body> |
67 | 67 | <nav class='navbar navbar-default'>
|
68 | 68 | <div class='container-fluid'>
|
69 | 69 | <div class='navbar-header'>
|
70 |
| - <button |
| 70 | + <button |
71 | 71 | type="button" class="navbar-toggle collapsed"
|
72 | 72 | data-toggle="collapse" data-target="#navbar-links"
|
73 | 73 | aria-expanded="false"
|
74 | 74 | >
|
75 |
| - <span class="icon-bar"></span> |
76 |
| - <span class="icon-bar"></span> |
| 75 | + <span class="icon-bar"></span> |
| 76 | + <span class="icon-bar"></span> |
77 | 77 | <span class="icon-bar"></span>
|
78 | 78 | </button>
|
79 |
| - <a class='navbar-brand' href='index.html'>Telescuff |
| 79 | + <a class='navbar-brand' href='index.html'>Telescuff |
80 | 80 | <small class="hidden-xs hidden-sm">
|
81 | 81 | - TV & movie data scraped from the web</small></a>
|
82 | 82 | </div>
|
83 |
| - |
| 83 | + |
84 | 84 | <div class='collapse navbar-collapse' id='navbar-links'>
|
85 | 85 | <ul class='nav navbar-nav'>
|
86 | 86 | <li <% if (page === "tvshows") { %>class='active'<% } %>><a
|
87 | 87 | href='tvshows.html'>TV Shows</a></li>
|
88 | 88 | <li <% if (page === "movierentals") { %>class='active'<% } %>><a
|
89 | 89 | href='movierentals.html'>Movie Rentals</a></li>
|
90 | 90 | </ul>
|
91 |
| - |
92 |
| - <p class='navbar-text navbar-right'>Updated |
| 91 | + |
| 92 | + <p class='navbar-text navbar-right'>Updated |
93 | 93 | <%= (new Date()).toUTCString() %>
|
94 | 94 | </p>
|
95 | 95 | </div>
|
|
99 | 99 | <div class="container">
|
100 | 100 | <h1 class="text-center">
|
101 | 101 | <div>
|
102 |
| - <span class='glyphicon glyphicon-<%= icon %>'></span> |
| 102 | + <span class='glyphicon glyphicon-<%= icon %>'></span> |
103 | 103 | <span><%= headerTitle %></span>
|
104 | 104 | </div>
|
105 | 105 | <small><%= headerSubtitle %></small>
|
106 | 106 | </h1>
|
107 | 107 | </div>
|
108 |
| - </div> |
109 |
| - <table class='table table-striped'> |
| 108 | + </div> |
| 109 | + <table class='table'> |
110 | 110 | <%= tableContent %>
|
111 | 111 | </table>
|
112 | 112 |
|
|
0 commit comments