add service tagline
This commit is contained in:
parent
5157d7c781
commit
928bd0818e
4 changed files with 31 additions and 0 deletions
18
hub/services/migrations/0017_service_tagline.py
Normal file
18
hub/services/migrations/0017_service_tagline.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 5.1.5 on 2025-03-03 16:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("services", "0016_cloudprovider_disable_listing_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="service",
|
||||
name="tagline",
|
||||
field=models.TextField(blank=True, max_length=500, null=True),
|
||||
),
|
||||
]
|
|
@ -116,6 +116,7 @@ class Service(models.Model):
|
|||
name = models.CharField(max_length=200)
|
||||
slug = models.SlugField(max_length=250, unique=True)
|
||||
description = ProseEditorField()
|
||||
tagline = models.TextField(max_length=500, blank=True, null=True)
|
||||
logo = models.ImageField(
|
||||
upload_to="service_logos/",
|
||||
validators=[validate_image_size],
|
||||
|
|
|
@ -106,6 +106,13 @@
|
|||
<button class="btn btn-tertiary btn-sm mr-12">{{ category.full_path }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if service.tagline %}
|
||||
<div class="mt-3">
|
||||
<p class="fst-italic text-muted fs-19">
|
||||
"{{ service.tagline }}"
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Description -->
|
||||
|
|
|
@ -179,6 +179,11 @@
|
|||
<span>{{ category.full_path }}</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% if service.tagline %}
|
||||
<p class="card__tagline fst-italic text-muted">
|
||||
<small>"{{ service.tagline }}"</small>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card__desc flex-grow-1">
|
||||
<p class="mb-0">{{ service.description|safe|truncatewords:30 }}</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue