Skip to content

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

@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.

3 participants