Evan Reichard
3cf374ea2b
Some checks reported errors
continuous-integration/drone/push Build was killed
27 lines
652 B
Plaintext
27 lines
652 B
Plaintext
package components
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
templ InfoCard(name string, metric int) {
|
|
<div class="w-full">
|
|
@infoCardInner(name, metric)
|
|
</div>
|
|
}
|
|
|
|
templ InfoCardLink(name string, metric int, link string) {
|
|
<a href={ templ.SafeURL(link) } class="w-full">
|
|
@infoCardInner(name, metric)
|
|
</a>
|
|
}
|
|
|
|
templ infoCardInner(name string, metric int) {
|
|
<div class="flex gap-4 w-full p-4 bg-white shadow-lg dark:bg-gray-700 rounded">
|
|
<div class="flex flex-col justify-around dark:text-white w-full text-sm">
|
|
<p class="text-2xl font-bold text-black dark:text-white">{ fmt.Sprint(metric) }</p>
|
|
<p class="text-sm text-gray-400">{ name }</p>
|
|
</div>
|
|
</div>
|
|
}
|