tree like services template

This commit is contained in:
zakhy 2024-12-20 10:53:29 +07:00
parent 5bcd8173f0
commit a4180446f9
2 changed files with 11 additions and 11 deletions

View File

@ -9,7 +9,7 @@
{% block content %}
<div class="w-100vw min-h-100vh color-white d-flex justify-content-end flex-column"
style="background-color: #000;">
style="background-color: #000; {% if not object.video %}background-image: url({% static_with_version 'cybercode/img/img_1.png' %});{% endif %}">
<div class="page-video">
<video class="video" loop="loop" autoplay="" muted=""
{% if object.video.image %}poster="{{ object.video.image.url }}"{% endif %}>
@ -19,15 +19,6 @@
</video>
</div>
{% if modules %}
<div class="container">
{% for module in modules %}
<a class="btn btn-lg" style="z-index: 3; position: relative;" href="{{ module.slug }}">
{{ module.name }}
</a>
{% endfor %}
</div>
{% endif %}
{% if sub_services %}
<div class="container">
@ -46,6 +37,15 @@
<article class="col-12">
<h4>{{ object.name }}</h4>
<p>{{ object.description|safe }}</p>
{% if modules %}
<ul style="z-index: 3; position: relative;">
{% for module in modules %}
<li>
<a href="{{ module.slug }}" class="color-white">{{ module.name }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</article>
</div>
</div>

View File

@ -5,7 +5,7 @@ from pytils.translit import slugify
class BaseContentItem(models.Model):
name = models.CharField(max_length=255)
description = CKEditor5Field('Text', config_name='default')
description = CKEditor5Field('Text', config_name='extends')
created_at = models.DateTimeField(blank=True, null=True)
updated_at = models.DateTimeField(auto_now=True)
slug = models.SlugField(unique=True, blank=True, null=True, max_length=255)