rich text svc desc

This commit is contained in:
Tobias Brunner 2025-01-27 15:35:09 +01:00
parent 17b6c4c9ee
commit eb7485e345
No known key found for this signature in database
7 changed files with 98 additions and 8 deletions

View file

@ -21,6 +21,23 @@
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
{% block extra_css %}
<style>
.rich-text-content {
overflow-wrap: break-word;
word-wrap: break-word;
}
.rich-text-content img {
max-width: 100%;
height: auto;
}
.description-preview img {
max-width: 100%;
height: auto;
}
</style>
{% endblock %}
</body>
</html>

View file

@ -27,10 +27,10 @@
<div class="row mb-4">
<div class="col-md-8">
<h5>Description</h5>
<p>{{ service.description }}</p>
<p>{{ service.description|safe }}</p>
<h5>Features</h5>
<p>{{ service.features|linebreaks }}</p>
<p>{{ service.features|safe }}</p>
</div>
<div class="col-md-4">
@ -55,4 +55,4 @@
<a href="{% url 'services:service_list' %}" class="btn btn-secondary">Back to Services</a>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -92,7 +92,7 @@
</div>
</div>
</div>
<p class="card-text">{{ service.description|truncatewords:30 }}</p>
<p class="card-text">{{ service.description|safe|truncatewords:30 }}</p>
<div class="mb-2">
{% for category in service.categories.all %}
<span class="badge bg-secondary me-1">{{ category.full_path }}</span>