Changes to root directory

This commit is contained in:
Norm Rasmussen
2022-02-23 17:40:01 -05:00
parent 124571c689
commit eb4c2f6322
321 changed files with 351 additions and 15 deletions

Binary file not shown.

View File

@ -0,0 +1,57 @@
<div class="np-dashboard-resources">
{% if courses.enrolled.any? %}
<div class="">
{% assign countComplete = 0 %}
{% assign countInProgress = 0 %}
{% assign countNotStarted = 0 %}
{% assign countTotal = 0 | times: 1.0 %}
{% for course in courses.enrolled %}
{% assign countTotal = countTotal | plus: 1 %}
{% if course.progress == 100 %}
{% assign countComplete = countComplete | plus: 1 %}
{% endif %}
{% if course.progress > 0 and course.progress < 100 %}
{% assign countInProgress = countInProgress | plus: 1 %}
{% endif %}
{% if course.progress == 0 %}
{% assign countNotStarted = countNotStarted | plus: 1 %}
{% endif %}
{% endfor %}
<ul class="circle-list">
<li>
{% include "progress_circle", name:'Completed' , count: countComplete , total: countTotal %}
</li>
<li>
{% include "progress_circle", name:'In Progress' , count: countInProgress , total: countTotal %}
</li>
<li>
{% include "progress_circle", name:'Not Started' , count: countNotStarted , total: countTotal %}
</li>
</ul>
</div>
{% else %}
{% capture message %}
{% t shared.zero_state.courses.index,
key: current_school.course_vocabulary
%}
{% endcapture %}
{% include "courses_zero_state", message: message %}
{% endif %}
</div>
<style>
.circle-list {
list-style-type: none !important;
}
.align-center {
align-items: center !important;
}
.progress-ring__circle {
transition: stroke-dashoffset 0.35s;
}
.progress-ring__circle {
transition: stroke-dashoffset 0.35s;
transform: rotate(-90deg);
transform-origin: center;
}
</style>

View File

@ -0,0 +1,4 @@
{% styles default %}
{% styles colors %}
{% styles custom %}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

View File

@ -0,0 +1,187 @@
<header class="np-header np-header-color">
<div class="np-header-content">
Network First Academy
<div class="np-hidden-desktop np-header-mobile-menu-nav">
{% if current_person.signed_in? %}
<button
data-toggle-class="np-hidden"
class="np-header-mobile-menu-nav-button fal fa-times np-hidden np-header-font-color"
data-toggle-target=".np-header-mobile-avatar-menu,
.np-header-mobile-menu-content, .np-main, .np-footer"
></button>
<button
data-test="open-mobile-menu"
data-toggle-class="np-hidden"
class="np-header-mobile-menu-nav-button np-header-mobile-avatar-menu"
data-toggle-target=".fa-times, .np-header-mobile-menu-content, .np-main, .np-footer"
>
<img
alt="{{ current_person.name }}"
class="np-header-avatar-image"
src="{{ current_person.avatar_url }}"
/>
</button>
{% endif %}
</div>
{% if current_school.logo_url %}
<h1 class="np-header-logo">
<a href="{% route home %}">
<img
alt="{{ current_school.name }}"
class="np-header-logo-image"
src="{{ current_school.logo_url }}"
/>
</a>
</h1>
{% else %}
<a href="{% route home %}" class="np-school-name np-header-font-color">
{{ current_school.name }}
</a>
{% endif %}
<div class="np-hidden-mobile np-header-desktop-nav">
<ul class="np-header-desktop-nav-list">
{% for website_navigation in navigations.header_navigations_external %}
<li class= "np-header-desktop-nav-item">
<a
href="{{ website_navigation.path }}"
class="np-header-desktop-nav-link np-header-font-color"
target="_blank"
>
{{ website_navigation.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% if current_person.signed_in? %}
<div class="np-hidden-mobile np-header-search np-header-search-expanded">
<form action="{% route search %}" method="get" data-test="desktop-search">
<input
aria-label="{% t .search %}"
class="np-header-search-input np-header-font-background-color"
type="text"
name="q"
placeholder="{% t .search %}"
/>
<i class="np-header-search-icon far fa-search"></i>
</form>
</div>
<div class="np-hidden-mobile np-header-avatar">
<button
class="np-header-avatar-button"
data-test="open-desktop-menu"
data-toggle-class-on-target="np-hidden"
data-toggle-target=".np-header-avatar-tooltip"
data-toggle-outside
>
<img
alt="{{ current_person.name }}"
class="np-header-avatar-image"
src="{{ current_person.avatar_url }}"
>
</button>
<div class="np-header-avatar-tooltip np-hidden" role="tooltip">
<span class="np-header-avatar-tooltip-arrow-up"></span>
<div class="np-header-avatar-tooltip-learner">
<div class="np-header-avatar-tooltip-learner-name">
{{ current_person.name }}
</div>
<div class="np-header-avatar-tooltip-learner-email">
{{ current_person.email }}
</div>
</div>
<nav class="np-header-avatar-tooltip-navigation">
{% unless current_school.sso_active? %}
<a
class="np-header-avatar-tooltip-navigation-link"
href="{% route account %}"
>
{% t .profile_settings %}
</a>
{% endunless %}
<a
class="np-header-avatar-tooltip-navigation-link np-danger"
href="{% route logout %}"
>
{% t .sign_out %}
</a>
</nav>
</div>
</div>
{% else %}
<a
class="np-header-sign-in np-header-desktop-nav-link np-header-font-color"
href="{% route login %}"
>
{% t shared.sign_in %}
</div>
{% endif %}
</div>
</header>
<div class="np-hidden-desktop">
<div class="np-header-mobile-menu-content np-hidden">
{% if current_person.signed_in? %}
<img
alt="{{ current_person.name }}"
class="np-header-mobile-menu-content-avatar"
src="{{ current_person.avatar_url }}"
/>
<div class="np-header-mobile-menu-content-name">
{{ current_person.name }}
</div>
{% endif %}
<div class="np-header-mobile-menu-content-nav">
<form
class="np-header-search"
data-test="mobile-search"
method="get"
action="{% route search %}"
>
<input
aria-label="{% t .search %}"
class="np-header-search-input"
type="text"
name="q"
placeholder="{% t .search %}"
/>
<i class="np-header-search-icon far fa-search"></i>
</form>
{% for website_navigation in navigations.header_navigations %}
<a
href="{{ website_navigation.path }}"
class="np-header-mobile-menu-content-button"
{% if website_navigation.external? %} target="_blank" {% endif %}
>
{{ website_navigation.name }}
</a>
{% endfor %}
<div class="np-header-mobile-menu-content-line"></div>
{% unless current_school.sso_active? %}
<a
class="np-header-mobile-menu-content-button"
href="{% route account %}"
>
{% t .profile_settings %}
</a>
{% endunless %}
<a
class="np-header-mobile-menu-content-button np-danger"
href="{% route logout %}"
>
{% t .sign_out %}
</a>
</div>
</div>
</div>
{% include "messages" %}
<style>
.np-header-content {
font-size: 25px !important;
color: #ffff !important;
}
</style>

View File

@ -0,0 +1,37 @@
<div class="np-card-content np-card-content-vertical np-card-padding align-center">
<h3 class="np-card-content-title">
{{name}}
</h3>
<svg
class="progress-ring"
width="120"
height="120">
<circle
class="progress-ring__circle circle-{{name}}"
stroke="white"
stroke-width="4"
fill="transparent"
r="52"
cx="60"
cy="60"/>
<text x="50%" y="50%" text-anchor="middle" stroke="#51c5cf" stroke-width="2px" dy=".3em">{{count}}</text>
</svg>
</div>
<script>
$(document).ready(function(){
var circle = document.getElementsByClassName("circle-{{name}}")[0];
var radius = circle.r.baseVal.value;
var circumference = radius * 2 * Math.PI;
circle.style.strokeDasharray = `${circumference} ${circumference}`;
circle.style.strokeDashoffset = `${circumference}`;
function setProgress(percent) {
const offset = circumference - percent * circumference;
console.log(offset)
circle.style.strokeDashoffset = offset;
}
setProgress('{{ count | divided_by: total }}')
})
</script>

View File

@ -0,0 +1,53 @@
<nav class="np-sub-navigation">
<div class="np-sub-navigation-content">
<div class="np-sub-navigation-content-item np-sub-navigation-content-item-active">
<a class="np-sub-navigation-content-item-link" href="https://www.onenetwork.com/">
One Network Home
</a>
<div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
</div>
<div class="np-sub-navigation-content-item np-sub-navigation-content-item-active">
<a class="np-sub-navigation-content-item-link" href="/app">
All
</a>
<div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
</div>
<div class="np-sub-navigation-content-item np-sub-navigation-content-item-active">
<a class="np-sub-navigation-content-item-link" href="/app">
In Progress
</a>
<div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
</div>
<div class="np-sub-navigation-content-item np-sub-navigation-content-item-active">
<a class="np-sub-navigation-content-item-link" href="/app/catalogue">
Not Started
</a>
<div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
</div>
<div class="np-sub-navigation-content-item np-sub-navigation-content-item-active">
<a class="np-sub-navigation-content-item-link" href="/app/learning_paths">
Completed
</a>
<div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
</div>
<div class="np-sub-navigation-content-item np-sub-navigation-content-item-active">
<a class="np-sub-navigation-content-item-link" href="/app/catalogue">
Discover
</a>
<div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
</div>
</div>
</nav>
<style>
.np-sub-navigation {
padding-top: 10px !important;
padding-bottom: 10px !important;
}
.np-sub-navigation-content-item-link {
height: 14px !important;
}
.np-sub-navigation-content-item-bar {
display: none !important;
}
</style>

View File

@ -0,0 +1,25 @@
{% include "header" %}
{% include "sub_navigation" %}
<main class="np-main np-dashboard np-subpage-container np-max-width">
<div class="row np-flex-center">
<div class="col-xs-12 col-sm-8">
{% if features.learning_paths? %}
<div class="np-dashboard-resources-title">
{% t shared.learning_paths %}
</div>
{% include "learning_paths_index", items: learning_paths.enrolled %}
{% endif %}
<div class="np-dashboard-resources-title">
{% t shared.course_vocabulary.plural, key: current_school.course_vocabulary %}
</div>
{% include "courses_index", class: "col-xs-12 col-sm-6 np-stretch-content" %}
</div>
<div class="np-grid-spacing col-xs-12 col-sm-4">
<div class="np-dashboard-resources-title">
Course Progress
</div>
{% include "completion_dashboard" %}
</div>
</div>
</main>
{% include "footer" %}

View File

@ -0,0 +1,53 @@
{% include "header" %}
<main class="np-main np-homepage">
<div class="np-homepage-hero">
<img class="np-homepage-hero-image"
src="{{ homepage.artwork_url }}"
alt="{{ homepage.headline }}"
/>
<div class="np-homepage-hero-content">
<div class="np-homepage-headline np-header-font-color">
{{ homepage.headline }}
</div>
<div class="np-homepage-subheadline np-header-font-color">
{{ homepage.subheadline }}
</div>
</div>
</div>
{% include "sub_navigation" %}
<div class="np-homepage-featured np-max-width">
<div class="np-homepage-featured-text">
<div class="np-homepage-headline">
{{ homepage.featured_courses_headline }}
</div>
<div class="np-homepage-subheadline">
{{ homepage.featured_courses_subheadline }}
</div>
</div>
<div class="row np-flex-center">
<div class="col-xs-12 col-sm-8">
<div class="np-dashboard-resources-title">
{% t shared.course_vocabulary.plural, key: current_school.course_vocabulary %}
</div>
{% include "courses_index", class: "col-xs-12 col-sm-6 np-stretch-content" %}
</div>
<div class="np-grid-spacing col-xs-12 col-sm-4">
<div class="np-dashboard-resources-title">
Course Progress
</div>
{% include "completion_dashboard" %}
</div>
</div>
</div>
</main>
{% include "footer" %}
<style>
.np-homepage-headline {
font-size: 30px !important;
color: #FB9200;
}
.np-card {
padding-bottom: 1rem !important;
}
</style>

View File

@ -0,0 +1,8 @@
.np-sub-navigation {
padding-top: 10px !important;
padding-bottom: 10px !important;
}
.np-sub-navigation-content-item-link {
height: 14px !important;
}