2024-06-02 19:55:05 -07:00
|
|
|
package bulma
|
|
|
|
|
|
|
|
templ ArticleCardWithThumbnail(title, thumbnailUrl, url, datePosted, sourceName string) {
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-image">
|
|
|
|
<figure class="is-4by3">
|
|
|
|
<img src={ thumbnailUrl }/>
|
|
|
|
</figure>
|
|
|
|
</div>
|
|
|
|
<div class="card-content">
|
|
|
|
<div class="media">
|
|
|
|
<div class="media-content">
|
|
|
|
<a href={ templ.SafeURL(url) }>{ title }</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
2024-07-14 09:07:53 -07:00
|
|
|
{ datePosted }
|
|
|
|
<br/>
|
2024-06-02 19:55:05 -07:00
|
|
|
{ sourceName }
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
2024-07-14 09:07:53 -07:00
|
|
|
|
|
|
|
// Creates a card container.
|
|
|
|
// Accepts children
|
|
|
|
templ Card() {
|
|
|
|
<div class="card">
|
|
|
|
{ children... }
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
|
|
|
|
// Creates a image card container.
|
|
|
|
// Accepts children
|
|
|
|
templ CardImage() {
|
|
|
|
<div class="card-image">
|
|
|
|
{ children... }
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
templ CardImageSize(size string) {
|
|
|
|
<figure class={ "image", size }>
|
|
|
|
{ children... }
|
|
|
|
</figure>
|
|
|
|
}
|
|
|
|
|
|
|
|
templ CardContentContainer() {
|
|
|
|
<div class="card-content">
|
|
|
|
{ children... }
|
|
|
|
</div>
|
|
|
|
}
|