-
- Downloads
Sponsorship changes (#4274)
Rotate sponsors on the top of the page: - `topIcon` -> `topIconShowEvery` - `Sponsors` becomes an interface with methods to get levels, pick sponsors etc - A somewhat acceptable algorithm for generating a "fair choice" of sponsors given the constraints: - "show at least 1 in N times" - don't unfairly show one sponsor more than any other at the same level - Sponsor icons are loaded dynamically via a "bits" handler (introducing a short delay in them appearing), but this means the index.html doesn't change on every load, so it's still cacheable
Showing
- etc/config/sponsors.yaml 4 additions, 3 deletionsetc/config/sponsors.yaml
- lib/sponsors.interfaces.ts 8 additions, 5 deletionslib/sponsors.interfaces.ts
- lib/sponsors.ts 104 additions, 5 deletionslib/sponsors.ts
- static/main.js 8 additions, 0 deletionsstatic/main.js
- test/sponsors-test.js 101 additions, 15 deletionstest/sponsors-test.js
- views/bits/icons.pug 6 additions, 0 deletionsviews/bits/icons.pug
- views/bits/sponsors-content.pug 1 addition, 1 deletionviews/bits/sponsors-content.pug
- views/bits/sponsors.pug 1 addition, 1 deletionviews/bits/sponsors.pug
- views/sponsor-icons.pug 5 additions, 11 deletionsviews/sponsor-icons.pug
Loading
Please register or sign in to comment