several adjustments to support different partner categories

This commit is contained in:
Tobias Brunner 2025-07-11 11:14:43 +02:00
parent dd25ea9d10
commit c123e74c1f
No known key found for this signature in database
5 changed files with 66 additions and 47 deletions

View file

@ -55,8 +55,8 @@
<ul class="navbar__menu menu mr-lg-27">
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:homepage' %}">Home</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:service_list' %}">Services</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:provider_list' %}">Cloud Providers</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:partner_list' %}">Consulting Partners</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:provider_list' %}">Cloud Provider</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:partner_list' %}">Partner</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:article_list' %}">Articles</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:about' %}">About</a></li>
</ul>

View file

@ -99,27 +99,6 @@
</ul>
</div>
<!-- Cloud Providers -->
{% if partner.cloud_providers.exists %}
<div class="mb-40">
<h3 class="fw-semibold mb-12">Cloud Providers</h3>
<ul class="list-unstyled space-y-12 fs-19 ps-0">
{% for provider in partner.cloud_providers.all %}
<li>
<a class="d-flex align-items-center text-gray-500 h-32 lh-32" href="{{ provider.get_absolute_url }}">
<span class="pr-10">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cloud-fill" viewBox="0 0 16 16">
<path d="M4.406 3.342A5.53 5.53 0 0 1 8 2c2.69 0 4.923 2 5.166 4.579C14.758 6.804 16 8.137 16 9.773 16 11.569 14.502 13 12.687 13H3.781C1.708 13 0 11.366 0 9.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383" fill="#9A63EC"/>
</svg>
</span>
<span>{{ provider.name }}</span>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
<!-- Related Articles -->
{% if related_articles %}
<div class="mb-40">
@ -168,7 +147,13 @@
<!-- Services -->
{% if services %}
<div class="pt-40">
<h3 class="fs-24 fw-semibold lh-1 mb-12" id="services" style="scroll-margin-top: 100px;">Consulting for Services</h3>
<h3 class="fs-24 fw-semibold lh-1 mb-12" id="services" style="scroll-margin-top: 100px;">
{% if partner.category == 'TRAINING' %}
Training for Services
{% else %}
Consulting for Services
{% endif %}
</h3>
<div class="row">
{% for service in services %}
<div class="col-12 col-md-6 mb-30"> <div class="card h-100 d-flex flex-column">

View file

@ -156,7 +156,9 @@
{% if partner.website %}
<a href="{{ partner.website }}" class="btn btn-secondary btn-sm clickable-button" target="_blank">Visit Website</a>
{% endif %}
<a href="{{ partner.get_absolute_url }}#services" class="btn btn-secondary btn-sm clickable-button">Available Services</a>
<a href="{{ partner.get_absolute_url }}#services" class="btn btn-secondary btn-sm clickable-button">
{% if partner.category == 'TRAINING' %}Available Trainings{% else %}Available Services{% endif %}
</a>
</div>
</div>
</div>

View file

@ -51,26 +51,59 @@
{% endif %}
<!-- Consulting Partners -->
{% if service.consulting_partners.exists %}
<div class="mb-40">
<h3 class="fw-semibold mb-12">Consulting Partners</h3>
<p>If you want to get the most out of your {{ service.name }}, our consulting partners can help you optimize your setup and application:</p>
<ul class="list-unstyled space-y-12 fs-19 ps-0">
{% for partner in service.consulting_partners.all %}
<li>
<a class="d-flex align-items-center text-gray-500 h-32 lh-32" href="{{ partner.get_absolute_url }}">
<span class="pr-10">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-people-fill" viewBox="0 0 16 16">
<path d="M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6m-5.784 6A2.24 2.24 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.3 6.3 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1zM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5" fill="#9A63EC"/>
</svg>
</span>
<span>{{ partner.name }}</span>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% with consulting_partners=service.consulting_partners.all|dictsort:"order" %}
{% regroup consulting_partners by category as partners_by_category %}
{% for category_group in partners_by_category %}
{% if category_group.grouper == "CONSULTING" and category_group.list %}
<div class="mb-40">
<h3 class="fw-semibold mb-12">Consulting Partners</h3>
<p>If you want to get the most out of your {{ service.name }} service, our consulting partners can help you optimize your setup and application:</p>
<ul class="list-unstyled space-y-12 fs-19 ps-0">
{% for partner in category_group.list %}
<li>
<a class="d-flex align-items-center text-gray-500 h-32 lh-32" href="{{ partner.get_absolute_url }}">
<span class="pr-10">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-people-fill" viewBox="0 0 16 16">
<path d="M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6m-5.784 6A2.24 2.24 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.3 6.3 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1zM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5" fill="#9A63EC"/>
</svg>
</span>
<span>{{ partner.name }}</span>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endfor %}
{% endwith %}
<!-- Training Partners -->
{% with training_partners=service.consulting_partners.all|dictsort:"order" %}
{% regroup training_partners by category as partners_by_category %}
{% for category_group in partners_by_category %}
{% if category_group.grouper == "TRAINING" and category_group.list %}
<div class="mb-40">
<h3 class="fw-semibold mb-12">Training Partners</h3>
<p>Looking to upskill your team on {{ service.name }}? Our training partners offer comprehensive courses and workshops:</p>
<ul class="list-unstyled space-y-12 fs-19 ps-0">
{% for partner in category_group.list %}
<li>
<a class="d-flex align-items-center text-gray-500 h-32 lh-32" href="{{ partner.get_absolute_url }}">
<span class="pr-10">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-mortarboard-fill" viewBox="0 0 16 16">
<path d="M8.211 2.047a.5.5 0 0 0-.422 0l-7.5 3.5a.5.5 0 0 0 .025.917l7.5 3a.5.5 0 0 0 .372 0L14 7.14V13a1 1 0 0 0-1 1v2h3v-2a1 1 0 0 0-1-1V6.739l.686-.275a.5.5 0 0 0 .025-.917l-7.5-3.5Z" fill="#9A63EC"/>
<path d="M4.176 9.032a.5.5 0 0 0-.656.327l-.5 1.7a.5.5 0 0 0 .294.605l4.5 1.8a.5.5 0 0 0 .372 0l4.5-1.8a.5.5 0 0 0 .294-.605l-.5-1.7a.5.5 0 0 0-.656-.327L8 10.466 4.176 9.032Z" fill="#9A63EC"/>
</svg>
</span>
<span>{{ partner.name }}</span>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endfor %}
{% endwith %}
<!-- External Links -->
{% if service.external_links.exists %}