JuliaPluto / computational-thinking-template

Template to build a course webpage like the *Introduction to computational thinking with Julia* course tought at MIT
http://juliapluto.github.io/computational-thinking-template/
Other
34 stars 4 forks source link

decouple header from "lecture" tag #7

Closed lucaferranti closed 1 year ago

lucaferranti commented 1 year ago
 $(any(contains("lecture"), f("tags", String[])) ? @htl("""
           <div class="lecture-header" >
                <p class="number">Section $(f("chapter", "-")).$(f("section", "-"))</p>
                <h1>$(
                    f("title", basename(page.input.relative_path))
                )</h1>

                <div class="video">

                    <h4>Lecture Video</h4>
                    <div>
                        <lite-youtube videoid=$(f("youtube_id", "notfound")) params="modestbranding=1&rel=0"></lite-youtube>
                    </div>
                </div>
            </div>

Currently the header with the video is displayed if the tag "lecture" is present, regardless of whether or not youtube_id is set. Instead, the header should be included only for pages with youtube_id. (alternatively, could always keep the header, since it's nice, but dont always ahve the video).

After that, I think the "lecture" and "homework" tags could be deprecated, since homeworks for the side bar are identified based on the "homework_number" field.