Merge of Insiders features tied to 'Black Pearl' funding goal

This commit is contained in:
squidfunk
2021-03-29 18:46:57 +02:00
parent 8677190f3f
commit ca3da9e3ca
51 changed files with 867 additions and 194 deletions

View File

@@ -21,7 +21,7 @@
*/
import { SourceFacts } from "~/components"
import { h } from "~/utilities"
import { h, round } from "~/utilities"
/* ----------------------------------------------------------------------------
* Functions
@@ -37,8 +37,10 @@ import { h } from "~/utilities"
export function renderSourceFacts(facts: SourceFacts): HTMLElement {
return (
<ul class="md-source__facts">
{facts.map(fact => (
<li class="md-source__fact">{fact}</li>
{Object.entries(facts).map(([key, value]) => (
<li class={`md-source__fact md-source__fact--${key}`}>
{typeof value === "number" ? round(value) : value}
</li>
))}
</ul>
)