pull in moves, games and project data for template
This commit is contained in:
parent
d716bcf70e
commit
ca8ba91bde
1 changed files with 12 additions and 31 deletions
|
@ -3,48 +3,29 @@ package mono
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/spatialfree/dofdev/tem"
|
||||
"dofdev/tem"
|
||||
"dofdev/web/pages/games"
|
||||
"dofdev/web/pages/moves"
|
||||
"dofdev/web/pages/projects"
|
||||
)
|
||||
|
||||
// func Handler(ctx *gin.Context) {
|
||||
func Handler(w http.ResponseWriter, r *http.Request) {
|
||||
data := struct {
|
||||
Projects []Project
|
||||
TopHash string
|
||||
Moves map[string]moves.Move
|
||||
Games map[string]games.Game
|
||||
Projects map[string]projects.Project
|
||||
}{
|
||||
Projects,
|
||||
TopHash: "silo",
|
||||
Moves: moves.Moves,
|
||||
Games: games.Games,
|
||||
Projects: projects.Projects,
|
||||
}
|
||||
tem.Render(
|
||||
w, r,
|
||||
"mono.html",
|
||||
"",
|
||||
"dofdev",
|
||||
"an effort to open higher degrees of spatial interaction free to the world.",
|
||||
data,
|
||||
)
|
||||
}
|
||||
|
||||
type Project struct {
|
||||
ID int
|
||||
Title string
|
||||
Description string
|
||||
Art string
|
||||
}
|
||||
|
||||
// This would ideally come from a database
|
||||
var Projects = []Project{
|
||||
{ID: 1,
|
||||
Title: "Prompt-Train",
|
||||
Description: "PromptTrain, the PromptWriting Excellence Engine, is here to help you enhance your writing skills and unleash your creativity. Receive valuable feedback on your prompts, compete in creative challenges, connect with a supportive community, and embark on your journey towards writing excellence.",
|
||||
Art: "/res/projects/prompt-train.png",
|
||||
},
|
||||
{ID: 2,
|
||||
Title: "Echo AI",
|
||||
Description: "With EchoAI, creating AI personas is a breeze. Define your character's name, appearance, traits, speech patterns, emotional range, and background story. Submit website and training reference documents, and specify preferred topics and custom responses. EchoAI offers a user-friendly, step-by-step process to bring your Echo AI persona to life.",
|
||||
Art: "/res/projects/echo-ai.png",
|
||||
},
|
||||
{ID: 3,
|
||||
Title: "PromptScript",
|
||||
Description: "PromptScript is a web based ai prompting language that allows you to orchestrate complex systematic patterns with large language models.",
|
||||
Art: "/res/projects/promptscript.png",
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue