image styling
This commit is contained in:
parent
232da2be65
commit
a891f1087a
3 changed files with 27 additions and 5 deletions
|
|
@ -7,7 +7,9 @@ templ Portfolio(images []string) {
|
|||
<section>
|
||||
<div id="portfolio-grid">
|
||||
for _, img := range images {
|
||||
@AvifImage("portfolio/"+img, "portfolio")
|
||||
<div>
|
||||
@AvifImage("portfolio/"+img, "portfolio")
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -54,12 +54,20 @@ func Portfolio(images []string) templ.Component {
|
|||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, img := range images {
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = AvifImage("portfolio/"+img, "portfolio").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "</div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "</div></section></main>")
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</div></section></main>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue