Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion main/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<script src="../js/plots/createHeatmap.js" defer></script>
<script src="../js/plots/createViolinPlot.js" defer></script>
<script src="../js/afterSubmit.js" defer></script>
<!-- tutorial dependencies -->
<link rel="stylesheet" href="https://unpkg.com/intro.js/minified/introjs.min.css">
<script src="https://unpkg.com/intro.js/minified/intro.min.js" defer></script>
<script src="../js/tutorial.js" defer></script>
</head>

<body>
Expand All @@ -49,6 +53,7 @@
<div class="nav-wrapper">
<a href="index.html" style="font-style: italic" class="brand-logo center">WebGen</a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a id="tutorialAnchor" onclick="startTutorial()">Tutorial</a></li>
<li class="active"><a href="about.html">About</a></li>
</ul>
<!-- <ul id="nav-mobile" class="right hide-on-med-and-down">
Expand Down Expand Up @@ -152,7 +157,7 @@ <h5 style="text-align: center; color: lightcoral; font-family: Georgia, 'Times N
});
</script>

<div>
<div id="tumorSelectorArea">
<p style="text-align: center"><b>1) Select tumor type(s)</b></p>
<div id="cancerQuerySelectBox">
<select
Expand Down
33 changes: 33 additions & 0 deletions main/js/tutorial.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Tutorial using intro.js

const startTutorial = () => {
// See https://introjs.com/docs/intro/options#options
const options = {
showBullets: false,
steps: [{
element: document.querySelector("#tutorialAnchor"),
title: 'Welcome!',
intro: 'We are so happy to see you here! 👋',
}, {
element: document.querySelector('#tumorSelectorArea'),
intro: 'Select one or more tumor types here.',
position: 'top',
}, {
element: document.querySelector("#geneOneQuerySelectBox"),
intro: 'Select one or more genes here.'
}, {
element: document.querySelector('#clinicalQuerySelectBox'),
intro: 'Select metadata here.'
}, {
element: document.querySelector("#geneTwoQuerySelectBox"),
intro: 'Select another gene (???)',
}, {
element: document.querySelector("#pathwaySelectBox"),
intro: "Select a pathway here."
}, {
element: document.querySelector("#submitButton"),
intro: "Click submit, and wait a few seconds for your plots!"
}]
};
introJs().setOptions(options).start()
}