django-semantic-admin
django-semantic-admin copied to clipboard
Customisation
Hi lovely idea, thank you for putting it together.
How would one override some of the styles to allow some of the fomantic classes to be customised?
There is an extrahead and extrascript block in base.html
What would you like to customize exactly?
The lovely thing about semantic/fomantic is the option to override all the styles. You can either do this using the config or subclass the css directly. Your admin solution, for example, has an image that says 'Django Admin' and it would be nice for users to be able to replace that with their own logo, as well as change the styles such as font and colour. If you have any ideas how I could do that, or there was any way you wanted me to contribute to your repo to make that clearer I would be grateful and happy to help.
The logo can be changed by overriding the branding block of menu.html
As for customizing fomantic, I suppose you mean to allow building a custom fomantic dist, and using that instead of the default?
Maybe there should be settings to change the logo, and fomantic stylesheet 🤔
I think that would be really helpful. That way, users that are using semantic for their django front end can match their styling for the admin interface too. I think fomantic/semantic have a themes.config where you can set custom colours/styles. In my own project, I did not install all that, just override the individual css element in a file which I store in static. I am not sure how to go about helping, but I am really happy to try if you have any suggestions on where to start.
In my own project, I did not install all that, just override the individual css element in a file which I store in static.
In the demo project settings I added to TEMPLATES https://github.com/globophobe/django-semantic-admin/blob/7c432b8022425b18316e6478e3f3f1f391e2e634/demo/demo/settings/base.py#L81
Create templates/admin/base_site.html
You can extend extrahead
{% extends 'admin/base_site.html' %}
{% load static %}
{% block extrastyle %}
<link rel="stylesheet" href="{% static "override.css" %}" />
{% endblock %}
Added some docs https://globophobe.github.io/django-semantic-admin/customization/