+{% raw %} +
+

Instructor: {{ =instructor_name}}

+ +{% endraw %} {% if dynamic_pages == 'True' %} {% raw %} {{ if settings.num_banners > 0 and settings.show_rs_banner: }} diff --git a/runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/static/layout.js b/runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/static/layout.js new file mode 100644 index 000000000..0989c737f --- /dev/null +++ b/runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/static/layout.js @@ -0,0 +1,14 @@ +function renderinstitution_name(){ + myword = document.getElementById("institution2").textContent; + let noinstitution; + + if (myword == "None" ) { + noinstitution = ""; + } + else { + noinstitution = myword; + } + + + document.getElementById("institution2").innerHTML = noinstitution; +} \ No newline at end of file From 8b827a2f7ae132752746feb042171b58f68d2d35 Mon Sep 17 00:00:00 2001 From: Ala Qasem Date: Tue, 7 Dec 2021 21:15:39 +0000 Subject: [PATCH 2/2] fix JavaScript of the layout --- .../_templates/plugin_layouts/sphinx_bootstrap/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html b/runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html index bb03812de..f918b24f9 100644 --- a/runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html +++ b/runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html @@ -316,7 +316,7 @@ let intr_name = document.getElementById("intrname").textContent; let no_intr_name; if ( document.URL.includes("index.html") ) { - if (intr_name == "Instructor: None" ) { + if (intr_name == "Instructor: None" || intr_name == "Instructor: " ) { no_intr_name = ""; } else {