coursegen 0.3.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/Gemfile.lock +50 -46
  4. data/coursegen.gemspec +2 -3
  5. data/deleteme.rb +2 -0
  6. data/lib/coursegen/cli.rb +5 -3
  7. data/lib/coursegen/course/data/citem.rb +26 -27
  8. data/lib/coursegen/course/data/data_adaptor.rb +5 -1
  9. data/lib/coursegen/course/data/lectures.rb +84 -72
  10. data/lib/coursegen/course/data/section.rb +53 -53
  11. data/lib/coursegen/course/data/section_def.rb +6 -6
  12. data/lib/coursegen/course/data/toc.rb +1 -2
  13. data/lib/coursegen/course/helpers/bootstrap_markup.rb +3 -2
  14. data/lib/coursegen/course/helpers/content_helpers.rb +121 -75
  15. data/lib/coursegen/course/helpers/ical_feed_helpers.rb +1 -1
  16. data/lib/coursegen/course/helpers/list_of.rb +12 -12
  17. data/lib/coursegen/course/helpers/list_of_helpers.rb +2 -2
  18. data/lib/coursegen/course/helpers/navigation_helpers.rb +35 -26
  19. data/lib/coursegen/course/helpers/sidebar_helpers.rb +12 -16
  20. data/lib/coursegen/course/lib/ical_adaptor.rb +3 -5
  21. data/lib/coursegen/course/lib/search_data_generator.rb +3 -4
  22. data/lib/coursegen/course/schedule/schedule_def.rb +12 -11
  23. data/lib/coursegen/course/schedule/schedule_feed.rb +3 -1
  24. data/lib/coursegen/course/schedule/scheduler.rb +20 -13
  25. data/lib/coursegen/version.rb +1 -1
  26. data/lib/coursegen.rb +10 -9
  27. data/spec/play_spec.rb +15 -19
  28. data/spec/scheduler_spec.rb +59 -63
  29. data/spec/spec_helper.rb +1 -1
  30. data/spec/toc_spec.rb +69 -71
  31. data/tech_debt.md +0 -3
  32. data/templates/Guardfile +2 -2
  33. data/templates/body_footer.html +8 -0
  34. data/templates/body_header.html.erb +6 -0
  35. data/templates/cg_config.rb +8 -7
  36. data/templates/content/bootstrap/css/custom.css +25 -8
  37. data/templates/content/content/intro/course_toc.md.erb +1 -1
  38. data/templates/course.html +59 -0
  39. data/templates/helpful_box.html +3 -0
  40. data/templates/layouts/body_header.html.erb +1 -1
  41. data/templates/layouts/course.html +3 -2
  42. data/templates/layouts/main_navbar.html.erb +1 -1
  43. data/templates/main_navbar.html.erb +21 -0
  44. metadata +22 -16
@@ -1,22 +1,22 @@
1
- WEEKDAYS = { sunday: 0, monday: 1, tuesday: 2,
2
- wednesday: 3, thursday: 4, friday: 5, saturday: 6 }
1
+ WEEKDAYS = {sunday: 0, monday: 1, tuesday: 2,
2
+ wednesday: 3, thursday: 4, friday: 5, saturday: 6}
3
3
 
4
4
  # Calculate days on which each event occurs, based on the configuration info
5
5
  class Scheduler
6
- attr_reader :start_time, :end_time
6
+ attr_reader :start_time, :end_time, :start_times, :end_times, :event_start_times, :event_end_times
7
7
 
8
8
  def self.add_weeks(the_date, number)
9
9
  the_date.to_date + Integer(number) * 7
10
10
  end
11
11
 
12
12
  def setup_from_args(start: nil, weekdays: nil, number: nil, skips: [],
13
- start_time: 0, end_time: 0)
13
+ start_time: 0, end_time: 0, start_times: [], end_times: [])
14
14
  if start.nil?
15
15
  @start = nil
16
16
  return
17
17
  end
18
18
  convert_and_verify_arguments(start, weekdays, number,
19
- skips, start_time, end_time)
19
+ skips, start_time, end_time, start_times, end_times)
20
20
  @weekdays.sort!
21
21
  recalc_event_map
22
22
  end
@@ -27,7 +27,7 @@ class Scheduler
27
27
  return
28
28
  end
29
29
  setup_from_args(start: sdef.first_day, weekdays: sdef.weekdays,
30
- number: sdef.number, skips: sdef.skips, start_time: sdef.start_time, end_time: sdef.end_time)
30
+ number: sdef.number, skips: sdef.skips, start_time: sdef.start_time, end_time: sdef.end_time, start_times: sdef.start_times, end_times: sdef.end_times)
31
31
  end
32
32
 
33
33
  def event_date_by_index(ind)
@@ -43,18 +43,23 @@ class Scheduler
43
43
  def recalc_event_map
44
44
  return if self.null?
45
45
  @event_dates = []
46
+ @event_start_times = []
47
+ @event_end_times = []
46
48
  wkdy_of_start = @start_date.cwday
47
49
  wkday_index = @weekdays.find_index(wkdy_of_start)
48
50
  curr_event_date = @start_date
49
- @number.times do
50
- |i|
51
- @event_dates << curr_event_date unless @skips.include? curr_event_date
51
+ @number.times do |i|
52
+ unless @skips.include? curr_event_date
53
+ @event_dates << curr_event_date
54
+ @event_start_times << @start_times[wkday_index]
55
+ @event_end_times << @end_times[wkday_index]
56
+ end
52
57
  if @weekdays.length == 1
53
58
  curr_event_date += 7
54
- elsif wkday_index < @weekdays.length-1
59
+ elsif wkday_index < @weekdays.length - 1
55
60
  wkday_index += 1
56
- curr_event_date += @weekdays[wkday_index] - @weekdays[wkday_index-1]
57
- elsif wkday_index == @weekdays.length-1
61
+ curr_event_date += @weekdays[wkday_index] - @weekdays[wkday_index - 1]
62
+ elsif wkday_index == @weekdays.length - 1
58
63
  wkday_index = 0 # wrap
59
64
  curr_event_date += 7 + @weekdays.first - @weekdays.last
60
65
  end
@@ -62,7 +67,7 @@ class Scheduler
62
67
  end
63
68
 
64
69
  def convert_and_verify_arguments(start, weekdays, number, skips,
65
- start_time, end_time)
70
+ start_time, end_time, start_times, end_times)
66
71
  @number = number + skips.length
67
72
  @start_date = string_to_date(start)
68
73
  @skips = skips.map { |d| string_to_date(d) } rescue raise(ArgumentError, "Scheduler: Invalid skip date")
@@ -75,6 +80,8 @@ class Scheduler
75
80
 
76
81
  @start_time = time_span_to_seconds(start_time)
77
82
  @end_time = time_span_to_seconds(end_time)
83
+ @start_times = start_times.map { |x| time_span_to_seconds(x)}
84
+ @end_times = end_times.map { |x| time_span_to_seconds(x)}
78
85
  end
79
86
 
80
87
  def string_to_date(string_date)
@@ -1,3 +1,3 @@
1
1
  module Coursegen
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.2"
3
3
  end
data/lib/coursegen.rb CHANGED
@@ -1,16 +1,16 @@
1
1
  require 'nokogiri'
2
2
 
3
- require "coursegen/version"
4
- require "coursegen/course/helpers/sidebar_helpers"
5
- require "coursegen/course/helpers/lecture_helpers"
6
- require "coursegen/course/helpers/content_helpers"
7
- require "coursegen/course/helpers/logging_helpers"
8
- require "coursegen/course/helpers/list_of_helpers"
3
+ require 'coursegen/version'
4
+ require 'coursegen/course/helpers/sidebar_helpers'
5
+ require 'coursegen/course/helpers/lecture_helpers'
6
+ require 'coursegen/course/helpers/content_helpers'
7
+ require 'coursegen/course/helpers/logging_helpers'
8
+ require 'coursegen/course/helpers/list_of_helpers'
9
9
  require 'coursegen/course/helpers/bootstrap_markup'
10
10
  require 'coursegen/course/helpers/table_helpers'
11
- require "coursegen/course/helpers/navigation_helpers"
12
- require "coursegen/course/data/section"
13
- require "coursegen/course/data/toc"
11
+ require 'coursegen/course/helpers/navigation_helpers'
12
+ require 'coursegen/course/data/section'
13
+ require 'coursegen/course/data/toc'
14
14
  require 'coursegen/course/data/citem'
15
15
  require 'coursegen/course/schedule/schedule_def'
16
16
  require 'coursegen/course/data/section_def'
@@ -24,6 +24,7 @@ require 'coursegen/course/helpers/list_of'
24
24
  require 'coursegen/course/helpers/ical_feed_helpers'
25
25
  require 'coursegen/course/lib/helpers_'
26
26
 
27
+
27
28
  module Coursegen
28
29
  # Your code goes here...
29
30
  end
data/spec/play_spec.rb CHANGED
@@ -1,23 +1,19 @@
1
1
  require_relative "./spec_helper.rb"
2
2
  describe "Does it work?" do
3
- before do
4
- @abc = 1
5
- mocks1_templates =
6
- [["/lectures/intro/wonders/", "subsection", 0],
7
- ["/lectures/intro/wonders/page2/", "page", 1],
8
- ["/lectures/intro/wonders/page3/", "page", 2],
9
- ["/lectures/intro/wonder2/", "subsection", 1],
10
- ["/lectures/intro/wonder2/page22/", "page", 1],
11
- ["/lectures/intro/wonder2/page32/", "page",2 ]
12
- ]
13
- binding.pry
14
- @citems1 = mocks1_templates.map { |i, t, o| CItem.new(nil, i, t, o) }
15
- @sect = Lectures.new "intro", @citems1
16
- end
3
+ before do
4
+ @abc = 1
5
+ mocks1_templates =
6
+ [["/lectures/intro/wonders/", "subsection", 0],
7
+ ["/lectures/intro/wonders/page2/", "page", 1],
8
+ ["/lectures/intro/wonders/page3/", "page", 2],
9
+ ["/lectures/intro/wonder2/", "subsection", 1],
10
+ ["/lectures/intro/wonder2/page22/", "page", 1],
11
+ ["/lectures/intro/wonder2/page32/", "page", 2]]
12
+ @citems1 = mocks1_templates.map { |i, t, o| CItem.new(nil, i, t, o) }
13
+ @sect = Lectures.new "intro", @citems1
14
+ end
17
15
 
18
-
19
- it "correctly counts subsections" do
20
- binding.pry
21
- expect (@abc).to eq 1
22
- end
16
+ it "correctly counts subsections" do
17
+ expect (@abc).to eq 1
18
+ end
23
19
  end
@@ -7,75 +7,71 @@ def s2d(string_date)
7
7
  end
8
8
 
9
9
  describe Scheduler do
10
- let(:sched) {Scheduler.new}
11
- let(:target_date) {"nov-25-2013"}
12
- let(:target_date_bin) { s2d(target_date) }
10
+ let(:sched) {Scheduler.new}
11
+ let(:target_date) {"nov-25-2013"}
12
+ let(:target_date_bin) { s2d(target_date) }
13
13
 
14
- describe "Single day scheduler" do
15
- it "knows date for first event" do
16
- sched.setup_from_args(start: target_date, weekdays: [:monday], number: 1)
17
- a_date = sched.event_date_by_index 0
18
- expect(a_date).to eq target_date_bin
19
- end
14
+ describe "Single day scheduler" do
15
+ it "knows date for first event" do
16
+ sched.setup_from_args(start: target_date, weekdays: [:monday], number: 1)
17
+ a_date = sched.event_date_by_index 0
18
+ expect(a_date).to eq target_date_bin
19
+ end
20
20
 
21
- it "knows date for second event" do
22
- sched.setup_from_args(start: target_date, weekdays: [:monday] ,number: 2)
23
- a_date = sched.event_date_by_index 1
24
- expect(a_date).to eq target_date_bin + 7
25
- end
26
- end
21
+ it "knows date for second event" do
22
+ sched.setup_from_args(start: target_date, weekdays: [:monday], number: 2)
23
+ a_date = sched.event_date_by_index 1
24
+ expect(a_date).to eq target_date_bin + 7
25
+ end
26
+ end
27
27
 
28
- describe "Double day scheduler" do
29
- it "knows date for first event" do
30
- sched.setup_from_args(start: target_date, weekdays: [:monday, :tuesday] ,number: 1)
31
- a_date = sched.event_date_by_index 0
32
- expect(a_date).to eq target_date_bin
33
- end
28
+ describe "Double day scheduler" do
29
+ it "knows date for first event" do
30
+ sched.setup_from_args(start: target_date, weekdays: [:monday, :tuesday], number: 1)
31
+ a_date = sched.event_date_by_index 0
32
+ expect(a_date).to eq target_date_bin
33
+ end
34
34
 
35
- it "knows date for second event" do
36
- sched.setup_from_args(start: target_date, weekdays: [:monday, :tuesday] ,number: 2)
37
- a_date = sched.event_date_by_index 1
38
- expect(a_date).to eq target_date_bin + 1
39
- end
35
+ it "knows date for second event" do
36
+ sched.setup_from_args(start: target_date, weekdays: [:monday, :tuesday], number: 2)
37
+ a_date = sched.event_date_by_index 1
38
+ expect(a_date).to eq target_date_bin + 1
39
+ end
40
40
 
41
- it "knows date for third event" do
42
- sched.setup_from_args(start: target_date, weekdays: [:monday, :tuesday] ,number: 3)
43
- a_date = sched.event_date_by_index 2
44
- expect(a_date).to eq target_date_bin + 7
45
- end
41
+ it "knows date for third event" do
42
+ sched.setup_from_args(start: target_date, weekdays: [:monday, :tuesday], number: 3)
43
+ a_date = sched.event_date_by_index 2
44
+ expect(a_date).to eq target_date_bin + 7
45
+ end
46
46
 
47
- it "knows date for fourth event" do
48
- sched.setup_from_args(start: target_date, weekdays: [:monday, :tuesday] ,number: 4)
49
- a_date = sched.event_date_by_index 3
50
- expect(a_date).to eq target_date_bin + 7 + 1
51
- end
52
- end
47
+ it "knows date for fourth event" do
48
+ sched.setup_from_args(start: target_date, weekdays: [:monday, :tuesday], number: 4)
49
+ a_date = sched.event_date_by_index 3
50
+ expect(a_date).to eq target_date_bin + 7 + 1
51
+ end
52
+ end
53
53
 
54
- describe "Tripple day scheduler" do
55
- it "knows date for first event" do
56
- sched.setup_from_args(start: target_date, weekdays: [:monday, :wednesday, :friday], number: 1)
57
- a_date = sched.event_date_by_index 0
58
- expect(a_date).to eq target_date_bin
59
- end
60
- it "knows date for second event" do
61
- sched.setup_from_args(start: target_date, weekdays: [:monday, :wednesday, :friday], number: 2)
62
- a_date = sched.event_date_by_index 1
63
- expect(a_date).to eq target_date_bin + 2
64
- end
54
+ describe "Tripple day scheduler" do
55
+ it "knows date for first event" do
56
+ sched.setup_from_args(start: target_date, weekdays: [:monday, :wednesday, :friday], number: 1)
57
+ a_date = sched.event_date_by_index 0
58
+ expect(a_date).to eq target_date_bin
59
+ end
60
+ it "knows date for second event" do
61
+ sched.setup_from_args(start: target_date, weekdays: [:monday, :wednesday, :friday], number: 2)
62
+ a_date = sched.event_date_by_index 1
63
+ expect(a_date).to eq target_date_bin + 2
64
+ end
65
65
 
66
- it "knows date for third event" do
67
- sched.setup_from_args(start: target_date, weekdays: [:monday, :wednesday, :friday], number: 3)
68
- a_date = sched.event_date_by_index 2
69
- expect(a_date).to eq target_date_bin + 4
70
- end
71
- it "knows date for fourth event" do
72
- sched.setup_from_args(start: target_date, weekdays: [:monday, :wednesday, :friday], number: 4)
73
- a_date = sched.event_date_by_index 3
74
- expect(a_date).to eq target_date_bin + 7
75
- end
76
-
77
-
78
- end
66
+ it "knows date for third event" do
67
+ sched.setup_from_args(start: target_date, weekdays: [:monday, :wednesday, :friday], number: 3)
68
+ a_date = sched.event_date_by_index 2
69
+ expect(a_date).to eq target_date_bin + 4
70
+ end
71
+ it "knows date for fourth event" do
72
+ sched.setup_from_args(start: target_date, weekdays: [:monday, :wednesday, :friday], number: 4)
73
+ a_date = sched.event_date_by_index 3
74
+ expect(a_date).to eq target_date_bin + 7
75
+ end
76
+ end
79
77
  end
80
-
81
-
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'rspec'
2
- require 'pry-byebug'
2
+ require 'byebug'
3
3
  require './lib/coursegen/course/data/section'
4
4
  require './lib/coursegen/course/data/toc'
5
5
  require './lib/coursegen/course/data/lectures'
data/spec/toc_spec.rb CHANGED
@@ -1,86 +1,84 @@
1
1
  require_relative "./spec_helper.rb"
2
2
 
3
3
  class MockItem
4
- attr_accessor :identifier, :attributes
5
- def initialize name, att = {}
6
- @attributes = { :section => "lectures" }.merge(att)
7
- @identifier = name
8
- end
4
+ attr_accessor :identifier, :attributes
5
+ def initialize name, att = {}
6
+ @attributes = {section: "lectures"}.merge(att)
7
+ @identifier = name
8
+ end
9
9
 
10
- def [](index)
11
- @attributes[index]
12
- end
10
+ def [](index)
11
+ @attributes[index]
12
+ end
13
13
 
14
- def self.gen (names)
15
- items = []
16
- order = [5,2,12,4,8,3,1,6]
17
- names.each { |nm| items << MockItem.new(nm, {order: order.pop}) }
18
- items
19
- end
14
+ def self.gen(names)
15
+ items = []
16
+ order = [5, 2, 12, 4, 8, 3, 1, 6]
17
+ names.each { |nm| items << MockItem.new(nm, {order: order.pop}) }
18
+ items
19
+ end
20
20
  end
21
21
 
22
22
  describe Toc do
23
- context "simple sections" do
24
- let(:items) {
25
- MockItem.gen(
26
- %w(/content/lectures/hypotheses/
27
- /content/lectures/ideation/
28
- /content/lectures/lean_immersion/welcome/
29
- /content/lectures/lean_startup/) ) }
23
+ context "simple sections" do
24
+ let(:items) do
25
+ MockItem.gen(
26
+ %w(/content/lectures/hypotheses/
27
+ /content/lectures/ideation/
28
+ /content/lectures/lean_immersion/welcome/
29
+ /content/lectures/lean_startup/))
30
+ end
30
31
 
31
- it "initializes" do
32
- toc = Toc.instance
33
- toc.reset
34
- toc.prepare items, [SectionDef.new("Lectures", "lectures", type: :section)]
35
- end
36
- end
32
+ it "initializes" do
33
+ toc = Toc.instance
34
+ toc.reset
35
+ toc.prepare items, [SectionDef.new("Lectures", "lectures", type: :section)]
36
+ end
37
+ end
37
38
 
38
- context "a little more complicated" do
39
+ context "a little more complicated" do
40
+ describe "next and previous methods" do
41
+ let(:items) do
42
+ MockItem.gen(%w(/content/lectures/a/
43
+ /content/lectures/b/
44
+ /content/lectures/c/
45
+ /content/lectures/d/))
46
+ end
39
47
 
40
- describe "next and previous methods" do
41
- let(:items) {
42
- MockItem.gen(%w(/content/lectures/a/
43
- /content/lectures/b/
44
- /content/lectures/c/
45
- /content/lectures/d/) )
46
- }
48
+ before(:each) do
49
+ @toc = Toc.instance
50
+ @toc.reset
51
+ @toc.prepare items, [SectionDef.new("Lectures", "lectures", type: :section)]
52
+ end
47
53
 
48
- before (:each) do
49
- @toc = Toc.instance
50
- @toc.reset
51
- @toc.prepare items, [SectionDef.new("Lectures", "lectures", type: :section)]
52
- end
54
+ it "next" do
55
+ sect = @toc.section("lectures")
56
+ cprev = sect[1]
57
+ c_plus_one = @toc.find_next_for(cprev)
58
+ expect(c_plus_one.title).to eq sect[2].title
59
+ end
53
60
 
54
- it "next" do
55
- sect = @toc.section("lectures")
56
- cprev = sect[1]
57
- c_plus_one = @toc.find_next_for(cprev)
58
- expect(c_plus_one.title).to eq sect[2].title
59
- end
61
+ it "prev" do
62
+ sect = @toc.section("lectures")
63
+ cprev = sect[2]
64
+ c_plus_one = @toc.find_previous_for(cprev)
65
+ expect(c_plus_one.title).to eq sect[1].title
66
+ end
67
+ end
68
+ end
60
69
 
61
- it "prev" do
62
- sect = @toc.section("lectures")
63
- cprev = sect[2]
64
- c_plus_one = @toc.find_previous_for(cprev)
65
- expect(c_plus_one.title).to eq sect[1].title
66
- end
67
- end
68
- end
70
+ context "lookup and access methods" do
71
+ let(:items) do
72
+ MockItem.gen(%w(/content/lectures/a/
73
+ /content/lectures/b/
74
+ /content/lectures/c/
75
+ /content/lectures/d/))
76
+ end
69
77
 
70
- context "lookup and access methods" do
71
- let(:items) {
72
- MockItem.gen(%w(/content/lectures/a/
73
- /content/lectures/b/
74
- /content/lectures/c/
75
- /content/lectures/d/) )
76
- }
77
-
78
- before (:each) do
79
- @toc = Toc.instance
80
- @toc.reset
81
- @toc.prepare items, [SectionDef.new("Lectures", "lectures", type: :section)]
82
- end
83
-
84
-
85
- end
86
- end
78
+ before(:each) do
79
+ @toc = Toc.instance
80
+ @toc.reset
81
+ @toc.prepare items, [SectionDef.new("Lectures", "lectures", type: :section)]
82
+ end
83
+ end
84
+ end
data/tech_debt.md CHANGED
@@ -8,6 +8,3 @@
8
8
  * Clean up the placement of the .js files for the search stuff. It's a bit messy
9
9
 
10
10
  ### Features
11
-
12
- * Add a macro for <%= link_to_next_lecture %>
13
- * Add a way to automatically generate a list of homeworks on a single page
data/templates/Guardfile CHANGED
@@ -2,8 +2,8 @@
2
2
  # watch(%r{file/path}) { `command(s)` }
3
3
  #
4
4
  guard :shell do
5
- clearing :on
6
- directories %w(. /mydev/cg-topics)
5
+ clearing :on
6
+ directories %w(. /mydev/cg-topics)
7
7
  watch(/.erb/) { |m| `cg compile` }
8
8
  watch(/(cg_config.rb|Rules)/) { |m| `cg reset; cg compile`}
9
9
  end
@@ -0,0 +1,8 @@
1
+ <div class="container">
2
+ <div class="row">
3
+ <div class="col-xs-12">
4
+ <footer><%= COPYRIGHT_STRING %></footer>
5
+ </div>
6
+ </div>
7
+ </div>
8
+
@@ -0,0 +1,6 @@
1
+ <h3 class="body-header">
2
+ <%= citem.title %>
3
+ <% if citem.lecture? %>
4
+ <small class="pull-right">(<%= citem.lecture_date_s %>, <%= citem.lecture_number_s.to_s %>)</small>
5
+ <% end %>
6
+ </h3>
@@ -9,13 +9,14 @@ COURSE_LONG_NAME = "Sample Coursegen Course"
9
9
  COURSE_ABBREV = "SC"
10
10
 
11
11
  LECTURES_SCHEDULE_CONFIG = ScheduleDef.new(
12
- first_day: "aug-11-2015",
13
- weekdays: [:tuesday, :friday],
14
- number: 26,
15
- skips: [],
16
- start_time: "15:00",
17
- end_time: "16:20")
18
-
12
+ first_day: "jan-17-2017",
13
+ weekdays: [:tuesday, :wednesday, :thursday],
14
+ start_times: ["15:30", "14:00", "15:30"],
15
+ end_times: ["16:50", "16:00", "16:50"],
16
+ number: 39,
17
+ start_time: "15:30",
18
+ end_time: "16:50",
19
+ skips: ["feb-9-2017", "feb-21-2017", "feb-22-2017", "feb-23-2017", "apr-11-2017", "apr-12-2017", "apr-13-2017", "apr-18-2017", "apr-19-2017"])
19
20
 
20
21
  # Sections in the right hand margin of the page
21
22
  SECTION_CONFIG = [
@@ -1,19 +1,24 @@
1
1
  @import url(//fonts.googleapis.com/css?family=Telex);
2
2
 
3
- .navbar-inverse {
4
- background-color: black;
3
+ .themefg {
4
+ color: rgb(47, 86, 111);
5
5
  }
6
6
 
7
- .navbar a.navbar-brand {
7
+ .themebg {
8
+ background-color: rgb(47, 86, 111);
9
+ }
10
+
11
+ .navbar a.navbar-title {
8
12
  color: white;
9
13
  padding-top: 7px;
10
14
  }
11
-
15
+
12
16
  .navbar {
13
17
  min-height: 35px;
14
18
  margin-bottom: 1px;
15
19
  }
16
20
 
21
+
17
22
  .navbar a:hover {
18
23
  color: white;
19
24
  }
@@ -23,6 +28,13 @@
23
28
  color: light-blue;
24
29
  }
25
30
 
31
+ .navbar-title {
32
+ float: left;
33
+ height: 30px;
34
+ font-size: 18px;
35
+ line-height: 20px
36
+ }
37
+
26
38
  .navbar .input-group-sm input{
27
39
  height: 22px;
28
40
  width: 150px;
@@ -38,6 +50,10 @@ h3 {
38
50
  margin-bottom: 15px;
39
51
  }
40
52
 
53
+ h3.body-header {
54
+ margin-bottom: -5px;
55
+ }
56
+
41
57
  h4 {
42
58
  margin-top: 20px;
43
59
  border-top: gainsboro solid 1px;
@@ -98,7 +114,7 @@ footer {
98
114
  }
99
115
 
100
116
  .glyphicon-small {
101
- font-size: 10px;
117
+ font-size: 10px;
102
118
  }
103
119
 
104
120
  /* Search Page */
@@ -178,8 +194,10 @@ div.tipue_search_content_loc a {
178
194
  background-color: #f3f3f3;
179
195
  }
180
196
 
181
-
182
-
197
+ .helpful
198
+ {
199
+ visibility: hidden;
200
+ }
183
201
 
184
202
  @media (max-width: 980px) {
185
203
 
@@ -190,4 +208,3 @@ div.tipue_search_content_loc a {
190
208
  padding-right: 5px;
191
209
  }
192
210
  }
193
-
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  title: List of lectures
3
3
  ---
4
- <%= list_of(source: "lectures", rows: ["subsection","page"], cols: [:number, :date, :title, :desc, :homework]) %>
4
+ <%= list_of(source: "lectures", rows: ["subsection","page"], cols: [:number, :date, :title, :desc, :homework], items: @items) %>