-
Notifications
You must be signed in to change notification settings - Fork 0
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
Inital work on moving to GD.CSS and the Django templating system. #948
base: main
Are you sure you want to change the base?
Conversation
…S IS INCOMPLETE and a work in progress.
…ssions demonstrated here.
I've added a README in the templates directory that explains the current state, modus operandi and next steps: New templatesThe templates in this directory demonstrate how to replace our old templating The old:
The new:
The Story So FarI was once asked to add a select item to one of our templates. What should have Our old templates are a significant technical debt because:
As part of the firebreak sprint at the end of 2021 I decided to throw it all The result is what you see in this branch. All that remains of the old system is found in the Hints and TipsThere are various common patterns encountered during transitioning from the old Extend The base has a header and footer GD.CSS styles HTML tags and ignores divs It's just POSH (plain old semantic HTML) Use Django forms Tables are boring (and easy) Permissions work in templates too These examples cover all the various aspects of what we do in our templates. Tool ListThe most important page on our site is Frankly, the current version is a mess. The Note that I have ensured the expected However, I have NOT tested the updated template with JavaScript or the Django backend... what you're looking at is an afternoon's "doodle" of a "what if..?". This template definitely needs doing properly and testing. The other templates I've converted were all relatively simple and should just work (tm). ToDo
Best of luck..! |
THIS IS INCOMPLETE and a work in progress.
What
Current templates are a mess. Current CSS is a mess. This PR (and those stacked on it) hope to address this, as part of a firebreak sprint task of exploring our technical debt.
I have several aims:
Here's an example of one of the (static) pages I've already migrated over.
How to review
./manage.py runserver
and visit http://127.0.0.1:8000/accessibility/ to see a new template rendered with GD.CSS.Provide http://example.com to relevant tickets, articles or other
resources.
Note the Trello Github integration links tickets to PRs/branches/commits (in
both directions).