Integrate django-unfold for enhanced admin interface#31
Merged
Conversation
Replace the default Django admin with django-unfold for a modern UI with Tailwind CSS styling, dark mode support, and Material Symbols icons. Changes: - Add django-unfold to requirements.txt - Add 'unfold' to INSTALLED_APPS (before django.contrib.admin) - Configure UNFOLD settings with sidebar navigation for custom tools - Switch MediaItemAdmin to inherit from unfold.admin.ModelAdmin - Remove custom nav_sidebar.html (replaced by Unfold's sidebar config) - Simplify admin site header/title in urls.py https://claude.ai/code/session_01CNDDDkyzGqiqbrbPNynnYU
Unfold toggles a .dark class on <html> for dark mode, but all custom
admin templates had hardcoded light-mode colors. Add .dark CSS variable
overrides so backgrounds, text, borders, and surfaces adapt to the
active theme.
Changes across all 10 templates:
- Add .dark {} block overriding --sc-* CSS variables with dark palette
- Convert grid_view, list_view, item_detail from Django admin vars
(--body-bg, --body-fg, etc.) to the --sc-* variable system
- Replace hardcoded solid status badge colors in item_detail with
color-mix(transparent) for theme-safe rendering
- Fix code block backgrounds (rgba(0,0,0,0.1) -> var(--sc-surface))
- Fix bookmarklet button colors to use theme variables
- Fix selected result background in spotify confirm to use --sc-primary
https://claude.ai/code/session_01CNDDDkyzGqiqbrbPNynnYU
4571d87 to
82209d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR integrates django-unfold, a modern admin interface package, to replace the custom admin navigation template with a more feature-rich and maintainable solution.
Key Changes
Implementation Details
The unfold package provides a modern, responsive admin interface while maintaining Django's admin functionality. The custom navigation that was previously defined in nav_sidebar.html is now declaratively configured in settings.py, making it easier to maintain and extend. The sidebar configuration includes Material Design icons for better visual organization.
https://claude.ai/code/session_01CNDDDkyzGqiqbrbPNynnYU