26 lines
509 B
Go
26 lines
509 B
Go
package pages
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"git.urbach.dev/go/web"
|
|
"git.urbach.dev/web/urbach.dev/server/app"
|
|
)
|
|
|
|
func Frontpage(ctx web.Context) error {
|
|
head := fmt.Sprintf(`<title>%s</title><meta name="keywords" content="%s">`, "Projects", "projects")
|
|
body := strings.Builder{}
|
|
body.WriteString(`<h2>Projects</h2>`)
|
|
|
|
for i, markdown := range app.Projects {
|
|
body.WriteString(markdown)
|
|
|
|
if i != len(app.Projects)-1 {
|
|
body.WriteString(`<hr>`)
|
|
}
|
|
}
|
|
|
|
return app.Render(ctx, head, body.String())
|
|
}
|