diff --git a/bookmarks/migrations/0026_userprofile_custom_css.py b/bookmarks/migrations/0026_userprofile_custom_css.py new file mode 100644 index 0000000..f123246 --- /dev/null +++ b/bookmarks/migrations/0026_userprofile_custom_css.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.2 on 2024-03-16 23:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("bookmarks", "0025_userprofile_search_preferences"), + ] + + operations = [ + migrations.AddField( + model_name="userprofile", + name="custom_css", + field=models.TextField(blank=True), + ), + ] diff --git a/bookmarks/models.py b/bookmarks/models.py index 87711ce..8714283 100644 --- a/bookmarks/models.py +++ b/bookmarks/models.py @@ -331,6 +331,7 @@ class UserProfile(models.Model): enable_favicons = models.BooleanField(default=False, null=False) display_url = models.BooleanField(default=False, null=False) permanent_notes = models.BooleanField(default=False, null=False) + custom_css = models.TextField(blank=True, null=False) search_preferences = models.JSONField(default=dict, null=False) @@ -348,6 +349,7 @@ class UserProfileForm(forms.ModelForm): "enable_favicons", "display_url", "permanent_notes", + "custom_css", ] diff --git a/bookmarks/styles/settings.scss b/bookmarks/styles/settings.scss index b533abb..b62e76f 100644 --- a/bookmarks/styles/settings.scss +++ b/bookmarks/styles/settings.scss @@ -7,6 +7,10 @@ } } + textarea.custom-css { + font-family: monospace; + } + .input-group > input[type=submit] { height: auto; } diff --git a/bookmarks/templates/bookmarks/layout.html b/bookmarks/templates/bookmarks/layout.html index ff4f336..fca6a9a 100644 --- a/bookmarks/templates/bookmarks/layout.html +++ b/bookmarks/templates/bookmarks/layout.html @@ -34,6 +34,9 @@ {% endif %} + {% if request.user_profile.custom_css %} + + {% endif %}
diff --git a/bookmarks/templates/settings/general.html b/bookmarks/templates/settings/general.html index fa3f1b9..823f0b1 100644 --- a/bookmarks/templates/settings/general.html +++ b/bookmarks/templates/settings/general.html @@ -124,6 +124,18 @@ href="{% url 'bookmarks:shared' %}">shared bookmarks page. +Profile updated
diff --git a/siteroot/settings/base.py b/siteroot/settings/base.py index 373cfa0..c072392 100644 --- a/siteroot/settings/base.py +++ b/siteroot/settings/base.py @@ -131,8 +131,6 @@ STATIC_ROOT = os.path.join(BASE_DIR, "static") # Turn off SASS compilation by default SASS_PROCESSOR_ENABLED = False -# Location where generated CSS files are saved -SASS_PROCESSOR_ROOT = os.path.join(BASE_DIR, "bookmarks", "static") # Add SASS preprocessor finder to resolve generated CSS STATICFILES_FINDERS = [