1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-24 15:40:15 +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 %} {% endblock %}
{% block scripts %} {% block scripts %}
{{ super() }} {{ super() }}
<script src="{{ 'overrides/assets/javascripts/bundle.5637e9f5.min.js' | url }}"></script> <script src="{{ 'overrides/assets/javascripts/bundle.89b9c269.min.js' | url }}"></script>
{% endblock %} {% endblock %}

View File

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

View File

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