Lots of template work - Luminate, G2, Crayon. Added Mizuno Running's script. Small changes to notes.

This commit is contained in:
Norm Rasmussen
2023-06-15 19:50:44 -04:00
parent 73ae8fe55b
commit 807739cae6
13 changed files with 523 additions and 38 deletions

View File

@ -0,0 +1,34 @@
<div class="np-card">
<div class="np-card-container">
{% if course.ribbon %}
<div class="np-card-ribbon">
{{ course.ribbon }}
</div>
{% endif %}
<img
class="np-card-image"
alt="{{ course.name }}"
src="{{ course.image_url }}"
>
<div class="np-card-content np-card-content-vertical np-card-padding onboarding-course-card">
<h3 class="np-card-content-title onboarding-course-title">
{{ course.name }}
</h3>
<div class="np-card-content-subtitle onboarding-course-subtitle">
{{ course.instructor_names }}
</div>
<div class="np-card-content-footer">
<div class="np-card-content-progress np-button-color">
{% t shared.progress, count: course.progress %}
</div>
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
{% if course.has_to_restart? %}
{% include "course_version_outdated_popup", path: course_path %}
{% endif %}
<a class="np-button np-button-wide onboarding-course-button" href="{{ course_path }}">
{% t shared.view %}
</a>
</div>
</div>
</div>
</div>

View File

@ -25,12 +25,12 @@
{{ homepage.featured_courses_subheadline }} {{ homepage.featured_courses_subheadline }}
</div> </div>
</div> </div>
{% if courses.in_catalog.any? %} {% if courses.enrolled.any? %}
<div class="np-homepage-featured-courses row"> <div class="np-homepage-featured-courses row">
{% for course in courses.in_catalog %} {% for course in courses.enrolled %}
{% comment %} {% if course.properties.featured_onboarding %} {% endif %}{% endcomment %} {% comment %} {% if course.properties.featured_onboarding %} {% endif %}{% endcomment %}
<div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content"> <div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
{% include "cards_course" with course %} {% include "onboarding_cards_course" with course %}
</div> </div>
{% endfor %} {% endfor %}
</div> </div>

View File

@ -38,6 +38,27 @@ body, html, div {
.red-btn { .red-btn {
background: #d94a66; background: #d94a66;
}
.onboarding-course-title {
color: white;
}
.onboarding-course-subtitle {
color:white;
}
.onboarding-course-card {
background: #0538BF;
}
.onboarding-course-button {
background-color: #89D9E1;
color: #0538BF;
}
.np-card-content-progress {
color: white;
} }
/* ------------------------------------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------------------------------------ */
/* Login Page Styles */ /* Login Page Styles */

View File

@ -0,0 +1,160 @@
<script>
function showPopup() {
setTimeout(function() {
document.querySelector(".popup-trigger").click()
console.log("showing popup")
}, 500)}
</script>
<button
type="button"
class="popup-trigger"
data-toggle-class-on-target
data-toggle-target="#firstTimeUsers"
data-toggle-escape
data-toggle-modal>
Click
</button>
</main>
<div
class="first-time-user-popup"
id="firstTimeUsers"
role="dialog"
aria-labelledby="dialogTitle"
aria-describedby="dialogContent"
aria-hidden="true">
<section class="first-time-user-popup-container">
<div id="dialogContent" class="first-time-user-popup-content">
<div class="modal-headline">Welcome to G2 University, {{ current_person.first_name }}! Have you become
#G2Certified yet?</div>
<div class="modal-links">
<a href="javascript:setPopupSeenProperty('/app')" class="secondary" data-toggle-trigger-off>
I'm just looking around.</a>
<a href="javascript:setPopupSeenProperty('/app/learning_paths')" data-redirect="/app">Let's get
#G2Certified!</a>
</div>
</div>
</section>
</div>
{% if current_person.signed_in? %}
{% unless current_person.email contains "+preview" %}
<script>
window.addEventListener("load", function() {
showPopup()
})
</script>
{% endunless %}
{% endif %}
<script>
function setPopupSeenProperty(redirectUrl) {
localStorage.setItem("modal_clicked", true);
const data = { learner_uuid: '{{current_person.id}}' }
window.location.href = redirectUrl;
}
</script>
<style>
/* MODAL POPUP */
.first-time-user-popup {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1000;
display: flex;
padding: 1em;
background-color: rgba(0, 0, 0, 0.75);
visibility: hidden;
opacity: 0;
pointer-events: none;
transition: 0.25s ease-out;
}
.first-time-user-popup.is-active {
visibility: visible;
opacity: 1;
pointer-events: auto;
}
.first-time-user-popup-container {
width: 100%;
max-width: 600px;
margin: auto;
transform: translateY(-1em) scale(0.95);
background-color: white;
transition: transform 0.25s ease-out;
border-radius: 8px;
}
.first-time-user-popup.is-active .first-time-user-popup-container {
transform: translateY(0) scale(1);
}
.modal-headline {
font-size: 20px;
line-height: normal;
font-weight: 500;
margin-bottom: 32px;
text-align: center;
}
.modal-links {
display: flex;
}
.modal-links a {
border: 2px solid #3c228a;
background: #3c228a;
padding: 8px 16px;
text-align: center;
width: calc(50% - 8px);
margin: 0 8px;
border-radius: 30px;
color: #fff;
text-decoration: none;
font-weight: 700;
transition: all 0.2s;
}
.modal-links a.secondary {
background: transparent;
color: #3c228a;
}
.modal-links a:hover {
border: 2px solid #13014a;
background: #13014a;
}
.modal-links a.secondary:hover {
border: 2px solid #13014a;
background: #ebe8f3;
color: #13014a;
}
.first-time-user-popup-content {
padding: 32px 16px;
}
@media (min-width: 768px) {
.first-time-user-popup-content {
padding: 32px;
}
.modal-headline {
font-size: 24px;
}
.modal-links a {
min-height: 40px;
line-height: 40px;
}
}
</style>

View File

@ -0,0 +1,162 @@
<script>
function showPopup() {
setTimeout(function() {
document.querySelector(".popup-trigger").click()
console.log("showing popup")
}, 500)}
</script>
<button
type="button"
class="popup-trigger"
data-toggle-class-on-target
data-toggle-target="#firstTimeUsers"
data-toggle-escape
data-toggle-modal>
Click
</button>
</main>
<div
class="first-time-user-popup"
id="firstTimeUsers"
role="dialog"
aria-labelledby="dialogTitle"
aria-describedby="dialogContent"
aria-hidden="true">
<section class="first-time-user-popup-container">
<div id="dialogContent" class="first-time-user-popup-content">
<div class="modal-headline">Welcome to G2 University, {{ current_person.first_name }}! Have you become
#G2Certified yet?</div>
<div class="modal-links">
<a href="javascript:setPopupSeenProperty('/app')" class="secondary" data-toggle-trigger-off>
I'm just looking around.</a>
<a href="javascript:setPopupSeenProperty('/app/learning_paths')" data-redirect="/app">Let's get
#G2Certified!</a>
</div>
</div>
</section>
</div>
{% if current_person.signed_in? %}
{% unless current_person.email contains "+preview" %}
<script>
window.addEventListener("load", function() {
showPopup()
})
</script>
{% endunless %}
{% endif %}
<script>
function setPopupSeenProperty(redirectUrl) {
localStorage.setItem("modal_clicked", true);
const data = { learner_uuid: '{{current_person.id}}' }
window.location.href = redirectUrl;
}
</script>
<style>
/* MODAL POPUP */
.first-time-user-popup {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1000;
display: flex;
padding: 1em;
background-color: rgba(0, 0, 0, 0.75);
visibility: hidden;
opacity: 0;
pointer-events: none;
transition: 0.25s ease-out;
}
.first-time-user-popup.is-active {
visibility: visible;
opacity: 1;
pointer-events: auto;
}
.first-time-user-popup-container {
width: 100%;
max-width: 600px;
margin: auto;
transform: translateY(-1em) scale(0.95);
background-color: white;
transition: transform 0.25s ease-out;
border-radius: 8px;
}
.first-time-user-popup.is-active .first-time-user-popup-container {
transform: translateY(0) scale(1);
}
.modal-headline {
font-size: 20px;
line-height: normal;
font-weight: 500;
margin-bottom: 32px;
text-align: center;
color: #F7492D;
}
.modal-links {
display: flex;
}
.modal-links a {
border: 2px solid #3c228a;
background: #F7492D;
padding: 8px 16px;
text-align: center;
width: calc(50% - 8px);
margin: 0 8px;
border-radius: 30px;
color: #fff;
text-decoration: none;
font-weight: 700;
transition: all 0.2s;
}
.modal-links a.secondary {
background: transparent;
color: #3c228a;
}
.modal-links a:hover {
border: 2px solid #13014a;
background: #13014a;
}
.modal-links a.secondary:hover {
border: 2px solid #13014a;
background: #ebe8f3;
color: #13014a;
}
.first-time-user-popup-content {
padding: 32px 16px;
}
@media (min-width: 768px) {
.first-time-user-popup-content {
padding: 32px;
}
.modal-headline {
font-size: 24px;
}
.modal-links a {
min-height: 40px;
line-height: 40px;
}
}
</style>

View File

@ -57,7 +57,6 @@
{% include "section_faqs" %} {% include "section_faqs" %}
{% include "section_instructors" %} {% include "section_instructors" %}
</main> </main>
{% include "footer" %} {% include "footer" %}

View File

@ -7,7 +7,7 @@
<div class='discussion-container' style="border: 18px solid rgb(0, 0, 0); overflow: hidden; margin-left: 100px; margin-top: 35px; width: 1065px;"> <div class='discussion-container' style="border: 18px solid rgb(0, 0, 0); overflow: hidden; margin-left: 100px; margin-top: 35px; width: 1065px;">
<iframe scrolling="yes" src="https://www.mountainproject.com/partner-finder" style="border: 0px none; margin-left: 15px auto; height: 1954px; margin-top: -100px; width: 1060px;"></iframe> <iframe scrolling="yes" src="https://www.mountainproject.com/partner-finder" style="border: 0px none; margin-left: 15px auto; height: 1954px; margin-top: -100px; width: 1060px;"></iframe>
</div> </div>
</main> {% include 'modal_popup' %}
{% include 'footer' %} {% include 'footer' %}
<style> <style>

View File

@ -242,3 +242,16 @@ Concerns:
* She doesn't know yet where she is going to get this sources for making content. * She doesn't know yet where she is going to get this sources for making content.
* Where does "follow up" training come from? What are the subjects? * Where does "follow up" training come from? What are the subjects?
* She wants to be trained on making more modular, micro, smaller trainings * She wants to be trained on making more modular, micro, smaller trainings
*
## 06/15/2023
### Analytics Feedback
Wants the Learning Path Analysis combined with Course Popularity. Basically, LP Popularity:
* How many learners started
* How many learners finished
* How many were "enrolled" in the learning path.
* Unique learner's don't matter
TODO: Create above report for Sophia in Looker.

View File

@ -19,7 +19,8 @@ def getfromName(baseUrlname, apiKey):
if response.status_code == 200: if response.status_code == 200:
print("200 Response!") print("200 Response!")
else: else:
print("Another error! " + response.status_code) print("Another error! ")
print(response.status_code)
response = response.json() response = response.json()
# print(response) # print(response)
# uuid = response["data"][0]["id"] # uuid = response["data"][0]["id"]

View File

@ -0,0 +1 @@
{"scriptId":"1zpWkBv4TQb778uhXgOLNA_cLp5ENPmGHAP7tCJZ7ri41ocxfdAZCuLzp","rootDir":"/Users/normrasmussen/Documents/Work/Scripts/GoogleScripts/Mizuno_running_props"}

View File

@ -0,0 +1,87 @@
const sheet = SpreadsheetApp.getActiveSheet();
const apiKey = 'XeRrtgm0BFYPjOjPekVwCdGkW';
function getUuids() {
var sheet = SpreadsheetApp.getActiveSheet();
var numRows = sheet.getLastRow()-1; // Number of rows to process
var dataRange = sheet.getRange(2, 2, numRows, 1);
var values = dataRange.getValues();
writeHeadings();
for (email in values){
var row = values[email];
var email = row[0];
var api_url = 'https://api.northpass.com/v2/people/?filter[email][eq]='+email;
const settings = {
async: true,
crossDomain: true,
method: 'GET',
headers: {
accept: 'application/json',
'X-Api-Key': apiKey
}
};
const sendMsg = UrlFetchApp.fetch(api_url, settings);
var uuidResponse = sendMsg.getContentText();
var parsedata = JSON.parse(uuidResponse);
try {
var uuid = parsedata["data"][0]["id"];
if (email != "") {
Logger.log(email)
findRow(email, uuid);
}
}
catch(ex) {
Logger.log(ex)
continue
}
finally {
}
};
};
function findRow(email, uuid){
var sheetRow = SpreadsheetApp.getActiveSpreadsheet();
var data = sheetRow.getDataRange().getValues();
for(var i = 0; i<data.length;i++){
if(data[i][1] == email){ //[1] because column B
Logger.log((i+1))
var row = i+1;
propstoSheet(uuid, row, email);
}
}
}
function propstoSheet(uuid, row, email) {
var uuid_url = 'https://api.northpass.com/v2/properties/people/'+uuid;
const settings = {
async: true,
crossDomain: true,
url: uuid_url,
method: 'GET',
headers: {
accept: 'application/json',
'X-Api-Key': apiKey,
}
};
const sendMsg = UrlFetchApp.fetch(uuid_url, settings);
var txtResponse = sendMsg.getContentText();
var parseProps = JSON.parse(txtResponse);
Logger.log(parseProps)
var role = parseProps["data"]["attributes"]["properties"]["city"];
var user_id = parseProps["data"]["attributes"]["properties"]["state"];
var paid = parseProps["data"]["attributes"]["properties"]["store_name"];
// Write the Data to each row and column
sheet.getRange(row, 5).setValue(role);
sheet.getRange(row, 6).setValue(user_id);
sheet.getRange(row, 7).setValue(paid);
// Logger.log(row + "," + email);
}
function writeHeadings() {
// Write the new Column Headings
sheet.getRange(1, 5).setValue("City");
sheet.getRange(1, 6).setValue("State");
sheet.getRange(1, 7).setValue("Store Name");
}

View File

@ -0,0 +1,7 @@
{
"timeZone": "America/New_York",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8"
}