eeeeh
continuous-integration/drone/push Build is passing Details

This commit is contained in:
DutchEllie 2022-03-18 22:45:29 +01:00
parent 6482fcd6f1
commit 30d57404f9
Signed by: DutchEllie
SSH Key Fingerprint: SHA256:dKq6ZSgN5E3Viqrw/+xAdf2VdR6hdRGNyrYqXXwfjTY
5 changed files with 55 additions and 0 deletions

15
src/emptypage.go Normal file
View File

@ -0,0 +1,15 @@
package main
import "github.com/maxence-charriere/go-app/v9/pkg/app"
type EmptyPage struct {
app.Compo
}
func NewEmptyPage() *EmptyPage {
return &EmptyPage{}
}
func (e *EmptyPage) Render() app.UI {
return app.Head().Body()
}

View File

@ -17,9 +17,13 @@ func main() {
homepage := NewHomepage()
aboutpage := NewAboutPage()
galaxiespage := NewGalaxiesPage()
undertalePage := NewUndertalePage()
emptyPage := NewEmptyPage()
app.Route("/", homepage)
app.Route("/about", aboutpage)
app.Route("/galaxies", galaxiespage)
app.Route("/undertale", undertalePage)
app.Route("/empty", emptyPage)
app.Handle(getHTML, handleGetHTML)

View File

@ -20,6 +20,11 @@ func (n *navbar) Render() app.UI {
app.Li().Body(
app.A().Href("/galaxies").Text("Galaxies"),
),
app.Li().
Style("display", "none").
Body(
app.A().Href("/undertale").Text("Undertale"),
),
),
).Class("navbar")
}

30
src/undertale.go Normal file
View File

@ -0,0 +1,30 @@
package main
import "github.com/maxence-charriere/go-app/v9/pkg/app"
type UndertalePage struct {
app.Compo
}
// TODO: Autoplay Megalovania
func NewUndertalePage() *UndertalePage {
return &UndertalePage{}
}
func (u *UndertalePage) Render() app.UI {
return newPage().
Title("Undertale").
LeftBar(
newHTMLBlock().
Class("left").
Class("leftbarblock a").
Src("/web/blocks/snippets/bannerpanel.html"),
).
Main(
newHTMLBlock().
Class("right").
Class("contentblock").
Src("/web/blocks/pages/undertale.html"),
)
}

View File

@ -0,0 +1 @@
<p>Test</p>