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

Add user custom header/footer functions #1769

Merged
merged 9 commits into from
Dec 12, 2024

Conversation

dmadison
Copy link
Contributor

@dmadison dmadison commented Oct 23, 2024

This PR adds user-facing functions for custom header and footer HTML at the top and bottom of the <body>:

Functions:

//add custom html at start of <body> for all pages
void setCustomBodyHeader(const char* html);

//add custom html at end of <body> for all pages
void setCustomBodyFooter(const char* html);

Demo:

wm.setCustomBodyHeader("<h1>THIS IS MY HEADER</h1>");
wm.setCustomBodyFooter("<h1>THIS IS MY FOOTER</h1>");

This also fixes two incidental bugs:

  • The <small> tag for the 'update' page was not closed (missing the slash)
  • The 'exit' and 'close' pages did not include the HTML end string ("</div></body></html>")

The header function was originally implemented by @ab-tools in #1695. This PR extends and supersedes #1695, which should be closed if this is merged.

header-footer-demo

Andreas Breitschopp and others added 8 commits October 22, 2024 23:57
@dmadison
Copy link
Contributor Author

Conflicts have been resolved and this is ready to merge again.

@tablatronix tablatronix merged commit 8e4c612 into tzapu:master Dec 12, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants