2024-05-12 10:46:00 -07:00
|
|
|
package articles
|
|
|
|
|
|
|
|
import (
|
2024-05-18 22:40:13 -07:00
|
|
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
|
|
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
2024-05-12 10:46:00 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
templ List(model models.ListArticlesViewModel) {
|
2024-05-18 22:40:13 -07:00
|
|
|
@layout.WithTemplate() {
|
2024-05-19 10:01:19 -07:00
|
|
|
@filterBar()
|
2024-05-18 22:40:13 -07:00
|
|
|
for _, item := range model.Items {
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-image">
|
|
|
|
<figure class="is-4by3">
|
|
|
|
<img src={ item.Thumbnail }/>
|
|
|
|
</figure>
|
|
|
|
</div>
|
|
|
|
<div class="card-content">
|
|
|
|
<div class="media">
|
|
|
|
<div class="media-content">
|
|
|
|
<a href={ templ.SafeURL(item.Url) }>{ item.Title }</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|