From ca8ba91bde01c512e23b815a6ffa75fc8aed4f44 Mon Sep 17 00:00:00 2001 From: spatialfree Date: Sun, 3 Nov 2024 02:42:43 -0500 Subject: [PATCH] pull in moves, games and project data for template --- web/pages/mono/mono.go | 43 ++++++++++++------------------------------ 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/web/pages/mono/mono.go b/web/pages/mono/mono.go index 6a932bd..dee1717 100644 --- a/web/pages/mono/mono.go +++ b/web/pages/mono/mono.go @@ -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", - }, -}