1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-24 07:30:12 +01:00

Updated Sponsors listing

This commit is contained in:
squidfunk 2021-07-11 16:53:00 +02:00
parent 6d59b425aa
commit 0d82ef2628
5 changed files with 12 additions and 12 deletions

View File

@ -35,5 +35,5 @@
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="{{ 'overrides/assets/javascripts/bundle.5637e9f5.min.js' | url }}"></script>
<script src="{{ 'overrides/assets/javascripts/bundle.89b9c269.min.js' | url }}"></script>
{% endblock %}

View File

@ -125,7 +125,7 @@ export function mountSponsorship(
const list = getElementOrThrow(":scope > :first-child", el)
for (const sponsor of sponsorship.sponsors)
if (sponsor.type === "public")
list.appendChild(renderPublicSponsor(sponsor))
list.appendChild(renderPublicSponsor(sponsor.user))
/* Render combined private sponsors */
list.appendChild(renderPrivateSponsor(

View File

@ -22,7 +22,7 @@
import { h } from "~/utilities"
import { PublicSponsor } from "_/components"
import { SponsorUser } from "_/components"
/* ----------------------------------------------------------------------------
* Functions
@ -31,17 +31,17 @@ import { PublicSponsor } from "_/components"
/**
* Render public sponsor
*
* @param sponsor - Public sponsor
* @param user - Sponsor user
*
* @returns Element
*/
export function renderPublicSponsor(
sponsor: PublicSponsor
user: SponsorUser
): HTMLElement {
const title = `@${sponsor.name}`
const title = `@${user.name}`
return (
<a href={sponsor.url} title={title} class="mdx-sponsorship__item">
<img src={sponsor.image} />
<a href={user.url} title={title} class="mdx-sponsorship__item">
<img src={user.image} />
</a>
)
}