From f78a8b16191bf0b5cf33d014a6740e54f4e88d10 Mon Sep 17 00:00:00 2001 From: DutchEllie Date: Mon, 14 Mar 2022 09:17:20 +0100 Subject: [PATCH] Added Kristy --- README.md | 6 ++++++ components/galaxiespage.go | 12 ++++++++++++ components/modal.go | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 components/modal.go diff --git a/README.md b/README.md index 63fa0ca..f9d841a 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ A truly proper website this timeā„¢ +**TODO**: +- Redo the entire CSS with a framework +- Change domain to quenten.nl and staging.quenten.nl +- Dynamically make domains for other branches + + This website will be done with this: - Backend written in Golang - Templating with Go diff --git a/components/galaxiespage.go b/components/galaxiespage.go index ded3398..2ef9e46 100644 --- a/components/galaxiespage.go +++ b/components/galaxiespage.go @@ -63,6 +63,18 @@ func (b *galaxiesPanel) Render() app.UI { minimalist website that's just lovely.`), ), ), + app.Li().Body( + app.Div().Body( + // TODO: Create a modal popup for each name!!! + app.A().Href("https://kristypixel.neocities.org"). + Class("p-h3 m-t5"). + Text("Kristy"), + app.P(). + Class("m-t5"). + Text(`Website made by Kristy. Very cute website, I love it! Keep up the + awesome work!`), + ), + ), ), ), ).Class("content") diff --git a/components/modal.go b/components/modal.go new file mode 100644 index 0000000..1c7e21a --- /dev/null +++ b/components/modal.go @@ -0,0 +1,37 @@ +package components + +import "github.com/maxence-charriere/go-app/v9/pkg/app" + +// A generic modal to be used on the entire site +type Modal struct { + app.Compo + + Title string + Body []app.UI // Body of the modal + + OnClose func() +} + +func (m *Modal) Render() app.UI { + return app.Div(). + Class("generic-modal"). + ID("genericModal"). + OnClick(func(ctx app.Context, e app.Event) { + m.OnClose() + }). + Body( + app.Div(). + Class("gb-modal-content"). + Body( + app.Span().Class("close").Text("X"). + OnClick(func(ctx app.Context, e app.Event) { + //modal := app.Window().GetElementByID("gbModal") + //modal.Set("style", "none") + m.OnClose() + }), + app.Div(). + Class("generic-modal-body"). + Body(m.Body...), + ), + ) +}