From aa79060842ad617e49be9bd306790cc953816142 Mon Sep 17 00:00:00 2001 From: Jen Schripsema Date: Tue, 30 Apr 2024 17:11:41 -0600 Subject: [PATCH] source v-emodpy-typhoid/bin/activate --- docs/_static/show_block_by_os.js | 57 -------------------------------- docs/_static/theme_overrides.css | 37 --------------------- docs/installation-basic.rst | 19 +++-------- 3 files changed, 4 insertions(+), 109 deletions(-) delete mode 100644 docs/_static/show_block_by_os.js diff --git a/docs/_static/show_block_by_os.js b/docs/_static/show_block_by_os.js deleted file mode 100644 index a1fad6c..0000000 --- a/docs/_static/show_block_by_os.js +++ /dev/null @@ -1,57 +0,0 @@ -const supported_oses = ["Windows", "Linux"]; - -function hideAllBut(os, div=null) { - let jq = div === null ? document: div; - supported_oses.forEach(function(item, idx) { - var selector = ".os-code-block ." + item.toLowerCase() - $(jq).find(selector).hide(); - $(jq).find(".os-code-block li").removeClass("active"); - }); - - $(jq).find(".os-code-block ." + os.toLowerCase()).show(); - $(jq).find('.os-code-block li:contains("' + os + '")').addClass("active"); -} - -function getOS() { - var userAgent = window.navigator.userAgent, - platform = window.navigator.platform, - macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'], - windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'], - iosPlatforms = ['iPhone', 'iPad', 'iPod'], - os = null; - - if (macosPlatforms.indexOf(platform) !== -1) { - os = 'Mac OS'; - } else if (iosPlatforms.indexOf(platform) !== -1) { - os = 'iOS'; - } else if (windowsPlatforms.indexOf(platform) !== -1) { - os = 'Windows'; - } else if (/Android/.test(userAgent)) { - os = 'Android'; - } else if (/Linux/.test(platform)) { - os = 'Linux'; - } - - return os; -} - - -(function ($) { - $(document).ready(function () { - var os = getOS(); - - if (os == null) { - os = 'Windows'; - } - - $(".os-code-block div.choices li").on("click", function(){ - var os = $(this).text(); - $(this).class - hideAllBut(os, $(this).closest("div.os-code-block").parent()); - }); - - if (supported_oses.includes(os)) { - hideAllBut(os); - } - }); -})(jQuery); diff --git a/docs/_static/theme_overrides.css b/docs/_static/theme_overrides.css index 2c0fc4c..b67b8be 100644 --- a/docs/_static/theme_overrides.css +++ b/docs/_static/theme_overrides.css @@ -77,40 +77,3 @@ img.math { border-bottom-color: #ced3d3 !important; padding-top: 5px !important; } - -/* define a block that display different instruction per os */ -.os-code-block { - border: 1px solid black; - padding: 2px; -} - -/* give code block distinct link */ -div.os-code-block div.choices ul { - display: inline-block; - border: 1px solid black; - width: 100%; - background-color: #0073a3; -} - -/* Make List elements into links */ -div.os-code-block div.choices li { - float: left; - list-style: none !important; - text-align: center; - border-right: 1px solid black; - padding: 5px; - margin: 0; - color: white; -} - -div.os-code-block div.choices li.active { - font-weight: bold; - background-color: #60add5; - text-decoration: underline; -} - - -/* Make block appear as link */ -div.os-code-block div.choices li:hover { - cursor: pointer; -} diff --git a/docs/installation-basic.rst b/docs/installation-basic.rst index c6bab13..4bbb7f4 100644 --- a/docs/installation-basic.rst +++ b/docs/installation-basic.rst @@ -15,24 +15,13 @@ Follow the steps below to install emodpy-typhoid. #. Activate the virtual environment: - .. container:: os-code-block + * For Windows, enter the following:: - .. container:: choices + v-emodpy-typhoid\Scripts\activate - * Windows - * Linux + * For Linux, enter the following:: - .. container:: windows - - Enter the following:: - - v-emodpy-typhoid\Scripts\activate - - .. container:: linux - - Enter the following:: - - source v-emodpy-typhoid/bin/activate + source v-emodpy-typhoid/bin/activate #. Install emodpy-typhoid packages::