diff --git a/backend/apimanager/initialize_data.py b/backend/apimanager/initialize_data.py index d68fb40..3756f5e 100644 --- a/backend/apimanager/initialize_data.py +++ b/backend/apimanager/initialize_data.py @@ -3,6 +3,6 @@ userdata = { "intro_content": "
Write something about yourself
", "profile_photo": "", "default_theme": "darkTheme", - "dark_theme": "{\"theme\": \"Dark Mode\",\"background\": \"bg-dark\",\"textColor\": \"text-white\",\"linkBackground\": \"bg-light\",\"linkTextColor\": \"text-black\",\"captionColor\": \"#8a8a8a\",\"fontAwesomeIcon\": \"faSun\",\"borderColor\": \"secondary\",\"buttonColor\": \"light\",\"navBar\": {\"navBarTheme\": \"navbar-dark\",\"background\": \"bg-secondary\",\"buttonColor\": \"light\"},\"footer\": {\"background\": \"bg-secondary\",\"text\": \"text-black\"}}", - "light_theme": "{\"theme\": \"Light Mode\",\"background\": \"bg-light\",\"textColor\": \"text-black\",\"linkBackground\": \"bg-dark\",\"linkTextColor\": \"text-white\",\"captionColor\": \"#605f5f\",\"fontAwesomeIcon\": \"faMoon\",\"borderColor\": \"secondary\",\"buttonColor\": \"dark\",\"navBar\": {\"navBarTheme\": \"navbar-light\",\"background\": \"bg-secondary\",\"buttonColor\": \"light\"},\"footer\": {\"background\": \"bg-secondary\",\"text\": \"text-white\"}}" + "dark_theme": "{\"theme\": \"Dark Mode\",\"background\": \"bg-dark\",\"textColor\": \"text-white\",\"linkBackground\": \"bg-light\",\"linkTextColor\": \"text-black\",\"captionColor\": \"#8a8a8a\",\"fontAwesomeIcon\": \"faSun\",\"borderColor\": \"border-light\",\"buttonColor\": \"light\",\"navBar\": {\"navBarTheme\": \"navbar-dark\",\"background\": \"bg-secondary\",\"buttonColor\": \"light\"},\"footer\": {\"background\": \"bg-secondary\",\"text\": \"text-white\"}}", + "light_theme": "{\"theme\": \"Light Mode\",\"background\": \"bg-light\",\"textColor\": \"text-black\",\"linkBackground\": \"bg-dark\",\"linkTextColor\": \"text-white\",\"captionColor\": \"#605f5f\",\"fontAwesomeIcon\": \"faMoon\",\"borderColor\": \"border-secondary\",\"buttonColor\": \"dark\",\"navBar\": {\"navBarTheme\": \"navbar-light\",\"background\": \"bg-secondary\",\"buttonColor\": \"light\"},\"footer\": {\"background\": \"bg-secondary\",\"text\": \"text-black\"}}" } \ No newline at end of file diff --git a/backend/apimanager/media_views.py b/backend/apimanager/media_views.py index 266ca68..b61bc9f 100644 --- a/backend/apimanager/media_views.py +++ b/backend/apimanager/media_views.py @@ -49,9 +49,10 @@ class MediaUpload(APIView): else: file_path = f"{file_path_base}/{resource_type}/media/{file_unique_slug+resource_id+f.name}" - # Reduce image quality if the file is an image + # Reduce image quality if the file is an images + print(f.content_type) if f.content_type.startswith('image'): - reduced_image = self.reduce_image_quality(f, quality=65) + reduced_image = self.reduce_image_quality(f, quality=40) default_storage.save(file_path, reduced_image) else: # Save non-image files directly diff --git a/backend/apimanager/migrations/0013_auto_20240609_1447.py b/backend/apimanager/migrations/0013_auto_20240609_1447.py index 0e6a6ef..4f3d7d8 100644 --- a/backend/apimanager/migrations/0013_auto_20240609_1447.py +++ b/backend/apimanager/migrations/0013_auto_20240609_1447.py @@ -7,8 +7,8 @@ def add_initial_values(apps, schema_editor): "intro_content": "Write something about yourself
", "profile_photo": "", "default_theme": "darkTheme", - "dark_theme": "{\"theme\": \"Dark Mode\",\"background\": \"bg-dark\",\"textColor\": \"text-white\",\"linkBackground\": \"bg-light\",\"linkTextColor\": \"text-black\",\"captionColor\": \"#8a8a8a\",\"fontAwesomeIcon\": \"faSun\",\"borderColor\": \"secondary\",\"buttonColor\": \"light\",\"navBar\": {\"navBarTheme\": \"navbar-dark\",\"background\": \"bg-secondary\",\"buttonColor\": \"light\"},\"footer\": {\"background\": \"bg-secondary\",\"text\": \"text-black\"}}", - "light_theme": "{\"theme\": \"Light Mode\",\"background\": \"bg-light\",\"textColor\": \"text-black\",\"linkBackground\": \"bg-dark\",\"linkTextColor\": \"text-white\",\"captionColor\": \"#605f5f\",\"fontAwesomeIcon\": \"faMoon\",\"borderColor\": \"secondary\",\"buttonColor\": \"dark\",\"navBar\": {\"navBarTheme\": \"navbar-light\",\"background\": \"bg-secondary\",\"buttonColor\": \"light\"},\"footer\": {\"background\": \"bg-secondary\",\"text\": \"text-white\"}}" + "dark_theme": "{\"theme\": \"Dark Mode\",\"background\": \"bg-dark\",\"textColor\": \"text-white\",\"linkBackground\": \"bg-light\",\"linkTextColor\": \"text-black\",\"captionColor\": \"#8a8a8a\",\"fontAwesomeIcon\": \"faSun\",\"borderColor\": \"border-light\",\"buttonColor\": \"light\",\"navBar\": {\"navBarTheme\": \"navbar-dark\",\"background\": \"bg-secondary\",\"buttonColor\": \"light\"},\"footer\": {\"background\": \"bg-secondary\",\"text\": \"text-white\"}}", + "light_theme": "{\"theme\": \"Light Mode\",\"background\": \"bg-light\",\"textColor\": \"text-black\",\"linkBackground\": \"bg-dark\",\"linkTextColor\": \"text-white\",\"captionColor\": \"#605f5f\",\"fontAwesomeIcon\": \"faMoon\",\"borderColor\": \"border-secondary\",\"buttonColor\": \"dark\",\"navBar\": {\"navBarTheme\": \"navbar-light\",\"background\": \"bg-secondary\",\"buttonColor\": \"light\"},\"footer\": {\"background\": \"bg-secondary\",\"text\": \"text-black\"}}" } UserData = apps.get_model('apimanager', 'userdata') UserData.objects.create( diff --git a/frontend/editable-ui/src/components/blog.jsx b/frontend/editable-ui/src/components/blog.jsx index aee3bb1..7d64151 100755 --- a/frontend/editable-ui/src/components/blog.jsx +++ b/frontend/editable-ui/src/components/blog.jsx @@ -110,7 +110,8 @@ function Blog(props) {