53 lines
926 B
Plaintext
53 lines
926 B
Plaintext
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">
|
|
{ datePosted }
|
|
<br/>
|
|
{ sourceName }
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
// 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>
|
|
}
|