jekyll-theme-open-course 1.2.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b09a6cad886465d099731b73e29af902f0090bd7dd2ea5fa205605db2985d79
4
- data.tar.gz: 78eebd7ecb8fcad3138444969f987b3bff2ceeb402114e502bbc523a4c1f860e
3
+ metadata.gz: dce31a904e04f5079b9ef8c34bb35673248562e2ce1fb798c9c0a3c303e2b9b7
4
+ data.tar.gz: 3c52758a7d62f5f68b89241f089b777c7ed6c982d9b98a8c8f4f1d9320d76904
5
5
  SHA512:
6
- metadata.gz: b70ff525e5feffc9c4717a1756af5ab92a21fdb095a8f425ecb18e822391a2e8a0345a84d9917c578f8fe249ea99c00516434542f467a43be458e3d970ba98ea
7
- data.tar.gz: '0795071f2df2501ed8799f2420ca96223aaaa8319ce7c97f86369cd6977a437fe8536d9b97bc12721317636fcdd9a1a01ca7e821d52f97217fa3a52a8d82ed92'
6
+ metadata.gz: 3edd7a5b87a7b43c098b833124f5a295921ad24a609bd386e0dc977b48bfa4c3e44d781b1b603cc1915c35918ba170beae4d774df9d373daf7c1bef24849e876
7
+ data.tar.gz: 18fa94cfc445465b2f243388e8015c6731bf2572b075724c18684d7a592dae9756b6d29467111317850364b96d756dca65b784b6cc9f71645fc6427b0e09fa97
@@ -4,56 +4,58 @@ GEM
4
4
  addressable (2.7.0)
5
5
  public_suffix (>= 2.0.2, < 5.0)
6
6
  colorator (1.1.0)
7
- concurrent-ruby (1.1.5)
7
+ concurrent-ruby (1.1.7)
8
8
  em-websocket (0.5.1)
9
9
  eventmachine (>= 0.12.9)
10
10
  http_parser.rb (~> 0.6.0)
11
11
  eventmachine (1.2.7)
12
- ffi (1.11.3)
12
+ ffi (1.13.1)
13
13
  forwardable-extended (2.6.0)
14
14
  http_parser.rb (0.6.0)
15
- i18n (1.8.1)
15
+ i18n (1.8.5)
16
16
  concurrent-ruby (~> 1.0)
17
- jekyll (4.0.0)
17
+ jekyll (4.1.1)
18
18
  addressable (~> 2.4)
19
19
  colorator (~> 1.0)
20
20
  em-websocket (~> 0.5)
21
- i18n (>= 0.9.5, < 2)
21
+ i18n (~> 1.0)
22
22
  jekyll-sass-converter (~> 2.0)
23
23
  jekyll-watch (~> 2.0)
24
24
  kramdown (~> 2.1)
25
25
  kramdown-parser-gfm (~> 1.0)
26
26
  liquid (~> 4.0)
27
- mercenary (~> 0.3.3)
27
+ mercenary (~> 0.4.0)
28
28
  pathutil (~> 0.9)
29
29
  rouge (~> 3.0)
30
30
  safe_yaml (~> 1.0)
31
31
  terminal-table (~> 1.8)
32
- jekyll-sass-converter (2.0.1)
32
+ jekyll-sass-converter (2.1.0)
33
33
  sassc (> 2.0.1, < 3.0)
34
34
  jekyll-watch (2.2.1)
35
35
  listen (~> 3.0)
36
- kramdown (2.1.0)
36
+ kramdown (2.3.0)
37
+ rexml
37
38
  kramdown-parser-gfm (1.1.0)
38
39
  kramdown (~> 2.0)
39
40
  liquid (4.0.3)
40
41
  listen (3.2.1)
41
42
  rb-fsevent (~> 0.10, >= 0.10.3)
42
43
  rb-inotify (~> 0.9, >= 0.9.10)
43
- mercenary (0.3.6)
44
+ mercenary (0.4.0)
44
45
  pathutil (0.16.2)
45
46
  forwardable-extended (~> 2.6)
46
- public_suffix (4.0.3)
47
- rb-fsevent (0.10.3)
47
+ public_suffix (4.0.5)
48
+ rb-fsevent (0.10.4)
48
49
  rb-inotify (0.10.1)
49
50
  ffi (~> 1.0)
50
- rouge (3.14.0)
51
+ rexml (3.2.4)
52
+ rouge (3.22.0)
51
53
  safe_yaml (1.0.5)
52
- sassc (2.2.1)
54
+ sassc (2.4.0)
53
55
  ffi (~> 1.9)
54
56
  terminal-table (1.8.0)
55
57
  unicode-display_width (~> 1.1, >= 1.1.1)
56
- unicode-display_width (1.6.0)
58
+ unicode-display_width (1.7.0)
57
59
 
58
60
  PLATFORMS
59
61
  ruby
@@ -62,4 +64,4 @@ DEPENDENCIES
62
64
  jekyll
63
65
 
64
66
  BUNDLED WITH
65
- 1.17.2
67
+ 2.1.4
@@ -40,7 +40,7 @@ course:
40
40
  href: "policies/"
41
41
  id: pol
42
42
  css:
43
- font-url: "https://use.typekit.net/pig5ein.css"
43
+ font-url: "https://use.typekit.net/qqk1feg.css"
44
44
 
45
45
  collections_dir: syllabus
46
46
 
@@ -30,7 +30,7 @@ layout: default
30
30
  <header>
31
31
  {% endif %}
32
32
  <h2>
33
- {{ week.theme | escape }}
33
+ {{ week.theme | markdownify | remove: "<p>" | remove: "</p>" | strip_newlines }}
34
34
  </h2>
35
35
  <small>Week&nbsp;{{ util.spelled_nums[week_int] }}</small>
36
36
  </header>
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en" id="{{page.id}}" prefix="og: http://ogp.me/ns#" class="loading">
3
- <head>{% assign course = site.course %}{% assign instructor = site.course.instructor %}
3
+ <head>{% assign course = site.course %}{% assign instructor = site.course.instructor %}{% assign ta = site.course.ta %}
4
4
  <meta charset="utf-8" />
5
5
  <title>{{ course.number }}: {% if page.title %}{{ page.title}}{% else %}{{ course.title }}{% endif %}</title>
6
6
  <meta name="viewport" content="width=device-width,initial-scale=1.0,shrink-to-fit=no" />
@@ -17,7 +17,7 @@
17
17
  <body>
18
18
  <header id="header">
19
19
  <h1>
20
- <a rel="home" href="{{ site.url }}{{ site.baseurl }}">{{ course.title}}</a>
20
+ <a rel="home" href="{{ site.url }}{{ site.baseurl }}">{{ course.title}}</a>{% if page.title %}: {{ page.title}}{% endif %}
21
21
  </h1>
22
22
  <p class="tagline">
23
23
  {% if course.tagline %}{{ course.tagline }}{% endif %}
@@ -42,13 +42,28 @@
42
42
  <ul>
43
43
  <li>
44
44
  <a href="{{ instructor.url }}">{{ instructor.honorific }} {{ instructor.name }}</a>,
45
- {{ site.course.instructor.full_title | escape }}
45
+ {{ instructor.full_title | escape }}
46
46
  </li>
47
47
  <li><a href="mailto:{{ instructor.email }}">{{ instructor.email }}</a></li>
48
48
  <li id="office-hours">
49
49
  {{ instructor.office_hours }}
50
50
  </li>
51
51
  </ul>
52
+ {% if ta.name %}
53
+ <header>
54
+ <h3>Teaching Assistant</h3>
55
+ </header>
56
+ <ul>
57
+ <li>
58
+ {% if ta.url %}<a href="{{ ta.url }}">{% endif %}{{ ta.name }}{% if ta.url %}</a>{% endif %},
59
+ {{ ta.full_title | escape }}
60
+ </li>
61
+ <li><a href="mailto:{{ ta.email }}">{{ ta.email }}</a></li>
62
+ <li id="office-hours">
63
+ {{ ta.office_hours }}
64
+ </li>
65
+ </ul>
66
+ {% endif %}
52
67
  </aside>
53
68
 
54
69
 
@@ -0,0 +1,10 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="links">
6
+ <header>
7
+ <h2>{{ page.title }}</h2>
8
+ </header>
9
+ {{ content }}
10
+ </article>
@@ -1,3 +1,7 @@
1
+ html {
2
+ font-size: 11pt;
3
+ }
4
+
1
5
  #header,
2
6
  #footer {
3
7
  color: inherit;
@@ -19,14 +23,10 @@ p,li {
19
23
  -webkit-hyphens: none;
20
24
  hyphens: none;
21
25
  }
22
- h2 {
23
- font-family: "moderno-fb-condensed";
24
- font-weight: 700;
25
- }
26
-
27
26
 
28
27
  /* Hide Navigation Stuff */
29
28
 
29
+ #quick-nav,
30
30
  #nav-nav,
31
31
  #full-nav {
32
32
  display: none;
@@ -212,11 +212,11 @@ if ((document.querySelector('#calendar')) && (document.querySelector('#this-week
212
212
  // location.hash = '#this-week'; // point at the new hash position; viewport should show this one
213
213
  // }
214
214
  var btn_show_calendar = document.createElement('a');
215
+ var past_weeks = document.querySelectorAll('article.past');
215
216
  btn_show_calendar.id = "btn-show-calendar";
216
217
  btn_show_calendar.href = "#null";
217
218
  btn_show_calendar.text = "Show Previous Weeks"
218
219
  btn_show_calendar.addEventListener('click', function(e) {
219
- var past_weeks = document.querySelectorAll('article.past');
220
220
  for (var week of past_weeks) {
221
221
  week.classList.remove('past');
222
222
  }
@@ -224,7 +224,9 @@ if ((document.querySelector('#calendar')) && (document.querySelector('#this-week
224
224
  e.preventDefault();
225
225
  }
226
226
  );
227
- current_week.insertAdjacentElement('afterend', btn_show_calendar);
227
+ if (past_weeks.length > 1) {
228
+ current_week.insertAdjacentElement('afterend', btn_show_calendar);
229
+ }
228
230
  }
229
231
 
230
232
  if ('fetch' in window) {
@@ -272,6 +274,28 @@ if ('fetch' in window) {
272
274
  }
273
275
  }
274
276
 
277
+ // This is 10,000 kinds of ugly and bad, but it gets the job done...for now.
278
+ var course_levels = ['grad','ugrad','all'];
279
+ var title = document.querySelector('title');
280
+ var title_components = {};
281
+ title_components.original = title.innerText;
282
+ title_components.name = title_components.original.split(':')[1] // Web Real-Time Communications
283
+ title_components.full = title_components.original.split(':')[0]; // ITMD 469/545
284
+ title_components.code = title_components.full.split(' ')[0]; // ITMD
285
+ title_components.all = title_components.full.split(' ')[1]; // 469/545
286
+ title_components.ugrad = title_components.all.split('/')[0]; // 469
287
+ title_components.grad = title_components.all.split('/')[1]; // 545
288
+
289
+ document.querySelector('#footer').addEventListener('dblclick', function(e) {
290
+ // Adjust the <title> contents
291
+ title.innerText = title_components.code + ' ' + title_components[course_levels[0]] + ': ' + title_components.name;
292
+ // Switch up the ancestor level class
293
+ html.classList.remove(course_levels[course_levels.length - 1]);
294
+ html.classList.add(course_levels[0]);
295
+ // Push the current level to the end of the array
296
+ course_levels.push(course_levels.shift());
297
+ });
298
+
275
299
  window.addEventListener('keyup', function(e) {
276
300
  // console.log(e.keyCode);
277
301
  // Toggle the visibility of gridlines when `g` is pressed
@@ -1,9 +1,11 @@
1
1
  module JTOpenCourse
2
2
 
3
- require 'erb'
4
3
  require 'date'
4
+ require 'erb'
5
+ require 'fileutils'
6
+ require 'pathname'
5
7
 
6
- VERSION = "1.2.1"
8
+ VERSION = "2.1.0"
7
9
 
8
10
  SPELLED_NUMS = %w(
9
11
  Zero One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen
@@ -40,7 +42,7 @@ module JTOpenCourse
40
42
  def initialize(args, options)
41
43
  @counter = 0
42
44
  @name = args.first.chomp
43
- @path = Pathname.new(File.expand_path(name, Dir.pwd))
45
+ @path = Pathname.new(File.expand_path(@name, Dir.pwd))
44
46
 
45
47
  @anchor_date = set_value(find_next_monday(options['monday']),find_next_monday)
46
48
  @week_count = set_value(options['weeks'], DEFAULT_VALUES[:weeks]).to_i
@@ -86,6 +88,8 @@ module JTOpenCourse
86
88
 
87
89
  def create!
88
90
  create_directories
91
+ create_gitignore
92
+ create_gemfile
89
93
  create_config_yml
90
94
  create_utility_data
91
95
  create_calendar_data
@@ -123,6 +127,14 @@ module JTOpenCourse
123
127
  end
124
128
  end
125
129
 
130
+ def create_gitignore
131
+ process_file(".gitignore")
132
+ end
133
+
134
+ def create_gemfile
135
+ process_file("Gemfile")
136
+ end
137
+
126
138
  def create_config_yml
127
139
  process_file("_config.yml")
128
140
  end
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Use the very latest version from GitHub
4
+ gem 'jekyll-theme-open-course', git: 'https://github.com/karlstolley/jekyll-theme-open-course.git'
5
+
6
+ # Use the latest stable version from rubygems
7
+ # gem 'jekyll-theme-open-course'
@@ -29,6 +29,12 @@ course:
29
29
  email: <%= email %>
30
30
  office_hours: >
31
31
  Detail your office hours in `_config.yml`
32
+ ta:
33
+ name:
34
+ full_title:
35
+ url:
36
+ email:
37
+ office_hours: >
32
38
  navigation:
33
39
  - label: Calendar
34
40
  href: "#this-week"
@@ -40,7 +46,7 @@ course:
40
46
  href: "policies/"
41
47
  id: pol
42
48
  css:
43
- font-url: "https://use.typekit.net/pig5ein.css"
49
+ font-url: "https://use.typekit.net/qqk1feg.css"
44
50
 
45
51
  collections_dir: syllabus
46
52
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  theme: Theme for Week <%= SPELLED_NUMS[counter] %>
3
- meetings: <% days.length.times do %>
3
+ meetings:<% days.length.times do %>
4
4
  - agenda:
5
5
  -
6
6
  video:<% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-open-course
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Stolley
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-12 00:00:00.000000000 Z
11
+ date: 2020-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -68,6 +68,7 @@ files:
68
68
  - _layouts/calendar.html
69
69
  - _layouts/default.html
70
70
  - _layouts/error.html
71
+ - _layouts/links.html
71
72
  - _layouts/policies.html
72
73
  - _layouts/projects.html
73
74
  - assets/css/print.css
@@ -78,6 +79,7 @@ files:
78
79
  - exe/jtoc
79
80
  - index.md
80
81
  - lib/jtoc.rb
82
+ - lib/starter_files/Gemfile
81
83
  - lib/starter_files/_config.yml.erb
82
84
  - lib/starter_files/_data/calendar.yml.erb
83
85
  - lib/starter_files/_data/utility.yml