Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New templates and possible theme manager #18

Open
aristippe opened this issue Feb 8, 2016 · 6 comments
Open

New templates and possible theme manager #18

aristippe opened this issue Feb 8, 2016 · 6 comments
Labels

Comments

@aristippe
Copy link
Owner

For the current look, I modified the current template and CSS files. To retain compatibility with master PathagarBooks/pathagar, it would be nice to someday separate that into a separate theme, with a possible theme selector, at least through admin. The current look, besides some minor future tweaks, looks good enough for now, though if anyone sees anything nice, please attach screenshots. A small thing, though todo someday.

@aristippe aristippe added the later label Feb 8, 2016
@sinergatis
Copy link
Collaborator

Fully agree! We should probably take the chance to cleanup the templates a bit as well (from "the inside": the inheritance and blocks system, file structure, and the internal html). The current look is more than fine to me!

Incidentally, there is a template that is in great need of a "look overhaul" (plus probably some internal tweaks to adjust to the base template), introduced in #10 (templates/formtools/wizard/wizard_form.html) - I simply copied the standard formtools wizard template.

@aristippe
Copy link
Owner Author

Agree the templates could be cleaned up. I hadn't even noticed the new wizard. Nice! I'll take a look at it some time. Cool that the trans template tags are there, even if you just copied it. :) I was planning on tackling localization possibly fairly soon, maybe within the next few months.

@sinergatis
Copy link
Collaborator

One of the cool things about the formwizard (weird naming choice) it that is it supposed to be rather transparent indeed!

If you feel like tweaking that template, the main thing that differs from the regular template are those items that are available to keep track of the steps, etc - basically the "Creating templates for the forms" section linked above. Other than that it should be more or less the same as another template that uses a form (in this case, forms.BookUploadForm and forms.BookMetadataForm - the second one being quite similar to BookForm, used on the edit/add_old views).

And good catch about the localization! Something that it would be nice to tackle eventually indeed.

@aristippe
Copy link
Owner Author

In adding the recent changes to templates, I found navigating through all the existing CSS a bit of work. Cleaning it up to use only the needed CSS, which would possibly remove some of the untested responsive design, by moving the current templates to a new theme, would make further changes a bit easier. If theming were available, possible future and larger design changes could be experimented with in a separate theme. I've looked into a bit and it seems there's nothing built into Django though there are a few theme managers.

https://github.com/ilblackdragon/django-themes
https://www.djangopackages.com/grids/g/template_skins/

The first seems fairly straight forward and I may experiment with it. Please let me know if you already know of something better!

@sinergatis
Copy link
Collaborator

Sounds a good long term plan, and I don't personally recall using a "theme switcher" of sorts in the past, but might be worth looking into. I'd lean on the "keep it simple first" strategy however at this stage, specially seeing the packages linked don't seem to have too much activity recently and might need to be researched carefully to make sure they work with latest django versions, etc.

My suggestion would be to first to a "cleanup existing theme" first, which as you mention probably needs to be done, and later (or at the same time) look into streamlining it a bit by using some well-established framework (bootstrap, foundation, ...). Moving to a framework will probably help a lot on keeping the CSS/HTML/JS maintainable and modular, and there should be some django-* packages for those frameworks (I do use bootstrap fairly frequently, but I don't mind switching). Once we are happy with our "single theme" solution, then expand into supporting several themes (if we are not happy with the packages you mentioned, it should be pretty easy to roll our own - basically serve a different CSS file depending on a user preference!).

@aristippe
Copy link
Owner Author

I also thing keep it simple first is a good idea. I didn't really imagine needing or wanting to use multiple themes though others might. I don't think there's enough of a need to be worth pursuing; having one good theme seems enough for a while. All I was thinking about was making it easier to keep the original theme as is, to possibly let PathagarBooks/pathagar merge if needed, or if we want to later merge their future changes. I believe there has been recent work done, at least with responsive design, and it'd be interesting to see whenever it's pushed to their repo. Somehow being able to specify the theme to use, possibly through some setting, if it can be prefixed to template location, would help for that, as well as working on larger changes to the default templates in another folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants