Skip to content

EthicalAd: fixed footer placement for specific themes #618

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

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

Conversation

humitos
Copy link
Member

@humitos humitos commented Jul 7, 2025

This is a POC to show how we can use fixed footer ad on specific known themes. The logic is as follows:

  • the theme has to be a known theme
  • the image ad added to the navbar has to be below the fold
  • show a fixed footer ad and we add some padding-bottom CSS style to the
    content container (theme-specific selector) with the height of the fixed
    footer ad (using fixed 47.2px for now but it can be dynamically calculated)

The technique of adding the padding-bottom to a theme-specific element solves the problem highlighted in the previous approach done in #447

Sphinx Furo theme

Peek.2025-07-07.12-59.webm

Material for MkDocs

Peek.2025-07-07.13-10.webm

Closes #616

This is a POC to show how we can use fixed footer ad on specific known themes.
The logic is as follows:

- the theme has to be a known theme
- if the image ad added to the navbar has to be below the fold
- show a fixed footer ad and we add some `padding-bottom` CSS style to the
  content container (theme-specific selector) with the height of the fixed
  footer ad (using fixed `47.2px` for now but it can be dynamically calculated)

Closes #616
@humitos humitos requested a review from a team as a code owner July 7, 2025 11:17
@humitos humitos requested a review from agjohnson July 7, 2025 11:17
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me and what I was trying to do in a generic way that didn't work. I think applying it per theme will be a great test to see how it works on the CTR data. I can't speak too much to the CSS, and the right way to actually implement it, but it looks pretty simple.

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.

Addons: ethicalads positioning
2 participants