diff --git a/hub/services/migrations/0005_service_is_featured.py b/hub/services/migrations/0005_service_is_featured.py new file mode 100644 index 0000000..e21e2b0 --- /dev/null +++ b/hub/services/migrations/0005_service_is_featured.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.5 on 2025-02-25 15:38 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("services", "0004_lead_message"), + ] + + operations = [ + migrations.AddField( + model_name="service", + name="is_featured", + field=models.BooleanField(default=False), + ), + ] diff --git a/hub/services/migrations/0006_cloudprovider_is_featured_and_more.py b/hub/services/migrations/0006_cloudprovider_is_featured_and_more.py new file mode 100644 index 0000000..f623bbf --- /dev/null +++ b/hub/services/migrations/0006_cloudprovider_is_featured_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.5 on 2025-02-25 15:54 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("services", "0005_service_is_featured"), + ] + + operations = [ + migrations.AddField( + model_name="cloudprovider", + name="is_featured", + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name="consultingpartner", + name="is_featured", + field=models.BooleanField(default=False), + ), + ] diff --git a/hub/services/models.py b/hub/services/models.py index 23bb904..5ac188c 100644 --- a/hub/services/models.py +++ b/hub/services/models.py @@ -55,6 +55,7 @@ class CloudProvider(models.Model): null=True, blank=True, ) + is_featured = models.BooleanField(default=False) def __str__(self): return self.name @@ -105,6 +106,7 @@ class Service(models.Model): ) categories = models.ManyToManyField(Category, related_name="services") features = ProseEditorField() + is_featured = models.BooleanField(default=False) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) @@ -139,6 +141,7 @@ class ConsultingPartner(models.Model): cloud_providers = models.ManyToManyField( CloudProvider, related_name="consulting_partners", blank=True ) + is_featured = models.BooleanField(default=False) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) diff --git a/hub/services/static/css/servala-main.css b/hub/services/static/css/servala-main.css index e838744..60b13e8 100644 --- a/hub/services/static/css/servala-main.css +++ b/hub/services/static/css/servala-main.css @@ -12076,6 +12076,12 @@ a.btn:focus { margin-bottom: 16px } +.card__image__wide { + width: 150px; + height: 80px; + margin-bottom: 16px +} + .card__title { font-size: 1.5rem; font-weight: 600; diff --git a/hub/services/static/img/header-logo.png b/hub/services/static/img/header-logo.png index f42ff7a..6718612 100644 Binary files a/hub/services/static/img/header-logo.png and b/hub/services/static/img/header-logo.png differ diff --git a/hub/services/static/img/header-logo1.png b/hub/services/static/img/header-logo1.png new file mode 100644 index 0000000..f42ff7a Binary files /dev/null and b/hub/services/static/img/header-logo1.png differ diff --git a/hub/services/templates/services/base.html b/hub/services/templates/services/base.html index f770287..c051e92 100644 --- a/hub/services/templates/services/base.html +++ b/hub/services/templates/services/base.html @@ -24,8 +24,8 @@
- See All + See All
+ {% for service in featured_services %}
- + {{ service.name }} logo
-

PostgreSQL

-

Database

+

{{ service.name }}

+ {% for category in service.categories.all|slice:":1" %} +

{{ category.name }}

+ {% endfor %}
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

+

{{ service.description|safe|truncatewords:15 }}

-
-
-
- -
-
-

Aws

-

Database

-
-
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

-
-
-
-
-
-
- -
-
-

Microsoft Azure

-

Database

-
-
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

-
-
-
-
-
-
- -
-
-

Google Cloud

-

Database

-
-
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

-
-
+ {% empty %} +
+

No featured services available at the moment.

+ {% endfor %}
@@ -117,69 +79,32 @@
- See All + See All
-
-
-
- +
+
+ {% for provider in featured_providers %} +
+
+
+ {{ provider.name }} logo +
+ +
+

{{ provider.description|safe|truncatewords:15 }}

+
+
-
-

PostgreSQL

-

Database

-
-
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

-
-
-
-
-
-
- -
-
-

Aws

-

Database

-
-
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

-
-
-
-
-
-
- -
-
-

Microsoft Azure

-

Database

-
-
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

-
-
-
-
-
-
- -
-
-

Google Cloud

-

Database

-
-
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

+ {% empty %} +
+

No featured provider available at the moment.

+ {% endfor %}
@@ -202,71 +127,30 @@
+ {% for partner in featured_partners %}
-
- +
+ {{ partner.name }} logo
-

PostgreSQL

-

Database

+

{{ partner.name }}

-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

+

{{ partner.description|safe|truncatewords:15 }}

-
-
-
- -
-
-

Aws

-

Database

-
-
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

-
-
-
-
-
-
- -
-
-

Microsoft Azure

-

Database

-
-
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

-
-
-
-
-
-
- -
-
-

Google Cloud

-

Database

-
-
-

PostgreSQL is a powerful, open source object-relational database system that uses and extends the - SQL language.

-
-
+ {% empty %} +
+

No featured partner available at the moment.

+ {% endfor %}
@@ -298,186 +182,4 @@
-
-
-
-

Frequenty Asked Questions

-
-

Still need more information? Read our FAQ or contact us to learn more about the Servala.

-
-
-
-
-
- -
-
-

The Upbound - Marketplace is a central hub for finding Crossplane packages with verified content and auto-generated - documentation. Upbound curates a set of Official Providers which are actively maintained and thoroughly - tested to help you discover the best building blocks for your internal cloud platform.

-
-
- -
-
- -
-
-

The Upbound - Marketplace is a central hub for finding Crossplane packages with verified content and auto-generated - documentation. Upbound curates a set of Official Providers which are actively maintained and thoroughly - tested to help you discover the best building blocks for your internal cloud platform.

-
-
- -
-
- -
-
-

The Upbound - Marketplace is a central hub for finding Crossplane packages with verified content and auto-generated - documentation. Upbound curates a set of Official Providers which are actively maintained and thoroughly - tested to help you discover the best building blocks for your internal cloud platform.

-
-
- -
-
- -
-
-

The Upbound - Marketplace is a central hub for finding Crossplane packages with verified content and auto-generated - documentation. Upbound curates a set of Official Providers which are actively maintained and thoroughly - tested to help you discover the best building blocks for your internal cloud platform.

-
-
- -
-
- -
-
-

The Upbound - Marketplace is a central hub for finding Crossplane packages with verified content and auto-generated - documentation. Upbound curates a set of Official Providers which are actively maintained and thoroughly - tested to help you discover the best building blocks for your internal cloud platform.

-
-
- -
-
- -
-
-

The Upbound - Marketplace is a central hub for finding Crossplane packages with verified content and auto-generated - documentation. Upbound curates a set of Official Providers which are actively maintained and thoroughly - tested to help you discover the best building blocks for your internal cloud platform.

-
-
- -
-
- -
-
-

The Upbound - Marketplace is a central hub for finding Crossplane packages with verified content and auto-generated - documentation. Upbound curates a set of Official Providers which are actively maintained and thoroughly - tested to help you discover the best building blocks for your internal cloud platform.

-
-
-
-
-
{% endblock %} \ No newline at end of file diff --git a/hub/services/views/pages.py b/hub/services/views/pages.py index abed6e9..f1cc360 100644 --- a/hub/services/views/pages.py +++ b/hub/services/views/pages.py @@ -1,5 +1,22 @@ from django.shortcuts import render +from hub.services.models import Service, CloudProvider, ConsultingPartner def homepage(request): - return render(request, "services/homepage.html") + featured_services = Service.objects.filter(is_featured=True).prefetch_related( + "categories" + )[:4] + + featured_providers = CloudProvider.objects.filter(is_featured=True)[:4] + + featured_partners = ConsultingPartner.objects.filter( + is_featured=True + ).prefetch_related("services", "cloud_providers")[:4] + + context = { + "featured_services": featured_services, + "featured_providers": featured_providers, + "featured_partners": featured_partners, + } + + return render(request, "services/homepage.html", context)