Was brought on to fully help Arbor Education's risk and so downloaded/backed up templates and started some of that work.
This commit is contained in:
@ -0,0 +1,41 @@
|
||||
{% include "header" %}
|
||||
{% include "sub_navigation" %}
|
||||
<main class="np-main np-learning-paths np-subpage-container np-max-width">
|
||||
<div class="np-learning-paths-main">
|
||||
<div class="heading">
|
||||
{% t shared.learning_paths %}
|
||||
</div>
|
||||
<div class="np-resource-subtitle">
|
||||
{% t .subtitle %}
|
||||
</div>
|
||||
{% include "learning_paths_index", items: learning_paths.available %}
|
||||
</div>
|
||||
</main>
|
||||
{% include "footer" %}
|
||||
|
||||
<script>
|
||||
|
||||
function sortLearningPaths() {
|
||||
const learningPaths = Array.from(document.querySelectorAll('.lp-card-container'));
|
||||
|
||||
learningPaths.sort((a, b) => {
|
||||
const titleA = a.querySelector('.card-title').textContent.trim().toLowerCase();
|
||||
const titleB = b.querySelector('.card-title').textContent.trim().toLowerCase();
|
||||
return titleA.localeCompare(titleB);
|
||||
});
|
||||
|
||||
learningPaths.forEach(learningPath => {
|
||||
learningPath.remove();
|
||||
});
|
||||
|
||||
|
||||
const container = document.querySelector('.np-learning-paths-resources');
|
||||
|
||||
learningPaths.forEach(learningPath => {
|
||||
container.appendChild(learningPath);
|
||||
});
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
sortLearningPaths();
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user