diff --git a/content/undergraduate/curriculum.en.md b/content/undergraduate/curriculum.en.md index c363328..6a9fe96 100644 --- a/content/undergraduate/curriculum.en.md +++ b/content/undergraduate/curriculum.en.md @@ -5,6 +5,7 @@ metadata: none toc: false weight: 2 type: wide +hasMermaid: true --- @@ -85,8 +86,7 @@ type: wide ## Course Prerequisites Graph -```mermaid "caption=prerequisites" -%%{ init: { 'flowchart': { 'curve': 'linear' } } }%% +{{< svg-graph >}} flowchart TD classDef core fill:#0072B2,stroke:none,stroke-width:2px,color:#eee,font-weight:bolder @@ -232,7 +232,8 @@ click CC6 href "/undergraduate/electives" "Undergraduate Electives" click HSS1 href "/undergraduate/electives" "Undergraduate Electives" click HSS2 href "/undergraduate/electives" "Undergraduate Electives" -``` +{{< /svg-graph >}} + ## Committee diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html index 2202d9d..2f8975a 100644 --- a/layouts/partials/footer/footer.html +++ b/layouts/partials/footer/footer.html @@ -26,4 +26,7 @@
{{- .Name -}}
{{ end }} + {{ if .Params.hasMermaid }} + {{ partial "footer/optional-scripts.html" . }} + {{ end }} diff --git a/layouts/shortcodes/svg-graph.html b/layouts/shortcodes/svg-graph.html new file mode 100644 index 0000000..aed8f28 --- /dev/null +++ b/layouts/shortcodes/svg-graph.html @@ -0,0 +1,54 @@ + +
+ + + +