Added more core components
This commit is contained in:
parent
ad3756d27d
commit
760130ccc2
@ -14,9 +14,39 @@ templ ArticleCardWithThumbnail(title, thumbnailUrl, url, datePosted, sourceName
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
{ datePosted }<br/>
|
||||
{ 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>
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
package example
|
9
components/bulma/html/img.templ
Normal file
9
components/bulma/html/img.templ
Normal file
@ -0,0 +1,9 @@
|
||||
package html
|
||||
|
||||
templ Img(src string) {
|
||||
<img src={ src } />
|
||||
}
|
||||
|
||||
templ ImgAlt(src, alt string) {
|
||||
<img src={ src } alt={ alt }/>
|
||||
}
|
10
components/bulma/image.templ
Normal file
10
components/bulma/image.templ
Normal 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>
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package bulma
|
||||
package layout
|
||||
|
||||
// Creates a <section> object thats good to break up a page of content.
|
||||
templ Section(title, subtitle string) {
|
||||
|
Loading…
Reference in New Issue
Block a user