Creating a script for Anthology to update all the names of their learner properties based on new subscription model. Downloaded and updated some templates for this same project.

This commit is contained in:
Norm Rasmussen
2025-08-21 15:40:52 -04:00
parent b52e7cfac1
commit 6edb965eef
120 changed files with 533 additions and 225 deletions

View File

@ -0,0 +1,53 @@
{% comment %} https://newacademy.anthology.com/app/search/00000000-0000-0000?q= {% endcomment %}
{% comment %} {% if result.type == 'course' %}
{% assign act_count = 0 %}
{% for section in result.course.sections %}
{% for activity in section.activities %}
{% assign act_count = act_count | plus : 1 %}
{% endfor %}
{% endfor %}
{% for course in courses.available %}
{% if result.item.id == course.id %}
{{ course.id }}
{{ course.name }}
{{ course.properties.product_names_for_course_cards }}
{% endif %}
{% endfor %}
<div class="np-card course-card col-md-4">
<div class="np-progress-bar-container" style="background: {{ color_light }}">
<div
style="width: 75%; background: {{ color_dark }}"
class="np-button-background-color np-card-progress-bar course-card-progress-bar">
</div>
</div>
<div class="card-product-banner">
{% if product_logo != 'blank' or product_logo != null %}
<img src='{{ product_logo }}' alt='{{ product_alt }}' class="product-logo"/>
{% else %}
Anthology
{% endif %}
</div>
<div class="np-card-container">
<div class="card-image-replacement"></div>
<div class="np-card-content np-card-content-vertical np-card-padding course-card-info">
<div class="np-flex-1">
<h3 class="np-card-content-title course-card-title">
{{ result.name }}
</h3>
<span style="color: #757575; font-size: 14px">
{{ act_count }} {% if act_count == 1 %}Activity{% else %}Activities{% endif %}
</span>
</div>
</div>
<div class="card-bottom-details">
<a class="np-button np-button-wide course-card-button"
href="{{ result.path }}"
>
View
</a>
</div>
</div>
</div>
{% endif %} {% endcomment %}