From 88a15df76da974713392d134da6dbb9e79832063 Mon Sep 17 00:00:00 2001 From: Helena Rasche Date: Fri, 20 Jan 2023 18:19:45 +0100 Subject: [PATCH] Scrap more code due to intro slides --- _includes/resource-slides.html | 16 ++++++---------- _includes/tutorial_list.html | 6 ------ _layouts/tutorial_hands_on.html | 9 --------- _plugins/jekyll-jsonld.rb | 7 +------ videos/index.md | 4 ++-- 5 files changed, 9 insertions(+), 33 deletions(-) diff --git a/_includes/resource-slides.html b/_includes/resource-slides.html index 650ec035e6187..a42b736f6ffa1 100644 --- a/_includes/resource-slides.html +++ b/_includes/resource-slides.html @@ -1,14 +1,10 @@ -{% if include.material.type == 'introduction' %} - {% assign subfolder = 'slides' %} -{% else %} - {% assign subfolder = 'tutorials' %} -{% endif %} +{% assign subfolder = 'tutorials' %} {% if include.material.slides %} - plain text + plain text - + {% icon slides aria=false %} + {{ lang[1] }} {% endunless %}{% endfor %} @@ -36,7 +32,7 @@ More Languages - + {% icon text-document aria=false %} Plain text slides @@ -47,7 +43,7 @@ {% if include.material.video %} - + {% icon video-slides aria=false %} diff --git a/_includes/tutorial_list.html b/_includes/tutorial_list.html index abe48e8679408..b3ed77fda1fb2 100644 --- a/_includes/tutorial_list.html +++ b/_includes/tutorial_list.html @@ -47,11 +47,6 @@
- {% if material.type == "introduction" %} - {% if material.slides %} - {% include _includes/resource-slides.html material=material topic=topic.name %} - {% endif %} - {% elsif material.type == "tutorial" %}
{% include _includes/resource-slides.html material=material topic=topic.name %} {% include _includes/resource-handson.html material=material topic=topic.name %} @@ -62,7 +57,6 @@ {% include _includes/instance-dropdown.html instances=instances topic=topic.name tuto=material.tutorial_name %} {% endif %}
- {% endif %}
diff --git a/_layouts/tutorial_hands_on.html b/_layouts/tutorial_hands_on.html index 156527ef1886f..4d3f0bde27d72 100644 --- a/_layouts/tutorial_hands_on.html +++ b/_layouts/tutorial_hands_on.html @@ -21,11 +21,6 @@ {% assign associated_slides = true %} {% endif %} {% endif %} - {% if material.type == "introduction" %} - {% assign intro_link = true %} - {% assign intro_target = material.tutorial_name | append: '.html' %} - - {% endif %} {% endif %} {% endfor %} @@ -418,15 +413,11 @@

{{locale['citing-tutorial'] | default: "Citing this Tutorial"}}

    {% for material in topic_material %} {% if material.enable != "false" or jekyll.environment != "production" %} - {% if material.type == "introduction" %} -
  1. {{ material.title }}
  2. - {% elsif material.type == "tutorial" %} {% if material.hands_on %}
  3. {{ material.title }}
  4. {% elsif material.slides %}
  5. {{ material.title }}
  6. {% endif %} - {% endif %} {% endif %} {% endfor %}
diff --git a/_plugins/jekyll-jsonld.rb b/_plugins/jekyll-jsonld.rb index e1abb4a3a9725..bdfcd7401c2f9 100644 --- a/_plugins/jekyll-jsonld.rb +++ b/_plugins/jekyll-jsonld.rb @@ -265,12 +265,7 @@ def to_jsonld(material, topic, site) data['isPartOf'] = topic_desc - if material['type'] == 'introduction' then - data['learningResourceType'] = "slides" - data['name'] = "Introduction to '#{topic['title']}'" - data['url'] = "#{site['url']}#{site['baseurl']}#{material['url']}" - description.push("Slides for #{topic['title']}") - elsif material['name'] == 'tutorial.md' or material['name'] == 'slides.html' then + if material['name'] == 'tutorial.md' or material['name'] == 'slides.html' then if material['name'] == 'tutorial.md' then data['learningResourceType'] = "hands-on tutorial" data['name'] = "Hands-on for '#{material['title']}' tutorial" diff --git a/videos/index.md b/videos/index.md index 0653728d539cc..460a1b1d5adcd 100644 --- a/videos/index.md +++ b/videos/index.md @@ -55,7 +55,7 @@ The GTN now generates videos for selected slide decks. Click on a topic below to
{% for material in topic_material %} {% if material.video %} - {% capture vid %}{{ topic_id }}/{% if material.type == "introduction" %}slides/introduction{% else %}tutorials/{{ material.tutorial_name }}/slides{% endif %}{% endcapture %} + {% capture vid %}{{ topic_id }}/tutorials/{{ material.tutorial_name }}/slides{% endcapture %}
{% for lang in material.translations.slides %} - {% capture vid %}{{ topic_id }}/{% if material.type == "introduction" %}slides/introduction_{{ lang | upcase }}{% else %}tutorials/{{ material.tutorial_name }}/slides_{{ lang | upcase }}{% endif %}{% endcapture %} + {% capture vid %}{{ topic_id }}/tutorials/{{ material.tutorial_name }}/slides_{{ lang | upcase }}{% endcapture %}