coursegen 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +16 -16
  3. data/lib/coursegen/course/helpers/content_helpers.rb +31 -0
  4. data/lib/coursegen/templates.rb +0 -3
  5. data/lib/coursegen/version.rb +1 -1
  6. data/templates/Guardfile +3 -3
  7. data/templates/Rules +21 -42
  8. data/templates/cg_config.rb +2 -1
  9. data/templates/cg_config.rb_sample +24 -30
  10. data/templates/content/bootstrap/css/custom.css +65 -23
  11. data/templates/content/bootstrap/css/full-width-pics.css +64 -0
  12. data/templates/content/bootstrap/css/prettyquote.css +31 -0
  13. data/templates/content/bootstrap/css/tipuesearch.css +163 -0
  14. data/templates/content/bootstrap/images/image1.jpg +0 -0
  15. data/templates/content/bootstrap/images/image10.jpg +0 -0
  16. data/templates/content/bootstrap/images/image2.jpg +0 -0
  17. data/templates/content/bootstrap/images/image22.jpg +0 -0
  18. data/templates/content/bootstrap/images/image3.png +0 -0
  19. data/templates/content/bootstrap/images/image4.jpg +0 -0
  20. data/templates/content/bootstrap/images/image8.jpg +0 -0
  21. data/templates/content/bootstrap/images/image8.png +0 -0
  22. data/templates/content/bootstrap/images/image9.jpg +0 -0
  23. data/templates/content/{tipuesearch/img → bootstrap/images}/loader.gif +0 -0
  24. data/templates/content/bootstrap/images/search.png +0 -0
  25. data/templates/content/{tipuesearch/tipuesearchnomin.js → bootstrap/js/tipuesearch.js} +106 -171
  26. data/templates/content/bootstrap/js/tipuesearch.min.js +12 -0
  27. data/templates/content/bootstrap/js/tipuesearch_content.js +13 -0
  28. data/templates/content/{tipuesearch → bootstrap/js}/tipuesearch_set.js +8 -7
  29. data/templates/content/content/intro/course_toc.md.erb +1 -0
  30. data/templates/layouts/banner.html.erb +9 -0
  31. data/templates/layouts/body_header.html.erb +4 -3
  32. data/templates/layouts/bottom_includes.html.erb +15 -0
  33. data/templates/layouts/course.html.erb +44 -0
  34. data/templates/layouts/main_navbar.html.erb +1 -1
  35. data/templates/layouts/nav-menus.html.erb +37 -0
  36. data/templates/layouts/sidebar.html.erb +14 -0
  37. data/templates/layouts/top_includes.html.erb +31 -0
  38. metadata +26 -16
  39. data/templates/body_footer.html +0 -8
  40. data/templates/body_header.html.erb +0 -6
  41. data/templates/content/chalkmark/chalkmark.js +0 -30
  42. data/templates/content/tipuesearch/img/search.png +0 -0
  43. data/templates/content/tipuesearch/tipuesearchmin.js +0 -14
  44. data/templates/content/tipuesearch_logic/search.md.erb +0 -8
  45. data/templates/content/tipuesearch_logic/tipuesearch_content.js.erb +0 -6
  46. data/templates/course.html +0 -59
  47. data/templates/helpful_box.html +0 -3
  48. data/templates/layouts/course.html +0 -59
  49. data/templates/main_navbar.html.erb +0 -21
@@ -0,0 +1,64 @@
1
+ /*
2
+ * Start Bootstrap - Full Width Pics (http://startbootstrap.com/)
3
+ * Copyright 2013-2016 Start Bootstrap
4
+ * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
5
+ */
6
+
7
+ body {
8
+ margin-top: 50px; /* Required margin for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
9
+ }
10
+
11
+ .image-bg-fluid-height,
12
+ .image-bg-fixed-height {
13
+ text-align: center;
14
+ -webkit-background-size: cover;
15
+ -moz-background-size: cover;
16
+ background-size: cover;
17
+ -o-background-size: cover;
18
+ }
19
+
20
+ .image-bg-fluid-height {
21
+ background: url('/bootstrap/images/image4.jpg') no-repeat center center scroll;
22
+ padding: 100px 0;
23
+ }
24
+
25
+ .image-bg-fixed-height {
26
+ background: url('/bootstrap/images/image4.jpg') no-repeat center center scroll;
27
+ height: 70px;
28
+ }
29
+
30
+ .img-center {
31
+ margin: 0 auto;
32
+ }
33
+
34
+ section {
35
+ padding: 15px 0;
36
+ }
37
+
38
+ .section-heading {
39
+ margin: 30px 0;
40
+ font-size: 4em;
41
+ }
42
+
43
+ .section-lead {
44
+ margin: 30px 0;
45
+ }
46
+
47
+ .section-paragraph {
48
+ margin: 30px 0;
49
+ }
50
+
51
+ footer {
52
+ margin: 50px 0;
53
+ }
54
+
55
+ @media(max-width:768px) {
56
+ section {
57
+ padding-top: 25px;
58
+ padding-bottom: 25px;
59
+ }
60
+
61
+ .section-heading {
62
+ font-size: 2em;
63
+ }
64
+ }
@@ -0,0 +1,31 @@
1
+ blockquote.pretty {
2
+ border:none;
3
+ margin-bottom:-30px;
4
+ position: relative;
5
+ max-width: 700px;
6
+ margin: 0 auto;
7
+ padding-left: 0.4em;
8
+ font-size:20px;
9
+ color: grey;
10
+ }
11
+
12
+ blockquote.pretty:before {
13
+ content: "\201C";
14
+ font-weight: bold;
15
+ font-size: 50px;
16
+ color:#889c0b;
17
+ position: absolute;
18
+ top: -0.2em;
19
+ left: -0.5em;
20
+ font-family: 'Georgia';
21
+ }
22
+ blockquote.pretty:after {
23
+ content: "\201D";
24
+ font-weight: bold;
25
+ font-size:50px;
26
+ color:#889c0b;
27
+ position: absolute;
28
+ bottom: -0.6em;
29
+ right: 0;
30
+ font-family: 'Georgia';
31
+ }
@@ -0,0 +1,163 @@
1
+
2
+ /*
3
+ Tipue Search 3.1
4
+ Copyright (c) 2013 Tipue
5
+ Tipue Search is released under the MIT License
6
+ http://www.tipue.com/search
7
+ */
8
+
9
+
10
+ #tipue_search_input
11
+ {
12
+ font: 12px/1.7 'Open Sans', sans-serif;
13
+ color: #333;
14
+ width: 150px;
15
+ border: 1px solid #e2e2e2;
16
+ border-radius: 0;
17
+ -moz-appearance: none;
18
+ -webkit-appearance: none;
19
+ box-shadow: none;
20
+ outline: 0;
21
+ }
22
+ #tipue_search_input:focus
23
+ {
24
+ border: 1px solid #ccc;
25
+ }
26
+ #tipue_search_button
27
+ {
28
+ width: 70px;
29
+ height: 36px;
30
+ border: 0;
31
+ border-radius: 1px;
32
+ background: #75a8fb url('img/search.png') no-repeat center;
33
+ outline: none;
34
+ }
35
+ #tipue_search_button:hover
36
+ {
37
+ background-color: #5193fb;
38
+ }
39
+
40
+ #tipue_search_content
41
+ {
42
+ clear: left;
43
+ max-width: 650px;
44
+ padding: 25px 0 13px 0;
45
+ margin: 0;
46
+ }
47
+ #tipue_search_loading
48
+ {
49
+ padding-top: 60px;
50
+ background: #fff url('img/loader.gif') no-repeat left;
51
+ }
52
+
53
+ #tipue_search_warning_head
54
+ {
55
+ font: 300 16px/1.6 'Open Sans', sans-serif;
56
+ color: #333;
57
+ }
58
+ #tipue_search_warning
59
+ {
60
+ font: 13px/1.6 'Open Sans', sans-serif;
61
+ color: #333;
62
+ margin: 7px 0;
63
+ }
64
+ #tipue_search_warning a
65
+ {
66
+ color: #096;
67
+ font-weight: 300;
68
+ text-decoration: none;
69
+ }
70
+ #tipue_search_warning a:hover
71
+ {
72
+ color: #333;
73
+ }
74
+ #tipue_search_results_count
75
+ {
76
+ font: 13px/1.6 'Open Sans', sans-serif;
77
+ color: #333;
78
+ }
79
+ .tipue_search_content_title
80
+ {
81
+ font: 300 23px/1.6 'Open Sans', sans-serif;
82
+ text-rendering: optimizelegibility;
83
+ }
84
+ .tipue_search_content_title a
85
+ {
86
+ color: #3f72d8;
87
+ text-decoration: none;
88
+ }
89
+ .tipue_search_content_title a:hover
90
+ {
91
+ color: #333;
92
+ }
93
+ .tipue_search_content_text
94
+ {
95
+ font: 13px/1.7 'Open Sans', sans-serif;
96
+ color: #333;
97
+ word-break: break-all;
98
+ word-break: break-word;
99
+ -webkit-hyphens: auto;
100
+ -moz-hyphens: auto;
101
+ hyphens: auto;
102
+ }
103
+ .tipue_search_content_loc
104
+ {
105
+ font: 300 13px/1.7 'Open Sans', sans-serif;
106
+ word-break: break-all;
107
+ word-break: break-word;
108
+ -webkit-hyphens: auto;
109
+ -moz-hyphens: auto;
110
+ hyphens: auto;
111
+ }
112
+ .tipue_search_content_loc a
113
+ {
114
+ color: #096;
115
+ text-decoration: none;
116
+ }
117
+ .tipue_search_content_loc a:hover
118
+ {
119
+ color: #333;
120
+ }
121
+ #tipue_search_foot
122
+ {
123
+ margin: 51px 0 21px 0;
124
+ }
125
+ #tipue_search_foot_boxes
126
+ {
127
+ padding: 0;
128
+ margin: 0;
129
+ font: 12px/1 'Open Sans', sans-serif;
130
+ }
131
+ #tipue_search_foot_boxes li
132
+ {
133
+ list-style: none;
134
+ margin: 0;
135
+ padding: 0;
136
+ display: inline;
137
+ }
138
+ #tipue_search_foot_boxes li a
139
+ {
140
+ padding: 9px 15px 10px 15px;
141
+ background-color: #f1f1f1;
142
+ border: 1px solid #dcdcdc;
143
+ border-radius: 1px;
144
+ color: #333;
145
+ margin-right: 7px;
146
+ text-decoration: none;
147
+ text-align: center;
148
+ }
149
+ #tipue_search_foot_boxes li.current
150
+ {
151
+ padding: 9px 15px 10px 15px;
152
+ background: #fff;
153
+ border: 1px solid #dcdcdc;
154
+ border-radius: 1px;
155
+ color: #333;
156
+ margin-right: 7px;
157
+ text-align: center;
158
+ }
159
+ #tipue_search_foot_boxes li a:hover
160
+ {
161
+ border: 1px solid #ccc;
162
+ background-color: #f3f3f3;
163
+ }
@@ -1,10 +1,10 @@
1
1
 
2
2
  /*
3
- Tipue Search 4.0
4
- Copyright (c) 2014 Tipue
3
+ Tipue Search 3.1
4
+ Copyright (c) 2013 Tipue
5
5
  Tipue Search is released under the MIT License
6
6
  http://www.tipue.com/search
7
- */
7
+ */
8
8
 
9
9
 
10
10
  (function($) {
@@ -12,7 +12,7 @@ http://www.tipue.com/search
12
12
  $.fn.tipuesearch = function(options) {
13
13
 
14
14
  var set = $.extend( {
15
-
15
+
16
16
  'show' : 7,
17
17
  'newWindow' : false,
18
18
  'showURL' : true,
@@ -24,9 +24,9 @@ http://www.tipue.com/search
24
24
  'liveDescription' : '*',
25
25
  'liveContent' : '*',
26
26
  'contentLocation' : 'tipuesearch/tipuesearch_content.json'
27
-
27
+
28
28
  }, options);
29
-
29
+ console.write("foo");
30
30
  return this.each(function() {
31
31
 
32
32
  var tipuesearch_in = {
@@ -47,7 +47,7 @@ http://www.tipue.com/search
47
47
  cont = cont.replace(/\s+/g, ' ');
48
48
  var desc = $(set.liveDescription, html).text();
49
49
  desc = desc.replace(/\s+/g, ' ');
50
-
50
+
51
51
  var t_1 = html.toLowerCase().indexOf('<title>');
52
52
  var t_2 = html.toLowerCase().indexOf('</title>', t_1 + 7);
53
53
  if (t_1 != -1 && t_2 != -1)
@@ -63,13 +63,13 @@ http://www.tipue.com/search
63
63
  "title": tit,
64
64
  "text": desc,
65
65
  "tags": cont,
66
- "loc": tipuesearch_pages[i]
67
- });
66
+ "loc": tipuesearch_pages[i]
67
+ });
68
68
  }
69
69
  );
70
70
  }
71
71
  }
72
-
72
+
73
73
  if (set.mode == 'json')
74
74
  {
75
75
  $.getJSON(set.contentLocation,
@@ -83,12 +83,12 @@ http://www.tipue.com/search
83
83
  if (set.mode == 'static')
84
84
  {
85
85
  tipuesearch_in = $.extend({}, tipuesearch);
86
- }
87
-
86
+ }
87
+
88
88
  var tipue_search_w = '';
89
89
  if (set.newWindow)
90
90
  {
91
- tipue_search_w = ' target="_blank"';
91
+ tipue_search_w = ' target="_blank"';
92
92
  }
93
93
 
94
94
  function getURLP(name)
@@ -99,8 +99,12 @@ http://www.tipue.com/search
99
99
  {
100
100
  $('#tipue_search_input').val(getURLP('q'));
101
101
  getTipueSearch(0, true);
102
- }
103
-
102
+ }
103
+
104
+ $('#tipue_search_button').click(function()
105
+ {
106
+ getTipueSearch(0, true);
107
+ });
104
108
  $(this).keyup(function(event)
105
109
  {
106
110
  if(event.keyCode == '13')
@@ -116,136 +120,71 @@ http://www.tipue.com/search
116
120
  var results = '';
117
121
  var show_replace = false;
118
122
  var show_stop = false;
119
- var standard = true;
120
- var c = 0;
121
- found = new Array();
122
-
123
+
123
124
  var d = $('#tipue_search_input').val().toLowerCase();
124
125
  d = $.trim(d);
125
-
126
- if ((d.match("^\"") && d.match("\"$")) || (d.match("^'") && d.match("'$")))
126
+ var d_w = d.split(' ');
127
+ d = '';
128
+ for (var i = 0; i < d_w.length; i++)
127
129
  {
128
- standard = false;
129
- }
130
-
131
- if (standard)
132
- {
133
- var d_w = d.split(' ');
134
- d = '';
135
- for (var i = 0; i < d_w.length; i++)
130
+ var a_w = true;
131
+ for (var f = 0; f < tipuesearch_stop_words.length; f++)
136
132
  {
137
- var a_w = true;
138
- for (var f = 0; f < tipuesearch_stop_words.length; f++)
133
+ if (d_w[i] == tipuesearch_stop_words[f])
139
134
  {
140
- if (d_w[i] == tipuesearch_stop_words[f])
141
- {
142
- a_w = false;
143
- show_stop = true;
144
- }
145
- }
146
- if (a_w)
147
- {
148
- d = d + ' ' + d_w[i];
135
+ a_w = false;
136
+ show_stop = true;
149
137
  }
150
138
  }
151
- d = $.trim(d);
152
- d_w = d.split(' ');
153
- }
154
- else
155
- {
156
- d = d.substring(1, d.length - 1);
139
+ if (a_w)
140
+ {
141
+ d = d + ' ' + d_w[i];
142
+ }
157
143
  }
158
-
144
+ d = $.trim(d);
145
+ d_w = d.split(' ');
146
+
159
147
  if (d.length >= set.minimumLength)
160
148
  {
161
- if (standard)
149
+ if (replace)
162
150
  {
163
- if (replace)
164
- {
165
- var d_r = d;
166
- for (var i = 0; i < d_w.length; i++)
167
- {
168
- for (var f = 0; f < tipuesearch_replace.words.length; f++)
169
- {
170
- if (d_w[i] == tipuesearch_replace.words[f].word)
171
- {
172
- d = d.replace(d_w[i], tipuesearch_replace.words[f].replace_with);
173
- show_replace = true;
174
- }
175
- }
176
- }
177
- d_w = d.split(' ');
178
- }
179
-
180
- var d_t = d;
151
+ var d_r = d;
181
152
  for (var i = 0; i < d_w.length; i++)
182
153
  {
183
- for (var f = 0; f < tipuesearch_stem.words.length; f++)
154
+ for (var f = 0; f < tipuesearch_replace.words.length; f++)
184
155
  {
185
- if (d_w[i] == tipuesearch_stem.words[f].word)
156
+ if (d_w[i] == tipuesearch_replace.words[f].word)
186
157
  {
187
- d_t = d_t + ' ' + tipuesearch_stem.words[f].stem;
158
+ d = d.replace(d_w[i], tipuesearch_replace.words[f].replace_with);
159
+ show_replace = true;
188
160
  }
189
161
  }
190
162
  }
191
- d_w = d_t.split(' ');
163
+ d_w = d.split(' ');
164
+ }
192
165
 
193
- for (var i = 0; i < tipuesearch_in.pages.length; i++)
166
+ var d_t = d;
167
+ for (var i = 0; i < d_w.length; i++)
168
+ {
169
+ for (var f = 0; f < tipuesearch_stem.words.length; f++)
194
170
  {
195
- var score = 1000000000;
196
- var s_t = tipuesearch_in.pages[i].text;
197
- for (var f = 0; f < d_w.length; f++)
198
- {
199
- var pat = new RegExp(d_w[f], 'i');
200
- if (tipuesearch_in.pages[i].title.search(pat) != -1)
201
- {
202
- score -= (200000 - i);
203
- }
204
- if (tipuesearch_in.pages[i].text.search(pat) != -1)
205
- {
206
- score -= (150000 - i);
207
- }
208
-
209
- if (set.highlightTerms)
210
- {
211
- if (set.highlightEveryTerm)
212
- {
213
- var patr = new RegExp('(' + d_w[f] + ')', 'gi');
214
- }
215
- else
216
- {
217
- var patr = new RegExp('(' + d_w[f] + ')', 'i');
218
- }
219
- s_t = s_t.replace(patr, "<span class=\"h01\">$1</span>");
220
- }
221
- if (tipuesearch_in.pages[i].tags.search(pat) != -1)
222
- {
223
- score -= (100000 - i);
224
- }
225
-
226
- if (d_w[f].match("^-"))
227
- {
228
- pat = new RegExp(d_w[f].substring(1), 'i');
229
- if (tipuesearch_in.pages[i].title.search(pat) != -1 || tipuesearch_in.pages[i].text.search(pat) != -1 || tipuesearch_in.pages[i].tags.search(pat) != -1)
230
- {
231
- score = 1000000000;
232
- }
233
- }
234
- }
235
-
236
- if (score < 1000000000)
171
+ if (d_w[i] == tipuesearch_stem.words[f].word)
237
172
  {
238
- found[c++] = score + '^' + tipuesearch_in.pages[i].title + '^' + s_t + '^' + tipuesearch_in.pages[i].loc;
173
+ d_t = d_t + ' ' + tipuesearch_stem.words[f].stem;
239
174
  }
240
175
  }
241
176
  }
242
- else
177
+ d_w = d_t.split(' ');
178
+
179
+ var c = 0;
180
+ found = new Array();
181
+ for (var i = 0; i < tipuesearch_in.pages.length; i++)
243
182
  {
244
- for (var i = 0; i < tipuesearch_in.pages.length; i++)
183
+ var score = 1000000000;
184
+ var s_t = tipuesearch_in.pages[i].text;
185
+ for (var f = 0; f < d_w.length; f++)
245
186
  {
246
- var score = 1000000000;
247
- var s_t = tipuesearch_in.pages[i].text;
248
- var pat = new RegExp(d, 'i');
187
+ var pat = new RegExp(d_w[f], 'i');
249
188
  if (tipuesearch_in.pages[i].title.search(pat) != -1)
250
189
  {
251
190
  score -= (200000 - i);
@@ -254,37 +193,37 @@ http://www.tipue.com/search
254
193
  {
255
194
  score -= (150000 - i);
256
195
  }
257
-
196
+
258
197
  if (set.highlightTerms)
259
198
  {
260
- if (set.highlightEveryTerm)
199
+ if (set.highlightEveryTerm)
261
200
  {
262
- var patr = new RegExp('(' + d + ')', 'gi');
201
+ var patr = new RegExp('(' + d_w[f] + ')', 'gi');
263
202
  }
264
203
  else
265
204
  {
266
- var patr = new RegExp('(' + d + ')', 'i');
205
+ var patr = new RegExp('(' + d_w[f] + ')', 'i');
267
206
  }
268
- s_t = s_t.replace(patr, "<span class=\"h01\">$1</span>");
207
+ s_t = s_t.replace(patr, "<b>$1</b>");
269
208
  }
270
209
  if (tipuesearch_in.pages[i].tags.search(pat) != -1)
271
210
  {
272
211
  score -= (100000 - i);
273
212
  }
274
-
275
- if (score < 1000000000)
276
- {
277
- found[c++] = score + '^' + tipuesearch_in.pages[i].title + '^' + s_t + '^' + tipuesearch_in.pages[i].loc;
278
- }
213
+
214
+ }
215
+ if (score < 1000000000)
216
+ {
217
+ found[c++] = score + '^' + tipuesearch_in.pages[i].title + '^' + s_t + '^' + tipuesearch_in.pages[i].loc;
279
218
  }
280
- }
281
-
219
+ }
220
+
282
221
  if (c != 0)
283
222
  {
284
223
  if (show_replace == 1)
285
224
  {
286
225
  out += '<div id="tipue_search_warning_head">Showing results for ' + d + '</div>';
287
- out += '<div id="tipue_search_warning">Search instead for <a href="javascript:void(0)" id="tipue_search_replaced">' + d_r + '</a></div>';
226
+ out += '<div id="tipue_search_warning">Search for <a href="javascript:void(0)" id="tipue_search_replaced">' + d_r + '</a></div>';
288
227
  }
289
228
  if (c == 1)
290
229
  {
@@ -295,21 +234,16 @@ http://www.tipue.com/search
295
234
  c_c = c.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
296
235
  out += '<div id="tipue_search_results_count">' + c_c + ' results</div>';
297
236
  }
298
-
237
+
299
238
  found.sort();
300
239
  var l_o = 0;
301
240
  for (var i = 0; i < found.length; i++)
302
241
  {
303
242
  var fo = found[i].split('^');
304
243
  if (l_o >= start && l_o < set.show + start)
305
- {
244
+ {
306
245
  out += '<div class="tipue_search_content_title"><a href="' + fo[3] + '"' + tipue_search_w + '>' + fo[1] + '</a></div>';
307
-
308
- if (set.showURL)
309
- {
310
- out += '<div class="tipue_search_content_url"><a href="' + fo[3] + '"' + tipue_search_w + '>' + fo[3] + '</a></div>';
311
- }
312
-
246
+
313
247
  var t = fo[2];
314
248
  var t_d = '';
315
249
  var t_w = t.split(' ');
@@ -321,7 +255,7 @@ http://www.tipue.com/search
321
255
  {
322
256
  for (var f = 0; f < set.descriptiveWords; f++)
323
257
  {
324
- t_d += t_w[f] + ' ';
258
+ t_d += t_w[f] + ' ';
325
259
  }
326
260
  }
327
261
  t_d = $.trim(t_d);
@@ -330,28 +264,33 @@ http://www.tipue.com/search
330
264
  t_d += ' ...';
331
265
  }
332
266
  out += '<div class="tipue_search_content_text">' + t_d + '</div>';
267
+
268
+ if (set.showURL)
269
+ {
270
+ out += '<div class="tipue_search_content_loc"><a href="' + fo[3] + '"' + tipue_search_w + '>' + fo[3] + '</a></div>';
271
+ }
333
272
  }
334
- l_o++;
273
+ l_o++;
335
274
  }
336
-
275
+
337
276
  if (c > set.show)
338
277
  {
339
278
  var pages = Math.ceil(c / set.show);
340
279
  var page = (start / set.show);
341
280
  out += '<div id="tipue_search_foot"><ul id="tipue_search_foot_boxes">';
342
-
281
+
343
282
  if (start > 0)
344
283
  {
345
- out += '<li><a href="javascript:void(0)" class="tipue_search_foot_box" id="' + (start - set.show) + '_' + replace + '">Prev</a></li>';
284
+ out += '<li><a href="javascript:void(0)" class="tipue_search_foot_box" id="' + (start - set.show) + '_' + replace + '">&#171; Prev</a></li>';
346
285
  }
347
-
286
+
348
287
  if (page <= 2)
349
288
  {
350
289
  var p_b = pages;
351
290
  if (pages > 3)
352
291
  {
353
292
  p_b = 3;
354
- }
293
+ }
355
294
  for (var f = 0; f < p_b; f++)
356
295
  {
357
296
  if (f == page)
@@ -366,12 +305,12 @@ http://www.tipue.com/search
366
305
  }
367
306
  else
368
307
  {
369
- var p_b = page + 2;
308
+ var p_b = pages + 2;
370
309
  if (p_b > pages)
371
310
  {
372
- p_b = pages;
311
+ p_b = pages;
373
312
  }
374
- for (var f = page - 1; f < p_b; f++)
313
+ for (var f = page; f < p_b; f++)
375
314
  {
376
315
  if (f == page)
377
316
  {
@@ -382,26 +321,26 @@ http://www.tipue.com/search
382
321
  out += '<li><a href="javascript:void(0)" class="tipue_search_foot_box" id="' + (f * set.show) + '_' + replace + '">' + (f + 1) + '</a></li>';
383
322
  }
384
323
  }
385
- }
386
-
324
+ }
325
+
387
326
  if (page + 1 != pages)
388
327
  {
389
- out += '<li><a href="javascript:void(0)" class="tipue_search_foot_box" id="' + (start + set.show) + '_' + replace + '">Next</a></li>';
390
- }
391
-
328
+ out += '<li><a href="javascript:void(0)" class="tipue_search_foot_box" id="' + (start + set.show) + '_' + replace + '">Next &#187;</a></li>';
329
+ }
330
+
392
331
  out += '</ul></div>';
393
- }
332
+ }
394
333
  }
395
334
  else
396
335
  {
397
- out += '<div id="tipue_search_warning_head">Nothing found</div>';
336
+ out += '<div id="tipue_search_warning_head">Nothing found</div>';
398
337
  }
399
338
  }
400
339
  else
401
340
  {
402
341
  if (show_stop)
403
342
  {
404
- out += '<div id="tipue_search_warning_head">Nothing found</div><div id="tipue_search_warning">Common words are largely ignored</div>';
343
+ out += '<div id="tipue_search_warning_head">Nothing found</div><div id="tipue_search_warning">Common words are largely ignored</div>';
405
344
  }
406
345
  else
407
346
  {
@@ -416,29 +355,25 @@ http://www.tipue.com/search
416
355
  }
417
356
  }
418
357
  }
419
-
358
+
420
359
  $('#tipue_search_content').html(out);
421
360
  $('#tipue_search_content').slideDown(200);
422
-
361
+
423
362
  $('#tipue_search_replaced').click(function()
424
363
  {
425
364
  getTipueSearch(0, false);
426
- });
427
-
365
+ });
366
+
428
367
  $('.tipue_search_foot_box').click(function()
429
368
  {
430
369
  var id_v = $(this).attr('id');
431
370
  var id_a = id_v.split('_');
432
-
371
+
433
372
  getTipueSearch(parseInt(id_a[0]), id_a[1]);
434
- });
435
- }
436
-
373
+ });
374
+ }
375
+
437
376
  });
438
377
  };
439
-
440
- })(jQuery);
441
-
442
-
443
-
444
378
 
379
+ })(jQuery);