diff --git a/web/content/docs/devguide/getting-started/introduction.md b/web/content/docs/devguide/getting-started/introduction.md index 5fc664f53b043b307d837e46d85ddc5fd4a19b25..69597275811ac4ea5c3b5b0377f505b5cab3d363 100644 --- a/web/content/docs/devguide/getting-started/introduction.md +++ b/web/content/docs/devguide/getting-started/introduction.md @@ -12,3 +12,5 @@ aliases = [ "/docs/devguide/" ] # First devguide page +++ In this help section you will find everything related to development. Please walk through the Getting Started-section **step by step**. At the end you will have the latest OGS source code, the OGS finite element simulator compiled and everything you need to start developing for OGS! This first section of the developer guide will give you just a brief introduction, make sure to read the more advanced topics after you have familiarized yourself with the basics. + +Instructions may differ depending on your operating system (OS). Be sure to pick the right one in the **OS selector** at the top of the **next page**. diff --git a/web/src/index.js b/web/src/index.js index 01766cd8773b4e05366052ada0fd288a4a6d85e3..a589c0fc021922a9610dd66ba7d16fe47ad01340 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -1,6 +1,7 @@ import styles from './styles.css' // os-selector +var selectedOS; $("#btn-win").click(function(){ $(".win").show(); $(".linux").hide(); @@ -8,6 +9,7 @@ $("#btn-win").click(function(){ $("#btn-win").addClass("active"); $("#btn-linux").removeClass("active"); $("#btn-mac").removeClass("active"); + window.localStorage.setItem("selectedOS","win"); }); $("#btn-linux").click(function(){ @@ -17,6 +19,7 @@ $("#btn-linux").click(function(){ $("#btn-win").removeClass("active"); $("#btn-linux").addClass("active"); $("#btn-mac").removeClass("active"); + window.localStorage.setItem("selectedOS","linux"); }); $("#btn-mac").click(function(){ @@ -26,6 +29,7 @@ $("#btn-mac").click(function(){ $("#btn-win").removeClass("active"); $("#btn-linux").removeClass("active"); $("#btn-mac").addClass("active"); + window.localStorage.setItem("selectedOS","mac"); }); $( document ).ready(function() { @@ -33,7 +37,14 @@ $( document ).ready(function() { $("#os-selector").hide(); } else { - $("#btn-win").click(); + var os = window.localStorage.getItem("selectedOS"); + console.log(os); + if (os) { + $("#btn-" + os).click(); + } + else { + $("#btn-win").click(); + } } });