Skip to content

Commit

Permalink
EthicalAds: new stickybox logic
Browse files Browse the repository at this point in the history
This commit implements the following logic to place an ad in order:

1. If there is an explicit placement, we use that placement.

2. If the doctool/theme is known **and** we find a right placement (eg. sidebar),
   **and** the ad is gonna be above the fold, we put the ad there since we know
   it's a good fit for it.

3. Otherwise, if the screen width is >1300px we add a floating `stickybox` ad.
   Besides, we add an event handler that will _hide the ad_ if the user resizes
   the window and it ends up being <1300px.

On top of #329
  • Loading branch information
humitos committed May 29, 2024
1 parent 2b7e8fe commit 0b57517
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 61 deletions.
Loading

0 comments on commit 0b57517

Please sign in to comment.