Skip to content

Commit

Permalink
Add baseUrl to embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
damithc committed Aug 8, 2023
1 parent c48e9f1 commit 7e31337
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 27 deletions.
1 change: 1 addition & 0 deletions _course-CS2103/weeklyAdminTasks-fragment.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ week1: [
{id: 'set_up_tools', deadline: "before the lecture"},
{id: 'submit_pre_course_survey', deadline: get_date(date_w1_start, 4), graded: true},
{id: 'learn_about_the_course'},
{id: 'follow_the_git_learning_trail'},
{id: 'attend_the_first_lecture'}
],
week2: [
Expand Down
20 changes: 14 additions & 6 deletions admin/admin-tasks-fragment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

* **Read prerequisite [{{ show_as_tab('Topics', icon_tab_topics) }}](../schedule/week1/topics.html)** allocated for week 1. **Submit `Week 1 Quiz`** (on Canvas) to test your knowledge of those topics. Ideally, finish the quiz before the first lecture, latest by the given deadline. The quiz is counted for participation.

{{ embed_topic("participation.md#main", "Admin " + icon_embedding + " **Participation**", "2", indent="2") }}
{{ embed_topic(baseUrl+"/admin/participation.md#main", "Admin " + icon_embedding + " **Participation**", "2", indent="2") }}

</div>
{#====================================================================================================================#}
Expand All @@ -28,7 +28,7 @@
The tools in the following panels are the same as what you used in TIC4001.
</box>

{{ embed_topic("programmingLanguages.md#main", "Admin " + icon_embedding + " **Programming Language**", "2", indent="2") }}
{{ embed_topic(baseUrl+"/admin/programmingLanguages.md#main", "Admin " + icon_embedding + " **Programming Language**", "2", indent="2") }}
{{ embed_topic("tools.md#github", "Admin " + icon_embedding + " **Tools - GitHub**", "2", indent="2") }}
{{ embed_topic("tools.md#rcs", "Admin " + icon_embedding + " **Tools - Git**", "2", indent="2") }}
{{ embed_topic("tools.md#ide", "Admin " + icon_embedding + " **Tools - IDE**", "2", indent="2") }}
Expand Down Expand Up @@ -59,25 +59,33 @@ The tools in the following panels differ slightly from TIC4001.
The info in the following panels are as the same as TIC4001.
</box>

{{ embed_topic("courseExpectations.md#main", "Admin " + icon_embedding + " **Course expectations and ==topic levels==**", "1", indent="2", type="danger") }}
{{ embed_topic(baseUrl+"/admin/courseExpectations.md#main", "Admin " + icon_embedding + " **Course expectations and ==topic levels==**", "1", indent="2", type="danger") }}
{{ embed_topic("usingThisWebsite.md#essential", "Admin " + icon_embedding + " **Using this website [essential info]**", "1", indent="2", type="danger") }}
{{ embed_topic("usingThisWebsite.md#more", "Admin " + icon_embedding + " **Using this website [more info]**", "3", indent="2", type="info") }}
{% if not (tic4001 or tic4002) %}
{{ embed_topic("weeklySchedule.md#main", "Admin " + icon_embedding + " **Weekly schedule**", "2", indent="2", type="warning") }}
{{ embed_topic(baseUrl+"/admin/weeklySchedule.md#main", "Admin " + icon_embedding + " **Weekly schedule**", "2", indent="2", type="warning") }}
{% endif %}
<box type="warning" tags="m--tic4002" seamless>

The info in the following panels differs from TIC4001.
</box>
{{ embed_topic("courseOverview.md#main", "Admin " + icon_embedding + " **Course overview**", "4", indent="2", type="success") }}
{{ embed_topic(baseUrl+"/admin/courseOverview.md#main", "Admin " + icon_embedding + " **Course overview**", "4", indent="2", type="success") }}
</div>
{#====================================================================================================================#}
<span id="heading_attend_the_first_lecture">Attend the first lecture</span>
<div id="desc_attend_the_first_lecture">

* Attend the first lecture on {{ get_date(date_first_lecture, time='') }}(==**compulsory**==).

{{ embed_topic("lectures.md#main", "Admin " + icon_embedding + " **Lectures**", "1", indent="2") }}
{{ embed_topic(baseUrl+"/admin/lectures.md#main", "Admin " + icon_embedding + " **Lectures**", "1", indent="2") }}

</div>
{#====================================================================================================================#}
<span id="heading_follow_the_git_learning_trail">[Optional] Follow the Git learning trail</span>
<div id="desc_follow_the_git_learning_trail">

* If you have time to spare while waiting for the semester to start, and would like to get a headstart on learning Git and GitHub (used a lot in this course), you are welcome to follow the [Git Learning Trail]({{ baseUrl }}/git-trail.html).<br>
Doing so is totally optional, as the same content will be covered during the subsequent weeks as well.

</div>
{#====================================================================================================================#}
Expand Down
2 changes: 1 addition & 1 deletion admin/common-tutorials-fragment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

* Form teams, under the guidance of the tutor. See the panel below for _team forming constrains_ and other related info.<br>

{{ embed_topic("tp-teams.md#main", "Admin " + icon_embedding + " **Teams → Team Forming Constraints**", "2", indent="2") }}
{{ embed_topic(baseUrl+"/admin/tp-teams.md#main", "Admin " + icon_embedding + " **Teams → Team Forming Constraints**", "2", indent="2") }}
</div>
<!-- ------------------------------------------------------------------------------------------------------ -->
<div id="register-the-team">
Expand Down
8 changes: 4 additions & 4 deletions admin/gradeBreakdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ skinparam backgroundcolor transparent
@endwbs
</puml>

{{ embed_topic("participation.md#main", "Admin " + icon_embedding + " Participation Marks", "3") }}
{{ embed_topic(baseUrl+"/admin/participation.md#main", "Admin " + icon_embedding + " Participation Marks", "3") }}
<p/>
{{ embed_topic("ip-grading.md#main", "Admin " + icon_embedding + " Individual Project (iP) Grading", "3") }}
{{ embed_topic(baseUrl+"/admin/ip-grading.md#main", "Admin " + icon_embedding + " Individual Project (iP) Grading", "3") }}
<p/>
{{ embed_topic("tp-grading.md#main", "Admin " + icon_embedding + " Team Project (tP) Grading", "3") }}
{{ embed_topic(baseUrl+"/admin/tp-grading.md#main", "Admin " + icon_embedding + " Team Project (tP) Grading", "3") }}
<p/>
{{ embed_topic("exams.md#main", "Admin " + icon_embedding + " Exams", "3") if course not in ["TIC4001", "TIC4002"] else "" }}
{{ embed_topic(baseUrl+"/admin/exams.md#main", "Admin " + icon_embedding + " Exams", "3") if course not in ["TIC4001", "TIC4002"] else "" }}

</div>

Expand Down
10 changes: 5 additions & 5 deletions admin/ip-tasks-fragment.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,16 +398,16 @@ If your fork doesn't have the `add-gradle-support` branch (i.e., you did not cop
* **Read the following two sections**, if you haven't done so already:
{{ embed_topic("ip-overview.md#main", "Admin " + icon_embedding + " **iP - Overview**", "3", indent="1") }}
{{ embed_topic("ip-grading.md#main", "Admin " + icon_embedding + " **iP - Grading**", "1", indent="1") }}
{{ embed_topic(baseUrl+"/admin/ip-overview.md#main", "Admin " + icon_embedding + " **iP - Overview**", "3", indent="1") }}
{{ embed_topic(baseUrl+"/admin/ip-grading.md#main", "Admin " + icon_embedding + " **iP - Grading**", "1", indent="1") }}
</div>
{#====================================================================================================================#}
<span id="heading_set_up_prerequisites">Set up prerequisites</span>
<div id="desc_set_up_prerequisites">
* **Ensure you have followed the <span class="ps-1 pe-1" style="color:purple; border: 0.5px solid lightgrey">:fas-hard-hat: Preparation</span> sections of the following course tools:**
{{ embed_topic("programmingLanguages.md#main", "Admin " + icon_embedding + " **Programming Language**", "2", indent="1") }}
{{ embed_topic(baseUrl+"/admin/programmingLanguages.md#main", "Admin " + icon_embedding + " **Programming Language**", "2", indent="1") }}
{{ embed_topic("tools.md#rcs", "Admin " + icon_embedding + " **Tools → Git**", "2", indent="1") }}
{{ embed_topic("tools.md#github", "Admin " + icon_embedding + " Tools → **GitHub**", "2", indent="1") }}
{{ embed_topic("tools.md#ide", "Admin " + icon_embedding + " Tools → **Intellij IDEA**", "2", indent="1") }}
Expand All @@ -421,7 +421,7 @@ If your fork doesn't have the `add-gradle-support` branch (i.e., you did not cop
Read through this week's topics before starting the project.<br>
**If you encounter technical problems** while doing the iP, follow the guidelines given below:
{{ embed_topic("appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: Getting Help", "2") }}
{{ embed_topic(baseUrl+"/admin/appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: Getting Help", "2") }}
</box>
1. **Fork** [{{ url_course_org }}/{{ ip_repo_name }}]({{ url_course_org }}/{{ ip_repo_name }}), while noting the points below:<br>
Expand Down Expand Up @@ -739,7 +739,7 @@ This activity is worth `2x2=4` participation points.
* {{ icon_deadline }} **Soft deadline**: midnight before the tutorial
{% endif %}
1. **Double-check to confirm your iP meets the criteria for for full marks**:
{{ embed_topic("ip-grading.md#main", "Admin " + icon_embedding + " **iP - Grading**", "1", indent="1") }}
{{ embed_topic(baseUrl+"/admin/ip-grading.md#main", "Admin " + icon_embedding + " **iP - Grading**", "1", indent="1") }}
2. **Create a new jar file**
* Create the JAR file {% if tic4002 or cs2103%}[using Gradle](https://se-education.org/guides/tutorials/gradle.html) -- this needs to be a [fat JAR file](https://se-education.org/guides/tutorials/jar.html#fat-jar-files:~:text=given%20here.-,Fat%20JAR%20files,-A%20normal%20JAR) (hence, it's best created [using Gradle's shadow plugin](https://se-education.org/guides/tutorials/jar.html#:~:text=Creating-,JAR%20files,With%20Gradle,-With%20Intellij%20IDEA)).{% else %}in one of these ways:
* If you have added a GUI or using third-party libraries: [use Gradle](https://se-education.org/guides/tutorials/gradle.html).
Expand Down
2 changes: 1 addition & 1 deletion admin/policies-fragment.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The promptness of a reply is even more important when the email is requesting yo

<span class="flat">%%Related: [[Admin: Appendix D: Getting Help](#admin-appendixD-help-anchor)]%%</span>

{{ embed_topic("appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: How to get Help in " + course_pair, "3") }}
{{ embed_topic(baseUrl+"/admin/appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: How to get Help in " + course_pair, "3") }}

</div>

Expand Down
4 changes: 2 additions & 2 deletions admin/tp-tasks-fragment.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ As we are still at the early stages of identifying a problem to solve, do not th
<include src="../book/about/usage.md#tip-about-popup-url" />
</box>

{{ embed_topic("tp-expectations.md#main", "Admin " + icon_embedding + " **tP: Expectations**", "3", indent="2") }}
{{ embed_topic("tp-constraints.md#main", "Admin " + icon_embedding + " **tP: Constraints**", "3", indent="2") }}
{{ embed_topic(baseUrl+"/admin/tp-expectations.md#main", "Admin " + icon_embedding + " **tP: Expectations**", "3", indent="2") }}
{{ embed_topic(baseUrl+"/admin/tp-constraints.md#main", "Admin " + icon_embedding + " **tP: Constraints**", "3", indent="2") }}
{{ embed_topic("tp-grading.md#criteria-productDesign", "Admin " + icon_embedding + " **tP: Grading → ==Criteria Used for Grading the Product Design==**", "3", indent="2") }}

<div class="indented">
Expand Down
2 changes: 1 addition & 1 deletion admin/tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

* **No direct tech help**: Tutors are prohibited from giving direct technical help, other than to give you some general direction to finding a solution. %%Rationale: We want you to learn the vital survival skill of troubleshooting technical problems.%%

{{ embed_topic("appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: How to get Help in " + course_pair, "2", indent="1") }}
{{ embed_topic(baseUrl+"/admin/appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: How to get Help in " + course_pair, "2", indent="1") }}

<br/>

Expand Down
4 changes: 2 additions & 2 deletions admin/weeklySchedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* get an introduction to the current week's topics
* submit the in-lecture quiz/activities (if any)

{{ embed_topic("lectures.md#main", "Admin " + icon_embedding + " Lectures", "3", indent=2) }}
{{ embed_topic(baseUrl+"/admin/lectures.md#main", "Admin " + icon_embedding + " Lectures", "3", indent=2) }}

<p/>

Expand Down Expand Up @@ -76,7 +76,7 @@
* demonstrate evidence of your learning weekly topics to the tutor
* learn from peer demos of showing evidence of their own learning

{{ embed_topic("tutorials.md#main", "Admin " + icon_embedding + " Tutorials", "2", indent=2) }}
{{ embed_topic(baseUrl+"/admin/tutorials.md#main", "Admin " + icon_embedding + " Tutorials", "2", indent=2) }}
<p/>

{{ icon_calendar }} **[End of tutorial - Start of lecture]**<br>
Expand Down
2 changes: 1 addition & 1 deletion book
4 changes: 2 additions & 2 deletions common/macros.njk
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{% set popup_url = "" %}
{% set status = 'minimized' %}
{% if '#main' in source or '#' not in source %}
{% set popup_url %}popup-url="{{ source | replace(".md", ".html") }}"{% endset %}
{% set popup_url %}popup-url="{{ baseUrl }}/{{ source | replace(".md", ".html") | replace("#main", "") }}"{% endset %}
{% set status = 'collapsed' %}
{% endif %}
<panel type="{{ panel_type }}" {{ popup_url }} {{ status }} >
Expand Down Expand Up @@ -107,7 +107,7 @@
{% if indent != "0" %}<div class="indented-level{{ indent }}">{% endif %}
{% set popup_url = "" %}
{% if '#main' in source or '#' not in source %}
{% set popup_url %}popup-url="{{ source | replace(".md", ".html") }}"{% endset %}
{% set popup_url %}popup-url="{{ source | replace(".md", ".html") | replace("#main", "") }}"{% endset %}
{% if not status %}{% set status = 'collapsed'%}{% endif %}
{% endif %}
{% if not status %}{% set status = 'minimized'%}{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion git-trail/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pageNav: 4

# :fas-route: ++Git Learning Trail++{.text-success}

<p class="lead"><md>This learning trail for those who are new to Git and would like to learn it in advance to prepare for the course.<br>
<p class="lead"><md>This learning trail is for those who are new to Git and would like to learn it in advance to prepare for the course.<br>
These topics are covered during the [regular course schedule](../schedule/timeline.html) and in the [course textbook](../se-book-adapted/index.html) as well. So, <mark>doing this in advance is optional</mark>, but doing so can reduce your workload during the regular semester.</md></p>

<box>
Expand Down
2 changes: 1 addition & 1 deletion schedule/week4/notices-cs2103-fragment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Do the following during the meeting:

On a separate note, our guidelines on dealing with technical problems:

{{ embed_topic("../../admin/appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: Getting Help", "4", indent="0") }}
{{ embed_topic(baseUrl+"/admin//appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: Getting Help", "4", indent="0") }}
</box>

0 comments on commit 7e31337

Please sign in to comment.