23 lines
523 B
Go
23 lines
523 B
Go
package app
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
var (
|
|
HTML string
|
|
CSS string
|
|
Posts map[string]*Post
|
|
Projects []string
|
|
)
|
|
|
|
func init() {
|
|
HTML = loadClean("public/app.html")
|
|
CSS = loadClean("public/app.css")
|
|
HTML = strings.Replace(HTML, "{head}", fmt.Sprintf("{head}<style>%s</style>", CSS), 1)
|
|
HTML = strings.ReplaceAll(HTML, "{avatar}", "https://gravatar.com/avatar/35f2c481f711f0a36bc0e930c4c15eb0bcc794aaeef405a060fe3e28d1c7b7e5.png?s=64")
|
|
Posts = loadPosts("posts")
|
|
Projects = loadProjects("projects")
|
|
}
|