From fb7c79f570fc4c3cd7030c5d1db78204c3b49fae Mon Sep 17 00:00:00 2001 From: DutchEllie Date: Mon, 14 Mar 2022 21:10:10 +0100 Subject: [PATCH] omg this layout is so goood --- components/bannerpanel.go | 7 +++++++ components/homepanel.go | 18 +++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 components/bannerpanel.go diff --git a/components/bannerpanel.go b/components/bannerpanel.go new file mode 100644 index 0000000..a762819 --- /dev/null +++ b/components/bannerpanel.go @@ -0,0 +1,7 @@ +package components + +import "github.com/maxence-charriere/go-app/v9/pkg/app" + +type bannerPanel struct { + app.Compo +} diff --git a/components/homepanel.go b/components/homepanel.go index ce83c4a..e7ce3f3 100644 --- a/components/homepanel.go +++ b/components/homepanel.go @@ -16,9 +16,17 @@ func newHomePanel() *homePanel { func (p *homePanel) Render() app.UI { return app.Div().Body( app.P().Text("Welcome, internet surfer!").Class("p-h1"), + app.Div().Body( + app.P().Text("Please sign my guestbook!").Class("small"), + app.Img().Src("/web/static/images/email3.gif").Style("width", "40px").Style("position", "absolute").Style("bottom", "0px").Style("right", "0px"), + ).Style("position", "absolute").Style("top", "10px").Style("right", "5px"). + OnClick(func(ctx app.Context, e app.Event) { + e.PreventDefault() + p.onShowClick() + }), app.Img(). Style("float", "right"). - Style("margin-bottom", "50px"). + Style("margin-bottom", "10px"). Height(230). Src("/web/static/images/rin-len1.webp"), app.Raw( @@ -42,14 +50,6 @@ func (p *homePanel) Render() app.UI { Class("content-text"). Text("An update is available! Reload to update!"), )), - app.Div().Body( - app.P().Text("Please sign my guestbook!").Class("small"), - app.Img().Src("/web/static/images/email3.gif").Style("width", "40px").Style("position", "absolute").Style("bottom", "0px").Style("right", "0px"), - ).Style("position", "absolute").Style("bottom", "5px").Style("right", "5px"). - OnClick(func(ctx app.Context, e app.Event) { - e.PreventDefault() - p.onShowClick() - }), ).Class("content") }