Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
OchiengPaul442 committed Dec 6, 2024
1 parent 5c0162a commit 9415b2f
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/website/apps/event/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ class EventCategory(models.TextChoices):
null=True,
blank=True,
default=None,
resource_type='image'
)
background_image = CloudinaryField(
'image',
folder='website/uploads/events/images',
null=True,
blank=True,
default=None,
resource_type='image'
)

location_name = models.CharField(max_length=100, null=True, blank=True)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -219,6 +222,7 @@ class Resource(BaseModel):
null=True,
blank=True,
default=None,
resource_type='raw'
)
order = models.IntegerField(default=1)
event = models.ForeignKey(
Expand Down
26 changes: 26 additions & 0 deletions src/website/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ---------------------------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions src/website/static/admin/css/custom_quill.css
Original file line number Diff line number Diff line change
@@ -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 */
}
Expand Down
5 changes: 5 additions & 0 deletions src/website/templates/admin/base_site.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{% extends "admin/base_site.html" %} {% load static %} {% block title %} AirQo
Website Admin Portal {% endblock %} {% block extrahead %} {{ block.super }}
<link
rel="stylesheet"
type="text/css"
href="{% static 'admin/css/custom_quill.css' %}"
/>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/quill.snow.css"
rel="stylesheet"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 9415b2f

Please sign in to comment.