coursegen 0.7.1 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +43 -35
  3. data/lib/coursegen/course/data/citem.rb +2 -1
  4. data/lib/coursegen/course/data/data_adaptor.rb +2 -0
  5. data/lib/coursegen/course/helpers/content_helpers.rb +79 -37
  6. data/lib/coursegen/course/helpers/list_of_helpers.rb +1 -0
  7. data/lib/coursegen/templates.rb +0 -3
  8. data/lib/coursegen/version.rb +1 -1
  9. data/templates/Guardfile +3 -3
  10. data/templates/Rules +21 -42
  11. data/templates/cg_config.rb +2 -1
  12. data/templates/cg_config.rb_sample +24 -30
  13. data/templates/content/bootstrap/css/custom.css +65 -23
  14. data/templates/content/bootstrap/css/full-width-pics.css +64 -0
  15. data/templates/content/bootstrap/css/prettyquote.css +31 -0
  16. data/templates/content/bootstrap/css/tipuesearch.css +163 -0
  17. data/templates/content/bootstrap/images/image1.jpg +0 -0
  18. data/templates/content/bootstrap/images/image10.jpg +0 -0
  19. data/templates/content/bootstrap/images/image2.jpg +0 -0
  20. data/templates/content/bootstrap/images/image22.jpg +0 -0
  21. data/templates/content/bootstrap/images/image3.png +0 -0
  22. data/templates/content/bootstrap/images/image4.jpg +0 -0
  23. data/templates/content/bootstrap/images/image8.jpg +0 -0
  24. data/templates/content/bootstrap/images/image8.png +0 -0
  25. data/templates/content/bootstrap/images/image9.jpg +0 -0
  26. data/templates/content/{tipuesearch/img → bootstrap/images}/loader.gif +0 -0
  27. data/templates/content/bootstrap/images/search.png +0 -0
  28. data/templates/content/{tipuesearch/tipuesearchnomin.js → bootstrap/js/tipuesearch.js} +106 -171
  29. data/templates/content/bootstrap/js/tipuesearch.min.js +12 -0
  30. data/templates/content/bootstrap/js/tipuesearch_content.js +13 -0
  31. data/templates/content/{tipuesearch → bootstrap/js}/tipuesearch_set.js +8 -7
  32. data/templates/content/content/intro/course_toc.md.erb +1 -0
  33. data/templates/layouts/banner.html.erb +9 -0
  34. data/templates/layouts/body_header.html.erb +4 -3
  35. data/templates/layouts/bottom_includes.html.erb +15 -0
  36. data/templates/layouts/course.html.erb +44 -0
  37. data/templates/layouts/main_navbar.html.erb +1 -1
  38. data/templates/layouts/nav-menus.html.erb +37 -0
  39. data/templates/layouts/sidebar.html.erb +14 -0
  40. data/templates/layouts/top_includes.html.erb +31 -0
  41. metadata +27 -19
  42. data/deleteme.rb +0 -2
  43. data/templates/body_footer.html +0 -8
  44. data/templates/body_header.html.erb +0 -6
  45. data/templates/content/chalkmark/chalkmark.js +0 -30
  46. data/templates/content/tipuesearch/img/search.png +0 -0
  47. data/templates/content/tipuesearch/tipuesearchmin.js +0 -14
  48. data/templates/content/tipuesearch_logic/search.md.erb +0 -8
  49. data/templates/content/tipuesearch_logic/tipuesearch_content.js.erb +0 -6
  50. data/templates/course.html +0 -59
  51. data/templates/helpful_box.html +0 -3
  52. data/templates/layouts/course.html +0 -59
  53. data/templates/main_navbar.html.erb +0 -21
@@ -8,7 +8,6 @@ module CourseGen
8
8
  copy_template_dir("layouts", "layouts")
9
9
  copy_template_dir("content/bootstrap", "content/bootstrap")
10
10
  copy_template_dir("content/content", "content/content")
11
- copy_template_dir("content/chalkmark", "content/chalkmark")
12
11
  delete_target_file("lib/default.rb")
13
12
  copy_template_dir("lib", "lib")
14
13
  delete_target_file("Rules")
@@ -21,8 +20,6 @@ module CourseGen
21
20
  delete_target_file("content/index.html")
22
21
  delete_target_file("layouts/default.html")
23
22
  create_empty_dir("content/images")
24
- copy_template_dir("content/tipuesearch", "content/tipuesearch")
25
- copy_template_dir("content/tipuesearch_logic", "content/tipuesearch_logic")
26
23
  end
27
24
 
28
25
  def valid_cg_directory?
@@ -1,3 +1,3 @@
1
1
  module Coursegen
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.6"
3
3
  end
@@ -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
+ directories %w(. /mydev/cg-topics)
7
6
  watch(/.erb/) { |m| `cg compile` }
8
- watch(/(cg_config.rb|Rules)/) { |m| `cg reset; cg compile`}
7
+ watch(/.rb/) { |m| `cg compile` }
8
+ watch(/Rules/) { |m| `cg compile` }
9
9
  end
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require './cg_config.rb'
4
2
 
5
3
  preprocess do
@@ -10,47 +8,39 @@ compile '/bootstrap/**/*' do
10
8
  nil
11
9
  end
12
10
 
13
- compile '/content/scripts/**/*' do
11
+ compile '/extras/**/*' do
14
12
  nil
15
13
  end
16
14
 
17
- compile '/chalkmark/**/*' do
15
+ compile '/content/topics/robotcode/**/*' do
18
16
  nil
19
17
  end
20
18
 
21
- compile '/tipuesearch/**/*' do
19
+ compile '/content/scripts/**/*' do
22
20
  nil
23
21
  end
24
22
 
25
- compile "/tipuesearch_logic/tipuesearch_content.*" do
23
+ compile "/content/tipuesearch/tipuesearch_content.js.erb" do
26
24
  filter :erb
27
25
  end
28
26
 
29
- compile "/content/**/*.ical.erb" do
27
+ compile '/**/*.ical.erb' do
30
28
  filter :erb
31
29
  end
32
30
 
31
+ compile '/**/*.{md,ical}.erb' do
32
+ if item[:status] != "hidden"
33
+ filter :erb
34
+ filter :kramdown, coderay_line_numbers: nil
35
+ layout '/course.*'
36
+ else
37
+ nil
38
+ end
39
+ end
40
+
33
41
  compile '/**/*' do
34
42
  if item.binary? || item[:status] == "hidden"
35
43
  nil
36
- elsif item[:status] == "hidden"
37
- nil
38
- elsif item[:type] == "subsection"
39
- nil
40
- elsif item[:extension] == "haml"
41
- filter :haml;
42
- layout '/course.*'
43
- else
44
- item[:extension].split('.').reverse.each do
45
- |f|
46
- case f
47
- when 'md', 'markdown'
48
- filter :kramdown, coderay_tab_width: 3
49
- when 'erb'
50
- filter :erb
51
- end
52
- end
53
- layout '/course.*'
54
44
  end
55
45
  end
56
46
 
@@ -62,27 +52,17 @@ route '/tipuesearch/**/*' do
62
52
  @item.identifier.to_s
63
53
  end
64
54
 
65
- route "/tipuesearch_logic/tipuesearch_content.*" do
55
+ route "/content/tipuesearch/tipuesearch_content.*" do
66
56
  '/tipuesearch/tipuesearch_content.js'
67
57
  end
68
58
 
69
-
70
- route '/chalkmark/**/*' do
71
- @item.identifier.to_s
72
- end
73
-
74
59
  # Output the search page
75
- route '/tipuesearch_logic/search.md.erb' do
76
- '/tipuesearch_logic/search/index.html'
77
- end
78
-
79
- route '/**/*.ical.erb' do
80
- @item.identifier.without_ext
60
+ route '/tipuesearch/search.md.erb' do
61
+ '/tipuesearch/search/index.html'
81
62
  end
82
63
 
83
-
84
64
  # Select which .md.erb becomes the home page of the site
85
- route '/content/index.md.erb' do
65
+ route HOME_PAGE do
86
66
  '/index.html'
87
67
  end
88
68
 
@@ -91,15 +71,14 @@ route '/**/*' do
91
71
  raise RuntimeError, "Missing required extension: \".#{item.identifier}\""
92
72
  elsif item.binary?
93
73
  item.identifier.to_s
94
- elsif item.identifier == "/search_logic/tipuesearch_content/"
95
- item.identifier.chop + '.' + item[:extension] rescue fail "in route * in Rules"
74
+ elsif item.identifier == "/searchtipuesearch_content/"
75
+ item.identifier.chop + '.' + item[:extension] rescue fail "in route * in Rules"
96
76
  elsif item[:status] == "hidden"
97
77
  nil
98
78
  elsif item[:type] == "subsection"
99
79
  nil
100
80
  elsif item[:extension] != "css"
101
81
  item.identifier.without_ext + '/index.html'
102
-
103
82
  end
104
83
  end
105
84
 
@@ -1,7 +1,7 @@
1
1
  require 'coursegen'
2
2
 
3
3
  # Copyright string
4
- COPYRIGHT_STRING = "Copyright (2013-2014) R. Pito Salas, pitosalas@gmail.com"
4
+ COPYRIGHT_STRING = "Copyright (2013-2019) R. Pito Salas, pitosalas@gmail.com"
5
5
 
6
6
  # Course short name
7
7
  COURSE_SHORT_NAME = "Sample Course"
@@ -27,3 +27,4 @@ SECTION_CONFIG = [
27
27
  # Options are:
28
28
  # bullet_style: css style for each bullet
29
29
  STYLING_CONFIG = {bullet_style: "\"font-size: 60%; width: 10px; color: grey\""}
30
+ HELPFUL_BOX = false
@@ -1,44 +1,38 @@
1
1
  require 'coursegen'
2
2
 
3
- # bucket for AWS Deployment of the course
4
- AWS_BUCKET = "cosi236b.courses.salas.com"
5
-
6
- # Local directory path for directory of content
7
- CONTENT_PATH = "/mydev/cosi236b"
8
-
9
3
  # Copyright string
10
- COPYRIGHT_STRING = "Copyright (2013-2014) R. Pito Salas, pitosalas@gmail.com"
4
+ COPYRIGHT_STRING = "Copyright (2014-2019) R. Pito Salas, pitosalas@brandeis.edu".freeze
5
+
6
+ # bucket for AWS Deployment of the course
7
+ AWS_BUCKET = "cosi105b".freeze
11
8
 
12
9
  # Course short name
13
- COURSE_SHORT_NAME = "COSI 236B"
14
- COURSE_LONG_NAME = "Software Engineering"
10
+ COURSE_SHORT_NAME = "Cosi 105b".freeze
11
+ COURSE_LONG_NAME = "Software Engineering for Scalability ".freeze
12
+ COURSE_ABBREV = "cs105".freeze
15
13
 
16
14
  # Schedule information. Note that Monday is day 0
17
15
  LECTURES_SCHEDULE_CONFIG = ScheduleDef.new(
18
- first_day: "jan-14-2014",
19
- weekdays: [:tuesday, :friday],
20
- number: 26,
21
- skips: ["feb-18-2014", "feb-21-2014", "apr-15-2014", "apr-18-2014", "apr-22-2014"])
22
-
23
- LABS_SCHEDULE_CONFIG = ScheduleDef.new(
24
- first_day: "jan-16-2014",
25
- weekdays: [:thursday],
26
- number: 13,
27
- skips: ["feb-20-2014", "apr-17-2014"])
16
+ first_day: "jan-15-2019",
17
+ weekdays: [:tuesday, :thursday],
18
+ number: 30,
19
+ start_times: ["15:30", "15:30"],
20
+ end_times: ["16:50", "16:50"],
21
+ start_time: "15:30",
22
+ end_time: "16:50",
23
+ skips: ["jan-22-2019", "feb-19-2019", "feb-21-2019", "apr-23-2019", "apr-25-2019", "may-2-2019"])
28
24
 
29
25
  # Sections in the right hand margin of the page
30
26
  SECTION_CONFIG = [
31
- SectionDef.new("Lectures", "lectures", type: :lecture, schedule: LECTURES_SCHEDULE_CONFIG),
32
- SectionDef.new("Labs", "lab", type: :lecture, schedule: LABS_SCHEDULE_CONFIG),
33
- SectionDef.new("Incubator", "incubator", type: :section),
34
- SectionDef.new("PA", "pa", type: :section),
35
- SectionDef.new("Crib Sheets", "cribsheets", type: :section),
36
- SectionDef.new("Background", "background", type: :section),
37
- SectionDef.new("Root", "root", hidden: true, type: :section),
38
- SectionDef.new("Topics", "topics", hidden: true, type: :section),
39
- SectionDef.new("Hidden", "hidden", hidden: true, type: :section)
40
- ]
27
+ SectionDef.new("Intro", "intro", type: :section, bullet: :star),
28
+ SectionDef.new("Lectures", "lectures", type: :lecture, schedule: LECTURES_SCHEDULE_CONFIG,
29
+ bullet: :dash),
30
+ SectionDef.new("Topics", "topics", hidden: true, type: :section),
31
+ SectionDef.new("Extras", "extras", hidden: true, type: :section)
32
+ ].freeze
41
33
 
42
34
  # Options are:
43
35
  # bullet_style: css style for each bullet
44
- STYLING_CONFIG = {bullet_style: "\"font-size: 60%; width: 10px; color: grey\""}
36
+ STYLING_CONFIG = {bullet_style: %("font-size: 60%; width: 10px; color: grey")}.freeze
37
+ HOME_PAGE = "/content/intro/05_syllabus.md.erb".freeze
38
+ HELPFUL_BOX = false
@@ -1,16 +1,56 @@
1
+ @import url("prettyquote.css");
2
+ @import url("full-width-pics.css");
1
3
  @import url(//fonts.googleapis.com/css?family=Telex);
2
4
 
3
5
  .themefg {
4
- color: rgb(47, 86, 111);
6
+ color: rgb(64,56,207);
5
7
  }
6
8
 
7
9
  .themebg {
8
- background-color: rgb(47, 86, 111);
10
+ background-color: rgb(64,56,207);
11
+ }
12
+ .nav-menus {
13
+ height: 0px;
14
+ }
15
+
16
+ .navbar-inverse .navbar-nav > li > a {
17
+ padding-top: 4px;
18
+ padding-bottom: 0px;
19
+ color: white;
20
+ }
21
+
22
+ .navbar-inverse .navbar-nav > li > a:hover {
23
+ font-weight: bold;
24
+ }
25
+
26
+ a {
27
+ color: rgb(64,56,207);
9
28
  }
10
29
 
11
30
  .navbar a.navbar-title {
12
- color: white;
13
- padding-top: 7px;
31
+ font-family: telex;
32
+ float: left;
33
+ margin-top: 20px;
34
+ padding-left: 10px;
35
+ padding-right: 10px;
36
+ font-size: 28px;
37
+ color: white;
38
+ white-space: nowrap;
39
+ background-color: rgba(18, 0, 0, 0.3);
40
+ }
41
+
42
+ .nav-menus a.navbar-brand {
43
+ padding: 4px 10px;
44
+ color: white;
45
+ }
46
+
47
+ .nav-menus a.navbar-brand:hover {
48
+ font-weight: bold;
49
+ }
50
+
51
+ .nav-btn.btn-mini {
52
+ font-size: 16px;
53
+ color: white;
14
54
  }
15
55
 
16
56
  .navbar {
@@ -18,50 +58,52 @@
18
58
  margin-bottom: 1px;
19
59
  }
20
60
 
21
-
22
61
  .navbar a:hover {
23
62
  color: white;
63
+ text-decoration: none;
24
64
  }
25
65
 
26
- .navbar a {
27
- padding: 6px;
28
- color: light-blue;
66
+ .navbar .input-group-sm input{
67
+ height: 22px;
68
+ width: 150px;
69
+ margin-top: 4px;
29
70
  }
30
71
 
31
- .navbar-title {
32
- float: left;
33
- height: 30px;
34
- font-size: 18px;
35
- line-height: 20px
72
+ .header-main {
73
+ padding-left: 45px;
36
74
  }
37
75
 
38
- .navbar .input-group-sm input{
39
- height: 22px;
40
- width: 150px;
41
- margin-top: 6px;
76
+ .body-main {
77
+ padding-left: 45px;
42
78
  }
43
79
 
44
80
  h1, h2, h3, h4, h5{
45
81
  font-family: telex;
46
- color: rgb(21, 123, 207);
82
+ color: rgb(64,56,207);
47
83
  }
48
84
 
49
85
  h3 {
50
- margin-bottom: 15px;
86
+ padding-top: 20px;
87
+ /* padding-bottom: 10px; */
51
88
  }
52
89
 
53
- h3.body-header {
54
- margin-bottom: -5px;
55
- }
90
+ /* h3.body-header {
91
+ margin-left: -15px;
92
+ margin-top: -10px;
93
+ margin-right: -15px;
94
+ margin-bottom: -22px;
95
+ } */
56
96
 
57
97
  h4 {
58
98
  margin-top: 20px;
59
- border-top: gainsboro solid 1px;
99
+ border-top: rgb(64,56,207) solid 3px;
60
100
  padding-top: 5px;
61
101
  }
62
102
 
63
103
  h5 {
64
104
  margin-top: 15px;
105
+ font-weight: bold;
106
+ font-variant: small-caps;
65
107
  }
66
108
 
67
109
  body {
@@ -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
+ }