mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
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
43 lines
2.2 KiB
Plaintext
43 lines
2.2 KiB
Plaintext
block content
|
|
.ces-content-root.mt-6
|
|
.ces-blurb
|
|
| Compiler Explorer is proud to be sponsored by a number of individuals and companies. We thank them for
|
|
| making this website free for all. If you'd like to help, consider becoming a
|
|
a.icon-link(href="https://www.patreon.com/bePatron?u=3691963" title="Help Compiler Explorer - become a Patron" target="_blank" rel="noopener")
|
|
span.fab.fa-patreon
|
|
| Patreon
|
|
| , sponsor on
|
|
a.icon-link(href="https://github.com/sponsors/mattgodbolt" title="Help Compiler Explorer - sponsor on GitHub" target="_blank" rel="noopener")
|
|
span.fab.fa-github-alt
|
|
| GitHub
|
|
| , make a one-time donation on
|
|
a.icon-link(href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KQWQZ7GPY2GZ6&item_name=Compiler+Explorer+development¤cy_code=USD&source=url" title="Make a one-time donation to help fund Compiler Explorer's development" target="_blank" rel="noopener")
|
|
span.fab.fa-paypal
|
|
| PayPal
|
|
| , or
|
|
a(href="mailto:matt@godbolt.org") email Matt
|
|
| for corporate sponsorship.
|
|
.mt-6
|
|
each level, index in sponsors.getLevels()
|
|
.ces-item-block(class=level.class id="ces_hop_" + index)
|
|
h2.ces-item-name= level.name
|
|
div.ces-item-description= level.description
|
|
.ces-top
|
|
each sponsor in level.sponsors
|
|
.ces
|
|
button.btn-block.btn-secondary(title=sponsor.title onclick=sponsor.onclick disabled=!sponsor.url)
|
|
if sponsor.sideBySide
|
|
.d-flex
|
|
.ces-item-title
|
|
img.ces-logo-large(src=sponsor.img alt=sponsor.name)
|
|
.ces-item-description
|
|
!= sponsor.description[Math.floor(Math.random() * sponsor.description.length)]
|
|
else
|
|
.ces-item-title
|
|
if sponsor.img
|
|
img.ces-logo(src=sponsor.img alt=sponsor.title)
|
|
= sponsor.name
|
|
if sponsor.description
|
|
.ces-item-description
|
|
= sponsor.description[Math.floor(Math.random() * sponsor.description.length)]
|