13 lines
606 B
Plaintext
13 lines
606 B
Plaintext
package components
|
|
|
|
import "gitea.henriburau.de/haw-lan/cod4watcher/models"
|
|
import "github.com/mergestat/timediff"
|
|
import "fmt"
|
|
|
|
templ CaptureCard(capture models.Capture) {
|
|
<a href={ templ.URL(fmt.Sprintf("/captures/%d", capture.Id)) } class="block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700">
|
|
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">{ capture.Name }</h5>
|
|
<p class="font-normal text-gray-700 dark:text-gray-400">{ timediff.TimeDiff(capture.Start) }</p>
|
|
</a>
|
|
}
|