mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[PR #1767] [MERGED] Add CSS body classes for each page #1824
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1824
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/tzapu/WiFiManager/pull/1767
Author: @dmadison
Created: 10/23/2024
Status: ✅ Merged
Merged: 12/11/2024
Merged by: @tablatronix
Base:
master← Head:page-classes📝 Commits (4)
f5f3496Add body classes argument45a56bfAdd page-specific classes5e23c61Change root CSS class to 'home'27ed8f2Use conditional body class spacing📊 Changes
4 files changed (+49 additions, -22 deletions)
View changed files
📝
WiFiManager.cpp(+22 -21)📝
WiFiManager.h(+1 -1)📝
wm_consts_en.h(+13 -0)📝
wm_consts_fr.h(+13 -0)📄 Description
This PR adds classes to the body element for each individual page, so that it's easier to style pages differently:
This is accomplished by modifying the
getHTTPHead()function to add an optionalStringargument for classes to add, and a set of constant class strings in thewm_constsheader. The class strings are then invoked in each respective route "handle" function when the head is generated.I did not add separate classes for the "saved" pages, as that seemed excessive. But I'm happy to go in and add them if you think it would be beneficial.
This change does not break the current API and should add minimal overhead.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.