feat: add people sections and opt-in read more

This commit is contained in:
mohamad
2026-10-14 18:33:11 +03:30
parent 4bcb5f196d
commit 473637f477
33 changed files with 722 additions and 68 deletions
+41 -19
View File
@@ -14,8 +14,8 @@
<div class="page-hero-content">
{% if section.badge %}<div class="section-badge">{{ section.badge }}</div>{% endif %}
{% if section.title %}<h1 class="page-hero-title" id="page-hero-heading-{{ section.pk }}">{{ section.title }}</h1>{% endif %}
{% if section.subtitle %}<p class="page-hero-subtitle">{{ section.subtitle }}</p>{% endif %}
{% if section.content %}<div class="rich-content page-hero-body" data-readmore="160">{{ section.rendered_content }}</div>{% endif %}
{% if section.subtitle %}<p class="page-hero-subtitle" {% if section.read_more_subtitle %}data-readmore="110"{% endif %}>{{ section.subtitle }}</p>{% endif %}
{% if section.content %}<div class="rich-content page-hero-body" {% if section.read_more_content %}data-readmore="160"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
</div>
{% with items=section.items.all %}
{% if items %}
@@ -44,7 +44,7 @@
<div class="about-intro-text">
{% if section.title %}<h2 id="intro-{{ section.pk }}-heading">{{ section.title }}</h2>{% endif %}
{% if section.content %}
<div class="rich-content" data-readmore="200">{{ section.rendered_content }}</div>
<div class="rich-content" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>
{% endif %}
</div>
</div>
@@ -73,7 +73,7 @@
{% if section.title %}<h2 class="section-title" id="grid-{{ section.pk }}-heading">{{ section.title }}</h2>{% endif %}
</div>
{% endif %}
{% if section.content %}<div class="rich-content" data-readmore="200">{{ section.rendered_content }}</div>{% endif %}
{% if section.content %}<div class="rich-content" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
{% with items=section.items.all %}
{% if items %}
<div class="standards-grid">
@@ -98,7 +98,7 @@
<div class="history-content">
{% if section.badge %}<div class="section-badge">{{ section.badge }}</div>{% endif %}
{% if section.title %}<h2 id="history-{{ section.pk }}-heading">{{ section.title }}</h2>{% endif %}
{% if section.content %}<div class="rich-content" data-readmore="200">{{ section.rendered_content }}</div>{% endif %}
{% if section.content %}<div class="rich-content" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
{% if links %}
<div class="history-links">
{% for link in links %}
@@ -138,7 +138,7 @@
{% endif %}
{% if section.content %}
<div class="glass-card fade-in about-custom-card">
<div class="rich-content" data-readmore="200">{{ section.rendered_content }}</div>
<div class="rich-content" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>
</div>
{% endif %}
{% with items=section.items.all %}
@@ -163,14 +163,14 @@
<div class="section-header">
{% if section.badge %}<div class="section-badge">{{ section.badge }}</div>{% endif %}
{% if section.title %}<h2 class="section-title" id="features-heading-{{ section.pk }}">{{ section.title }}</h2>{% endif %}
{% if section.description %}<div class="rich-content section-desc">{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc">{{ section.rendered_content }}</div>{% endif %}
{% if section.description %}<div class="rich-content section-desc" {% if section.read_more_description %}data-readmore="200"{% endif %}>{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
</div>
<div class="features-grid">
{% for item in section.items.all %}
{% include "partials/_linked_card_open.html" with url=item.url card_class="feature-card" %}
{% if item.icon %}<div class="feature-icon" aria-hidden="true">{{ item.icon }}</div>{% endif %}
<h3 class="feature-title">{{ item.title }}</h3>
<p class="feature-desc" data-readmore="88">{{ item.content }}</p>
<p class="feature-desc" {% if item.read_more_content %}data-readmore="88"{% endif %}>{{ item.content }}</p>
{% include "partials/_linked_card_close.html" with url=item.url %}
{% endfor %}
</div>
@@ -183,7 +183,7 @@
<div class="section-header">
{% if section.badge %}<div class="section-badge">{{ section.badge }}</div>{% endif %}
{% if section.title %}<h2 class="section-title" id="screenshots-heading-{{ section.pk }}">{{ section.title }}</h2>{% endif %}
{% if section.description %}<div class="rich-content section-desc">{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc">{{ section.rendered_content }}</div>{% endif %}
{% if section.description %}<div class="rich-content section-desc" {% if section.read_more_description %}data-readmore="200"{% endif %}>{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
</div>
<div class="screenshots-grid">
{% for item in section.items.all %}
@@ -217,7 +217,7 @@
<div class="section-header">
{% if section.badge %}<div class="section-badge">{{ section.badge }}</div>{% endif %}
{% if section.title %}<h2 class="section-title" id="products-heading-{{ section.pk }}">{{ section.title }}</h2>{% endif %}
{% if section.description %}<div class="rich-content section-desc">{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc">{{ section.rendered_content }}</div>{% endif %}
{% if section.description %}<div class="rich-content section-desc" {% if section.read_more_description %}data-readmore="200"{% endif %}>{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
</div>
<div class="products-grid">
{% for product in homepage_products %}
@@ -229,7 +229,7 @@
{% endif %}
<div class="product-card-body">
<h3 class="product-card-title">{{ product.name }}</h3>
<p class="product-card-desc" data-readmore="88">{{ product.short_description }}</p>
<p class="product-card-desc" {% if product.read_more_short_description %}data-readmore="88"{% endif %}>{{ product.short_description }}</p>
<span class="product-card-link">
Explore
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
@@ -251,7 +251,7 @@
<div class="section-header">
{% if section.badge %}<div class="section-badge">{{ section.badge }}</div>{% endif %}
{% if section.title %}<h2 class="section-title" id="products-catalog-heading-{{ section.pk }}">{{ section.title }}</h2>{% endif %}
{% if section.description %}<div class="rich-content section-desc">{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc">{{ section.rendered_content }}</div>{% endif %}
{% if section.description %}<div class="rich-content section-desc" {% if section.read_more_description %}data-readmore="200"{% endif %}>{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
</div>
<div class="products-overview-grid">
{% for product in homepage_products_catalog %}
@@ -263,8 +263,8 @@
{% endif %}
<div class="product-overview-body">
<h3 class="product-overview-title">{{ product.name }}</h3>
<p class="product-overview-short">{{ product.short_description }}</p>
<div class="product-overview-desc rich-content" data-readmore="110">{{ product.rendered_description }}</div>
<p class="product-overview-short" {% if product.read_more_short_description %}data-readmore="88"{% endif %}>{{ product.short_description }}</p>
<div class="product-overview-desc rich-content" {% if product.read_more_description %}data-readmore="110"{% endif %}>{{ product.rendered_description }}</div>
<a href="{{ product.get_absolute_url }}" class="btn-primary">Explore {{ product.name }}</a>
</div>
{% if product.sub_products.all %}
@@ -297,27 +297,49 @@
<div class="section-header">
{% if section.badge %}<div class="section-badge">{{ section.badge }}</div>{% endif %}
{% if section.title %}<h2 class="section-title" id="problems-heading-{{ section.pk }}">{{ section.title }}</h2>{% endif %}
{% if section.description %}<div class="rich-content section-desc">{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc">{{ section.rendered_content }}</div>{% endif %}
{% if section.description %}<div class="rich-content section-desc" {% if section.read_more_description %}data-readmore="200"{% endif %}>{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
</div>
<div class="problems-grid">
{% for item in section.items.all %}
{% include "partials/_linked_card_open.html" with url=item.url card_class="problem-item" %}
{% if item.icon %}<div class="problem-number" aria-hidden="true">{{ item.icon }}</div>{% endif %}
<h3 class="problem-title">{{ item.title }}</h3>
<p class="problem-desc" data-readmore="88">{{ item.content }}</p>
<p class="problem-desc" {% if item.read_more_content %}data-readmore="88"{% endif %}>{{ item.content }}</p>
{% include "partials/_linked_card_close.html" with url=item.url %}
{% endfor %}
</div>
</div>
</section>
{% elif section.section_type == "people" %}
{% with people=section.ordered_people_items %}
{% if people %}
<section class="section" aria-labelledby="people-heading-{{ section.pk }}">
<div class="container blog-article-wrap">
<div class="blog-partners blog-partners--about">
<div class="blog-partners-heading">
{% if section.badge %}<span class="blog-partners-eyebrow">{{ section.badge }}</span>{% endif %}
<h2 id="people-heading-{{ section.pk }}">{{ section.title|default:"People" }}</h2>
{% if section.content %}<div class="rich-content section-desc" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
</div>
<div class="blog-partners-grid">
{% for person in people %}
{% include "partials/_person_card.html" with person=person body=person.content read_more=person.read_more_content %}
{% endfor %}
</div>
</div>
</div>
</section>
{% endif %}
{% endwith %}
{% elif section.section_type == "supporters" %}
<section class="section supporters-section" aria-labelledby="supporters-heading-{{ section.pk }}">
<div class="container">
<div class="section-header">
{% if section.badge %}<div class="section-badge">{{ section.badge }}</div>{% endif %}
{% if section.title %}<h2 class="section-title" id="supporters-heading-{{ section.pk }}">{{ section.title }}</h2>{% endif %}
{% if section.description %}<div class="rich-content section-desc">{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc">{{ section.rendered_content }}</div>{% endif %}
{% if section.description %}<div class="rich-content section-desc" {% if section.read_more_description %}data-readmore="200"{% endif %}>{{ section.rendered_description }}</div>{% elif section.content %}<div class="rich-content section-desc" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
</div>
<div class="supporters-grid">
{% for item in section.items.all %}
@@ -329,7 +351,7 @@
{% endif %}
<div class="supporter-body">
<h3 class="supporter-name">{{ item.title }}</h3>
{% if item.content %}<p class="supporter-desc">{{ item.content }}</p>{% endif %}
{% if item.content %}<p class="supporter-desc" {% if item.read_more_content %}data-readmore="88"{% endif %}>{{ item.content }}</p>{% endif %}
</div>
{% include "partials/_linked_card_close.html" with url=item.url %}
{% endfor %}
@@ -344,7 +366,7 @@
<div class="about-strip-content">
{% if section.badge %}<div class="section-badge">{{ section.badge }}</div>{% endif %}
{% if section.title %}<h2 class="section-title" id="about-strip-heading-{{ section.pk }}">{{ section.title }}</h2>{% endif %}
{% if section.description %}<div class="about-strip-text rich-content">{{ section.rendered_description }}</div>{% elif section.content %}<div class="about-strip-text rich-content">{{ section.rendered_content }}</div>{% endif %}
{% if section.description %}<div class="about-strip-text rich-content" {% if section.read_more_description %}data-readmore="200"{% endif %}>{{ section.rendered_description }}</div>{% elif section.content %}<div class="about-strip-text rich-content" {% if section.read_more_content %}data-readmore="200"{% endif %}>{{ section.rendered_content }}</div>{% endif %}
{% if section.link_text and section.link_url %}
<a href="{{ section.link_url }}" class="btn-primary">{{ section.link_text }}</a>
{% endif %}
+8
View File
@@ -0,0 +1,8 @@
<div class="blog-partner-card glass-card">
{% if person.image %}<div class="blog-partner-image"><img src="{{ person.image.url }}" alt="{{ person.image_alt|default:person.name }}" loading="lazy"></div>{% endif %}
<div class="blog-partner-info">
{% if person.role_label %}<span class="blog-partner-role">{{ person.role_label }}</span>{% endif %}
<h3>{% if person.url %}<a href="{{ person.url }}" target="_blank" rel="noopener noreferrer">{{ person.name }}</a>{% else %}{{ person.name }}{% endif %}</h3>
{% if body %}<p {% if read_more %}data-readmore="88"{% endif %}>{{ body }}</p>{% endif %}
</div>
</div>
+2 -2
View File
@@ -7,7 +7,7 @@
{% if item.icon %}<div class="feature-icon feature-icon--inline" aria-hidden="true">{{ item.icon }}</div>{% endif %}
{% if item.badge %}<div class="standard-badge">{{ item.badge }}</div>{% endif %}
{% if item.title %}<h3 class="supporter-name">{{ item.title }}</h3>{% endif %}
{% if item.content %}<p class="supporter-desc" data-readmore="88">{{ item.content }}</p>{% endif %}
{% if item.content %}<p class="supporter-desc" {% if item.read_more_content %}data-readmore="88"{% endif %}>{{ item.content }}</p>{% endif %}
</div>
{% include "partials/_linked_card_close.html" with url=item.url %}
{% else %}
@@ -15,6 +15,6 @@
{% if item.icon %}<div class="feature-icon" aria-hidden="true">{{ item.icon }}</div>{% endif %}
{% if item.badge %}<div class="standard-badge">{{ item.badge }}</div>{% endif %}
{% if item.title %}<h3 class="feature-title">{{ item.title }}</h3>{% endif %}
{% if item.content %}<p class="feature-desc" data-readmore="88">{{ item.content }}</p>{% endif %}
{% if item.content %}<p class="feature-desc" {% if item.read_more_content %}data-readmore="88"{% endif %}>{{ item.content }}</p>{% endif %}
{% include "partials/_linked_card_close.html" with url=item.url %}
{% endif %}
+4 -4
View File
@@ -27,9 +27,9 @@
<h2 class="sr-only" id="video-heading-{{ video.pk }}">Video</h2>
{% endif %}
{% if video.description %}
<div class="rich-content section-desc video-panel-desc">{{ video.rendered_description }}</div>
<div class="rich-content section-desc video-panel-desc" {% if video.read_more_description %}data-readmore="200"{% endif %}>{{ video.rendered_description }}</div>
{% elif video.content %}
<div class="rich-content section-desc video-panel-desc">{{ video.rendered_content }}</div>
<div class="rich-content section-desc video-panel-desc" {% if video.read_more_content %}data-readmore="200"{% endif %}>{{ video.rendered_content }}</div>
{% endif %}
{% include "partials/_video_player.html" with video=video %}
</div>
@@ -46,9 +46,9 @@
</div>
{% endif %}
{% if video.description %}
<div class="rich-content section-desc">{{ video.rendered_description }}</div>
<div class="rich-content section-desc" {% if video.read_more_description %}data-readmore="200"{% endif %}>{{ video.rendered_description }}</div>
{% elif video.content %}
<div class="rich-content section-desc">{{ video.rendered_content }}</div>
<div class="rich-content section-desc" {% if video.read_more_content %}data-readmore="200"{% endif %}>{{ video.rendered_content }}</div>
{% endif %}
{% include "partials/_video_player.html" with video=video %}
{% endif %}