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 static #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

New templates and static #8

wants to merge 2 commits into from

Conversation

sdarwin
Copy link
Collaborator

@sdarwin sdarwin commented Jul 30, 2024

No description provided.

@sdarwin
Copy link
Collaborator Author

sdarwin commented Jul 30, 2024

@gregnewman it looks very good! See https://lists.stage.boost.cppalliance.org/

This pull request contains 15 files that differed. They have been deployed on the test machines. Template and static dirs are referenced in https://github.com/cppalliance/boost-mailman/blob/master/settings.py

So far, the appearance of the new header is correct. The documentation mentions an {% extends %} syntax. Could that be applied to these new files anywhere, to further reduce the amount of code being maintained? By "extending" an existing file, the new file doesn't need to contain as much information. Although there are probably limits to the technique.

If you are interested in logging into the stage machine, send me an SSH public key.

@sdarwin
Copy link
Collaborator Author

sdarwin commented Aug 8, 2024

The appearance of the templates looks great.

After reviewing all the files, it seems there are not many opportunities to consolidate or simplify things. I did find one trick. Consider _hyperkitty-message.scss. By leveraging @import, the earlier files can be imported, and then only override a few settings:

@import "original/hyperkitty-message";

.replies .email {
        .subject {
		padding-top: 5;
                padding-left: 0;
        }
}

That has been done. In the future, newer Hyperkitty files can be copy-pasted in fairly easily without modifying _hyperkitty-message.scss.

I've also included copies of the upstream templates, which can be compared or diffed when upgrading.

Unfortunately, {% extends %} functionality depends on {% block %} placeholders. If the files being overwritten don't have blocks they cannot be customized that way.

@gregnewman
Copy link
Collaborator

@sdarwin part of my current effort is abstract the hyperkitty style additions/changes into its own include which will cleanup a lot and hopefully make it easier to do updates. And yes, extends won’t work.

@sdarwin
Copy link
Collaborator Author

sdarwin commented Aug 8, 2024

Sounds good. For reference, the script which is copying these files to the destination django static and template folders is https://github.com/cppalliance/boost-mailman/blob/master/ansible/custom/main.yml

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

Successfully merging this pull request may close these issues.

2 participants