From b7cc84b594bc3ed827bc590d1e35c70faf9b98bf Mon Sep 17 00:00:00 2001 From: stamper Date: Thu, 4 Jul 2019 12:23:41 +0200 Subject: [PATCH 1/2] adjust module layout to accept a default platform value --- _layouts/module.html | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/_layouts/module.html b/_layouts/module.html index c2b0551..513350d 100644 --- a/_layouts/module.html +++ b/_layouts/module.html @@ -18,6 +18,9 @@ function set_activity_view_defaults() { document.getElementById("{{ platform[0] | slugify }}-activity-div").style.display = 'none'; {% endfor %} {% if page.activities %} +{% unless site.default-platform == "NONE" %} +document.getElementById("{{ site.default-platform | slugify }}-activity-div").style.display = 'block'; +{% endunless %} }; function change_activity_content_by_platform(form_control){ {% endif %} @@ -45,6 +48,9 @@ function set_exercises_view_defaults() { document.getElementById("{{ platform[0] | slugify }}-exercises-div").style.display = 'none'; {% endfor %} {% if page.exercises %} +{% unless site.default-platform == "NONE" %} +document.getElementById("{{ site.default-platform | slugify }}-exercises-div").style.display = 'block'; +{% endunless %} }; function change_exercises_content_by_platform(form_control){ {% endif %} @@ -136,10 +142,16 @@ window.onload = set_view_defaults; {% if page.activities %} Show activity for: @@ -168,10 +180,16 @@ Show activity for: -- GitLab From 8f41d0138217895afb50f6227ab9894b3222e8e3 Mon Sep 17 00:00:00 2001 From: stamper Date: Thu, 4 Jul 2019 12:24:17 +0200 Subject: [PATCH 2/2] leave default platform unset for source repository --- _config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_config.yml b/_config.yml index d98d503..29c4b2f 100644 --- a/_config.yml +++ b/_config.yml @@ -13,3 +13,6 @@ commonmark: options: ["SMART"] highlighter: rouge exclude: ["README.md", "TEACHING.md"] + +# options are: "NONE", "ImageJ GUI", "ImageJ Macro", "Jython", "MATLAB" +default-platform: "NONE" -- GitLab