features/header-tags #4

Merged
jtom38 merged 3 commits from features/header-tags into main 2024-07-14 09:08:17 -07:00
5 changed files with 51 additions and 3 deletions
Showing only changes of commit 760130ccc2 - Show all commits

View File

@ -14,9 +14,39 @@ templ ArticleCardWithThumbnail(title, thumbnailUrl, url, datePosted, sourceName
</div> </div>
</div> </div>
<div class="content"> <div class="content">
{ datePosted }<br/> { datePosted }
<br/>
{ sourceName } { sourceName }
</div> </div>
</div> </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>
}

View File

@ -1 +0,0 @@
package example

View File

@ -0,0 +1,9 @@
package html
templ Img(src string) {
<img src={ src } />
}
templ ImgAlt(src, alt string) {
<img src={ src } alt={ alt }/>
}

View File

@ -0,0 +1,10 @@
package bulma
// Creates a image wrapper.
// This accepts children.
// Use html.Img() to load a image as a child
templ Image(image string) {
<figure class={ "image", image }>
{ children... }
</figure>
}

View File

@ -1,4 +1,4 @@
package bulma package layout
// Creates a <section> object thats good to break up a page of content. // Creates a <section> object thats good to break up a page of content.
templ Section(title, subtitle string) { templ Section(title, subtitle string) {