Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sito
poul.org
Commits
0264873f
Verified
Commit
0264873f
authored
Apr 25, 2021
by
Roberto Bochet
Browse files
Added support to add slides to courses pages
parent
aec8b6a9
Pipeline
#787
passed with stages
in 10 minutes and 55 seconds
Changes
2
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
_includes/course_edition.html
View file @
0264873f
...
...
@@ -39,7 +39,10 @@
</div>
<div
class=
"topics"
>
{% for topic in session.topics %}
<div>
{{topic}}
</div>
<div>
{{ topic.title }}
{% if topic.slides %}
<a
href=
"{{ topic.slides }}"
><i
class=
"fa fa-file"
></i></a>
{% endif %}
{% if topic.record %}
<a
href=
"{{ topic.record }}"
><i
class=
"fa fa-film"
></i></a>
{% endif %}
</div>
{% endfor %}
</div>
</div>
...
...
_plugins/courses_pages_generator.rb
View file @
0264873f
...
...
@@ -121,9 +121,17 @@ module Jekyll
# fix levels composition of room value
v
[
"schedule"
].
each
do
|
s
|
if
s
[
"room"
]
!=
nil
&&
!
s
[
"room"
].
is_a?
(
Hash
)
s
[
"room"
]
=
{
"room"
=>
s
[
"room"
]}
s
[
"room"
]
=
{
"room"
=>
s
[
"room"
]
}
end
# topics
s
[
"topics"
].
each_index
do
|
t
|
unless
s
[
"topics"
][
t
].
is_a?
(
Hash
)
s
[
"topics"
][
t
]
=
{
"title"
=>
s
[
"topics"
][
t
]
}
end
end
end
end
# transforms hash to array
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment