Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Advisor Front-End #30

Merged
merged 10 commits into from
Feb 5, 2019
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## In development

- Finally implement clipboard functionality; formally establish toolbar [31](https://github.com/nre-learning/antidote-web/pull/31)
- Implement Advisor functionality [#30](https://github.com/nre-learning/antidote-web/pull/30)

## 0.2.0 - January 24, 2019

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ RUN apt-get update && apt-get install -y git
COPY . /tmp/antidote-web
WORKDIR /tmp/antidote-web
RUN sed -i "s/{{version}}/$(git rev-parse HEAD)/g" /tmp/antidote-web/src/main/webapp/index.html
RUN sed -i "s/{{version}}/$(git rev-parse HEAD)/g" /tmp/antidote-web/src/main/webapp/courses.html
RUN sed -i "s/{{version}}/$(git rev-parse HEAD)/g" /tmp/antidote-web/src/main/webapp/advisor/index.html
RUN sed -i "s/{{version}}/$(git rev-parse HEAD)/g" /tmp/antidote-web/src/main/webapp/advisor/courseplan.html
RUN sed -i "s/{{version}}/$(git rev-parse HEAD)/g" /tmp/antidote-web/src/main/webapp/stats/index.html
RUN sed -i "s/{{version}}/$(git rev-parse HEAD)/g" /tmp/antidote-web/src/main/webapp/labs/index.html
RUN mvn package
Expand Down
190 changes: 190 additions & 0 deletions src/main/webapp/advisor/courseplan.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<title>NRE Labs</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="../css/bootstrap.css" media="screen">
<link rel="stylesheet" href="../css/bootstrap.min.css">
<link rel="stylesheet" href="../css/advisor.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="../js/bootstrap.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.6.0/bootstrap-slider.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.6.0/css/bootstrap-slider.min.css">
</script>

<script>

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-120903857-1']);
_gaq.push(['_setDomainName', "labs.networkreliability.engineering"]);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);

(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

<script type="text/javascript" src="../js/antidote.js?{{version}}"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {

urlRoot = window.location.href.split('/').slice(0, 3).join('/');

// TODO(mierdin): throw error if no lesson ID provided

if (urlRoot.substring(0, 11) == "https://ptr") {
appendPTRBanner();
}

getLessonCategories()

getPrereqs()

var lessonSlug = LESSONS[getLessonId()].Slug
var planTitle = document.getElementById('plantitle')
planTitle.innerText = "Your Journey to " + lessonSlug

$('#planNamebox').on('input', function (e) {
if (e.target.value == "") {
planTitle.innerText = "Your Journey to " + lessonSlug
} else {
planTitle.innerText = e.target.value + "'s Journey to " + lessonSlug
}
});

});
</script>

<link rel="apple-touch-icon" sizes="57x57" href="/icons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/icons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/icons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/icons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/icons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/icons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/icons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/icons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
<link rel="manifest" href="/icons/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/icons/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>

<body>
<div class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a href="/" class="navbar-brand">
<img src="/images/nrelabs_long.png" style="height: 37px;" /></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="/advisor/index.html" class="btn btn-secondary">Search Lessons</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/stats/">Stats</a>
</li>
<li class="nav-item">
<a class="nav-link" target="_blank" href="http://antidoteproject.readthedocs.io/">Docs</a>
</li>
<li class="nav-item">
<a class="nav-link" target="_blank" href="https://twitter.com/NRELabs">Follow on Twitter!</a>
</li>
</ul>
</div>
</div>
</div>



<div class="container">

<div class="bs-docs-section">

<div class="jumbotron">
<h1 class="display-4">Your Custom Learning Plan.</h1>
<p class="lead">Based on the suggested prerequisites for the lesson you selected, and your existing
strengths,
we've curated a custom learning path for you to get where you need to be.
</p>
<hr class="my-4">
<p>Scroll down for the lesson plan, or use the options below to print or send this plan.</p>
<p style="display: flex;max-width:500px" class="lead">
<input id="planNamebox" class="form-control" style="font-size:30px;margin-right:10px;" type="text"
placeholder="Enter your name..." aria-label="planNamebox">
<button class="btn btn-primary btn-lg" onclick="window.print();" role="button">Print</button>
</p>
</div>
<div id="timeline" class="timeline">
<div style="margin:10px;">
<h1 style="max-width: 700px;" id="plantitle">Your Journey to Greatness</h1>
<a href="https://labs.networkreliability.engineering">https://labs.networkreliability.engineering</a>
</div>
</div>
</div>

<div id="strengthsFinder" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="strengthsFinderLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="strengthsFinderLabel">Identify your strengths</h5>
</div>

<div class="modal-body" style="text-align: center;">
<p>Answer the following questions, so we can construct a lesson plan most relevant to you!</p>
</div>

<div id="strengthsFinder-body" class="modal-body" style="text-align: center;">
</div>
<div class="modal-footer">
<div id="modal-body" class="modal-body" style="text-align: right;">
<button id="btnSkip" type="button" onclick="buildLessonPlan({})" class="btn btn-outline-primary">Skip</button>
<button id="btnSubmit" type="button" onclick="buildLessonPlan(getStrengths())" class="btn btn-primary">Submit</button>
</div>
</div>
</div>
</div>
</div>

<footer id="footer">
<div class="row">
<div class="col-lg-12">

<p>Built by the
<a href="https://github.com/orgs/nre-learning/people" target="_blank">NRE Learning Team</a>
<p>Theme by
<a href="http://thomaspark.co">Thomas Park</a>. Theme code released under the
<a href="https://github.com/thomaspark/bootswatch/blob/master/LICENSE">MIT License</a>.</p>
<p>The
<a href="https://github.com/nre-learning/antidote" target="_blank">Antidote Project</a> is
published under Apache v2.</p>
<p>Sponsored by Juniper Networks, Inc. Your use of this site is governed by the <a href="https://labs.networkreliability.engineering/nrelabs_agreement.pdf"
target="_blank">Terms of Use.</a></p>
</div>
</div>

</footer>


</div>
</body>

</html>
Loading