diff --git a/src/website/apps/event/models.py b/src/website/apps/event/models.py index d672c69b7b..a93214cd31 100644 --- a/src/website/apps/event/models.py +++ b/src/website/apps/event/models.py @@ -72,6 +72,7 @@ class EventCategory(models.TextChoices): null=True, blank=True, default=None, + resource_type='image' ) background_image = CloudinaryField( 'image', @@ -79,6 +80,7 @@ class EventCategory(models.TextChoices): null=True, blank=True, default=None, + resource_type='image' ) location_name = models.CharField(max_length=100, null=True, blank=True) @@ -181,6 +183,7 @@ class PartnerLogo(BaseModel): null=True, blank=True, default=None, + resource_type='image' ) name = models.CharField(max_length=70) order = models.IntegerField(default=1) @@ -219,6 +222,7 @@ class Resource(BaseModel): null=True, blank=True, default=None, + resource_type='raw' ) order = models.IntegerField(default=1) event = models.ForeignKey( diff --git a/src/website/core/settings.py b/src/website/core/settings.py index e3dbabe3c8..149e8af3d7 100644 --- a/src/website/core/settings.py +++ b/src/website/core/settings.py @@ -254,6 +254,32 @@ def require_env_var(env_var: str) -> str: }, } +QUILL_CONFIGS = { + 'default': { + 'theme': 'snow', + 'modules': { + 'toolbar': [ + [{'header': [1, 2, 3, 4, 5, 6, False]}], + ['bold', 'italic', 'underline', 'strike', + 'blockquote', 'code-block'], + [{'list': 'ordered'}, {'list': 'bullet'}, + {'indent': '-1'}, {'indent': '+1'}], + [{'direction': 'rtl'}], + [{'size': ['small', False, 'large', 'huge']}], + [{'color': []}, {'background': []}], + [{'font': []}], + ['link', 'image', 'video'], + ['clean'], + ], + 'clipboard': {'matchVisual': False}, + }, + 'placeholder': 'Compose an epic...', + 'readOnly': False, + 'bounds': '#editor', + 'scrollingContainer': '#scrolling-container', + }, +} + # --------------------------------------------------------- # Mode-Specific Logging # --------------------------------------------------------- diff --git a/src/website/static/admin/css/custom_quill.css b/src/website/static/admin/css/custom_quill.css index a6518cfb17..e36f3db689 100644 --- a/src/website/static/admin/css/custom_quill.css +++ b/src/website/static/admin/css/custom_quill.css @@ -1,8 +1,9 @@ -/* backend/static/admin/css/custom_quill.css */ +.quill-container { + min-height: 200px; +} -/* Light mode styles (default) */ .ql-container { - height: 300px; + min-height: 200px; background-color: #ffffff; /* Light mode background */ color: #000000; /* Light mode text color */ } diff --git a/src/website/templates/admin/base_site.html b/src/website/templates/admin/base_site.html index 9d76e767b3..cd005936d8 100644 --- a/src/website/templates/admin/base_site.html +++ b/src/website/templates/admin/base_site.html @@ -1,5 +1,10 @@ {% extends "admin/base_site.html" %} {% load static %} {% block title %} AirQo Website Admin Portal {% endblock %} {% block extrahead %} {{ block.super }} +