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

enhancement: body and article classes per page/keyword. #815

Open
davidsneighbour opened this issue Jan 15, 2025 · 0 comments
Open

enhancement: body and article classes per page/keyword. #815

davidsneighbour opened this issue Jan 15, 2025 · 0 comments

Comments

@davidsneighbour
Copy link
Collaborator

Idea: adding identifiers for the current post and page types to the body and article tags.

<body class="post-identifier is-page is-section is-node is-list">
<article class="post-identifier">

The .post-identifier class would be some form of unique string per page/post that is based on the url or slug of the page. In <body> tags it would occur only on a single-page-base, in the article tag it should be found anywhere we show a post or post preview.

This way we are able to change styles based on topics (via e.g. article.post-identifier { background: #123123; }) and we keep the whole thing future proof.

I implemented this in some form on my own projects (own themes), so it should be easily adaptable for Ananke.

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

No branches or pull requests

1 participant