Fantomas42 / django-blog-zinnia

Simple yet powerful and really extendable application for managing a blog within your Django Web site.
http://django-blog-zinnia.com/
BSD 3-Clause "New" or "Revised" License
2.11k stars 730 forks source link

Replacing default theme's zinnia logo? #547

Open johnfwhitmore opened 5 years ago

johnfwhitmore commented 5 years ago

Actual behavior

The default theme displays the Zinnia logo on the header of the page. In an attempt to replace that logo with my own, leaving the rest of the theme the same I've added my logo to the static directory in the file: ./static/zinnia/theme/img/logo.png

Expected behavior

I'd expected the Zinnia logo to be replaced with my logo but instead the CSS in my pipenv directory is pulling in the Zinnia logo from the pipenv directory instead of the logo in the static file. Obviously I can force the replacement of the zinnia logo by editing the css files in the pipenv directory but that doesn't seem to be the best solution.

This seems to be a bug to me, but I might well be missing something but having been through the theme documentation I can't see the solution. I've searched the issues for "logo.png" thinking that would be a good search term but haven't found anything.

The easy solution is to pull that logo out of the css file and place it directly into the zinnia/base.html template file, rather then using the css:

"background: transparent url("../img/logo.png") no-repeat scroll left center;"

Having said that if the django command "python manage.py collectstatic" pulled the css files into my static directory I'd be more then happy to edit them in that location. That's another possible solution. I just don't like to edit css files in the pipenv directory, as a version upgrade might destroy them, forcing me to relocate the issue and re-edit the css in pipenv.

Specifications

Disclaimer

Before submitting an issue make sure you have:

johnfwhitmore commented 5 years ago

I've hit another theme/css issue. If you look at the zinnia home page (https://django-blog-zinnia.com/) the web page changes background colour a short way down the page. I don't like that style element so want to remove it. That style element is coming from "background.gif", which if I grep for that string gives me two files in my collected static directories:

static/zinnia/theme/sass/partials/_themes.scss static/zinnia/theme/css/screen.css

Since editing these two files to remove this element does not change the background the command "python manage.py runserver" does not pull the css from my static directory, but rather the package directory in my pipenv environment.

Perhaps this is a problem with runserver as opposed to zinnia