coursegen 0.9.15 → 0.9.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/coursegen/course/helpers/content_helpers.rb +5 -4
- data/lib/coursegen/course/lib/nanoc_filters.rb +27 -27
- data/lib/coursegen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3122a6f1e196dc736ad8bb5559088b8a23268a75acf77ea556f8f3c0622de90b
|
4
|
+
data.tar.gz: d2c72e6dc943f818d444e314b6c1ff7eea0fae1e96b09d87c053b29e6797e958
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03b6891fa609a2fd40fa083f7e2c7865ec29b9c31f12b8792b8feb68099391cb57fa883d5cdf0141cc75b9a303d7b864bb5869ebbd00085af415b75aeed109d2
|
7
|
+
data.tar.gz: 4ae5c38eeb4b5ed3c9c0018dab732a34a9780abb3298414a2fb3775842adc75b8d700e3dac6fc05724e42403d2e429706362d3bc74b14096a74bd2c77d733409
|
data/Gemfile.lock
CHANGED
@@ -67,19 +67,20 @@ module ContentHelpers
|
|
67
67
|
HTMLSTRING
|
68
68
|
end
|
69
69
|
|
70
|
-
def callout(title, body, style
|
71
|
-
if
|
70
|
+
def callout(title, body, style="big")
|
71
|
+
style = style.to_s if style.class != String
|
72
|
+
if (style == "big")
|
72
73
|
%(<div class="jumbotron py-1 border border-primary border-rounded-lg">
|
73
74
|
<h1 class="display-5">#{title}</h1>
|
74
75
|
<p class="lead">#{body}</p></div>)
|
75
|
-
elsif (style ==
|
76
|
+
elsif (style == "small")
|
76
77
|
<<~HTMLSTRING
|
77
78
|
<div class="callout border border-primary rounded p-2 m-3">
|
78
79
|
<span class="badge badge-pill badge-primary">#{title}</span>#{body}
|
79
80
|
</div>
|
80
81
|
HTMLSTRING
|
81
82
|
else
|
82
|
-
"error in callout call #{style}"
|
83
|
+
"error in callout call: .#{style}. #{style.class}"
|
83
84
|
end
|
84
85
|
end
|
85
86
|
|
@@ -1,30 +1,30 @@
|
|
1
1
|
include VisualHelpers
|
2
2
|
|
3
3
|
Nanoc::Filter.define(:handle_shortcodes) do |content, _params = {}|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
4
|
+
prefix = /:/
|
5
|
+
content
|
6
|
+
.gsub(Regexp.new(prefix.source + /callout :(\w+), \"(.+)\", \"(.+)\"/.source)) { callout($2, $3, $1) }
|
7
|
+
.gsub(Regexp.new(prefix.source + /deliverable (.+)$/.source), "<%= deliverable( \"\\1\") %>")
|
8
|
+
.gsub(Regexp.new(prefix.source + /discussion_box (.+)$/.source), "<%= discussion_box( \"\\1\") %>")
|
9
|
+
.gsub(Regexp.new(prefix.source + /h1 (.+)$/.source), "# \\1 ")
|
10
|
+
.gsub(Regexp.new(prefix.source + /h2 (.+)$/.source), "## \\1 ")
|
11
|
+
.gsub(Regexp.new(prefix.source + /h3 (.+)$/.source), "### \\1 ")
|
12
|
+
.gsub(Regexp.new(prefix.source + /h4 (.+)$/.source), "#### \\1 ")
|
13
|
+
.gsub(Regexp.new(prefix.source + /image :(\w+)/.source), "<img src=\"/content/topics/images/\\1.jpg\" class=\"img-thumbnail\" style=\"height:300px;\"/>")
|
14
|
+
.gsub(Regexp.new(prefix.source + /lecture_end/.source), end_of_lecture)
|
15
|
+
.gsub(Regexp.new(prefix.source + /partbadge/.source), partbadge)
|
16
|
+
.gsub(Regexp.new(prefix.source + /pdfbadge/.source), pdfbadge)
|
17
|
+
.gsub(Regexp.new(prefix.source + /section_link :(\w+) :(\w+)/.source)) { link_to_section($1, $2) }
|
18
|
+
.gsub(Regexp.new(prefix.source + /slide_bigtitle (.+)$/.source), "<slide_break></slide_break>\n\n## \\1")
|
19
|
+
.gsub(Regexp.new(prefix.source + /slide_break/.source), "<slide_break></slide_break>")
|
20
|
+
.gsub(Regexp.new(prefix.source + /slide_subtitle (.+)$/.source), "<slide_break></slide_break>\n\n#### \\1")
|
21
|
+
.gsub(Regexp.new(prefix.source + /slide_title (.+)$/.source), "<slide_break></slide_break>\n\n### \\1")
|
22
|
+
.gsub(Regexp.new(prefix.source + /source_begin :(.+)$/.source)) { source_begin( ":language-"+$1) }
|
23
|
+
.gsub(Regexp.new(prefix.source + /source_end/.source), source_end)
|
24
|
+
.gsub(Regexp.new(prefix.source + /team_deliverable (.+)$/.source), "<%= team_deliverable( \"\\1\") %>")
|
25
|
+
.gsub(Regexp.new(prefix.source + /teambadge/.source), teambadge)
|
26
|
+
.gsub(Regexp.new(prefix.source + /topic_include :(\w+)$/.source)) { include_topic($1) }
|
27
|
+
.gsub(Regexp.new(prefix.source + /topic_link :(\w+)/.source)) { link_to_topic($1) }
|
28
|
+
.gsub(Regexp.new(prefix.source + /youtube \"(.+)\"$/.source)) { %Q!<iframe width="560" height="315" src="#{$1}"></iframe>! }
|
29
|
+
.gsub(Regexp.new(prefix.source + /zipbadge/.source), zipbadge)
|
30
|
+
end
|
data/lib/coursegen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coursegen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pito Salas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|